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

Side by Side Diff: LayoutTests/editing/pasteboard/copy-text-with-backgroundcolor.html

Issue 7031026: Revert 84311 - REGRESSION(r55762): Highlight color can't be copied in gmail. (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
5 <style>
6 .editing {
7 border: 2px solid red;
8 font-size: 24px;
9 }
10 .explanation {
11 border: 2px solid blue;
12 padding: 12px;
13 font-size: 24px;
14 margin-bottom: 24px;
15 }
16 .scenario { margin-bottom: 16px;}
17 .scenario:first-line { font-weight: bold; margin-bottom: 16px;}
18 .expected-results:first-line { font-weight: bold }
19 </style>
20 <script src=../editing.js></script>
21 <script src="../../resources/dump-as-markup.js"></script>
22
23 <script>
24 if (window.layoutTestController)
25 layoutTestController.dumpAsText();
26
27 function performCopyPaste(elementName)
28 {
29 var element = document.getElementById(elementName);
30 window.getSelection().setPosition(element.firstChild, 0);
31 window.getSelection().modify('extend', 'forward', 'word');
32 window.getSelection().modify('extend', 'forward', 'word');
33 copyCommand();
34 window.getSelection().modify('move', 'forward', 'character');
35 pasteCommand();
36 }
37
38 function editingTest() {
39 Markup.dump('test', 'Markup before');
40 performCopyPaste("test");
41 performCopyPaste("test2");
42 performCopyPaste("test3");
43 Markup.dump('test', 'Markup after');
44 }
45 </script>
46
47 <title>Editing Test</title>
48 </head>
49 <body>
50 <div class="explanation">
51 <div class="scenario">
52 Tests:
53 <br>
54 Fix for this bug:
55 <a href="https://bugs.webkit.org/show_bug.cgi?id=58925">&lt;https://bugs.webkit. org/show_bug.cgi?id=58925&gt;</a> REGRESSION(r55762): Highlight color can't be c opied in gmail.
56 </div>
57 <div class="expected-results">
58 Expected Results:
59 <br>
60 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.
61 </div>
62 </div>
63 <div contenteditable id="test" class="editing">
64 <span style="background-color: rgb(255, 0, 0);">Red background</span>
65 <div id="test2"><span style="background-color: green;">Green background</span></ div>
66 <div id="test3"><span style="background-color: rgb(255, 0, 0, 0);">Transparent b ackground</span></div>
67 </div>
68
69 <script>
70 runEditingTest();
71 </script>
72
73 </body>
74 </html>
OLDNEW
« no previous file with comments | « LayoutTests/ChangeLog ('k') | LayoutTests/editing/pasteboard/copy-text-with-backgroundcolor-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698