11 border: 2px solid blue;
16 .scenario { margin-bottom: 16px;}
17 .scenario:first-line { font-weight: bold; margin-bottom: 16px;}
18 .expected-results:first-line { font-weight: bold }
20 <script src=../editing.js></script>
21 <script src="../../resources/dump-as-markup.js"></script>
25 internals.settings.setEditingBehavior('mac');
26 if (window.testRunner)
27 testRunner.dumpAsText();
29 function performCopyPaste(elementName)
31 var element = document.getElementById(elementName);
32 window.getSelection().collapse(element.firstChild, 0);
33 window.getSelection().modify('extend', 'forward', 'word');
34 window.getSelection().modify('extend', 'forward', 'word');
36 window.getSelection().modify('move', 'forward', 'character');
40 function editingTest() {
41 Markup.dump('test', 'Markup before');
42 performCopyPaste("test");
43 performCopyPaste("test2");
44 performCopyPaste("test3");
45 Markup.dump('test', 'Markup after');
49 <title>Editing Test</title>
52 <div class="explanation">
53 <div class="scenario">
57 <a href="https://bugs.webkit.org/show_bug.cgi?id=58925"><https://bugs.webkit.org/show_bug.cgi?id=58925></a> REGRESSION(r55762): Highlight color can't be copied in gmail.
59 <div class="expected-results">
62 The pasted text should have the same background color as the copied text. To run the test manually, select each of the two words with the same background color, copy, move the selection at the end of the second word and paste.
65 <div contenteditable id="test" class="editing">
66 <span style="background-color: rgb(255, 0, 0);">Red background</span>
67 <div id="test2"><span style="background-color: green;">Green background</span></div>
68 <div id="test3"><span style="background-color: rgb(255, 0, 0, 0);">Transparent background</span></div>