Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Side by Side Diff: LayoutTests/editing/pasteboard/do-not-copy-body-color.html

Issue 6975019: Revert 85494 - MERGE 85090 - 2011-04-27 Enrica Casucci <enrica@apple.com> (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/742/
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script>
5 function runTest() {
6 if (!window.layoutTestController)
7 return;
8 layoutTestController.dumpAsText();
9 var element = document.getElementById("test");
10 window.getSelection().setPosition(element.firstChild, 0);
11 window.getSelection().modify('extend', 'forward', 'word');
12 window.getSelection().modify('extend', 'forward', 'word');
13 window.getSelection().modify('extend', 'forward', 'word');
14
15 document.execCommand("Cut");
16 document.body.style.backgroundColor = "white";
17 document.execCommand("Paste");
18 document.body.innerText = document.body.innerHTML;
19
20 }
21 </script>
22 </head>
23 <body onLoad="runTest();" contentEditable="true" style="background-color: #bbb;" >
24 <div>
25 This test verifies that, when the body element has a background color, we don't copy the color if the selection is not the entire content nor any of the interme diate elements. To manually this test, select the text inside the div with the b order, cut and paste it back. You should not see an additional red border.
26 <div style="border: 2px solid red">
27 <div id="test">Select this text</div>
28 </div>
29 </div>
30 </body>
31 </html>
32
OLDNEW
« no previous file with comments | « LayoutTests/ChangeLog ('k') | LayoutTests/editing/pasteboard/do-not-copy-body-color-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698