<!DOCTYPE html>
<html>
<body>
<p>This test for a bug copy/pasting underlined text.  The color of the underline should be the color of the element that has the text-decoration property.</p>
<p>To manually test, copy "This should be underlined" and paste it on the second editable region.</p>
<div id="copy" contenteditable="true"><span style="text-decoration: underline; color: blue;"><span style="color:red;">This should be underlined.</span></span></div>
<div id="paste" contenteditable="true"><br></div>
<script src="../../resources/dump-as-markup.js"></script>
<script>

if (window.testRunner) {
    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');
} else
    Markup.noAutoDump();

</script>
</body>
</html>
