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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/style/remove-underline-from-stylesheet.html

Issue 2245393002: Convert editing/style/remove-underline-from-stylesheet.html to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-08-16T18:34:59 Created 4 years, 4 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/platform/mac/editing/style/remove-underline-from-stylesheet-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <!doctype html>
2 <head> 2 <script src="../../resources/testharness.js"></script>
3 <style> 3 <script src="../../resources/testharnessreport.js"></script>
4 .editing { 4 <script src="../assert_selection.js"></script>
5 border: 2px solid red;
6 padding: 12px;
7 font-size: 24px;
8 text-decoration: underline;
9 }
10 </style>
11 <script src="../../resources/dump-as-markup.js"></script>
12 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script >
13 <script> 5 <script>
6 // Test for http://wkb.ug/27809
7 test(() => assert_selection(
8 [
9 '<style>.underline { text-decoration: underline; }</style>',
10 '<div class="underline" contenteditable>^abc|</div>',
11 ].join(''),
12 'underline',
13 [
14 '<style>.underline { text-decoration: underline; }</style>',
15 '<div class="underline" contenteditable>^abc|</div>',
16 ].join('')),
17 'Underline command does nothing when selected text has undeline (style s heet).');
14 18
15 function editingTest() { 19 test(() => assert_selection(
16 if (window.testRunner) 20 '<div contenteditable style="text-decoration: underline">^abc|</div>',
17 testRunner.dumpAsText(); 21 'underline',
18 for (i = 0; i < 6; i++) 22 '<div contenteditable style="text-decoration: underline">^abc|</div>'),
19 typeCharacterCommand(); 23 'Underline command does nothing when selected text has undeline (inline) .');
20 typeCharacterCommand(' ');
21 for (i = 0; i < 6; i++)
22 typeCharacterCommand();
23 typeCharacterCommand(' ');
24 for (i = 0; i < 6; i++)
25 typeCharacterCommand();
26 moveSelectionBackwardByWordCommand();
27 moveSelectionBackwardByWordCommand();
28 extendSelectionForwardByWordCommand();
29 underlineCommand();
30 document.body.appendChild(document.createTextNode(document.getElementById('r oot').innerHTML));
31 }
32
33 </script> 24 </script>
34 <title>Editing Test</title>
35 </head>
36 <body>
37 <div contenteditable id="root" class="editing">
38 <span id="test"></span>
39 </div>
40 <script>
41 Markup.description('This tests removing underline from stylesheet (.editing has underline). Because text-decoration that comes from a style rule cannot be pushe d down, the underline should stay. (see bug 27809).');
42 runEditingTest();
43 Markup.dump('root');
44 </script>
45 </body>
46 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/platform/mac/editing/style/remove-underline-from-stylesheet-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698