<!DOCTYPE html>
<html>
<body>
<p>This test that CSS property caret-color is preserved when copying and pasting.</p>
<p>To manually test, copy "caret-color: blue, caret-color: magenta" and paste it on the second editable region. Then verify that the color of the text insertion caret is blue and magenta when placed inside the substring "caret-color: blue" and "caret-color: magenta", respectively.</p>
<div id="copy" contenteditable="true"><span style="caret-color: blue">caret-color: blue, <span style="caret-color: magenta">caret-color: magenta</span></span></div>
<div id="paste" contenteditable="true"><br></div>
<script src="../../resources/dump-as-markup.js"></script>
<script>
if (!window.testRunner)
    Markup.noAutoDump();
else {
    var copy = document.getElementById("copy");
    copy.focus();
    document.execCommand("SelectAll");
    document.execCommand("Copy");
    var paste = document.getElementById("paste");
    paste.focus();
    document.execCommand("Paste");

    Markup.description(document.getElementsByTagName("p")[0].innerText);
    Markup.dump("paste");
}
</script>
</body>
</html>
