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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/style/style-3998892-fix.html

Issue 2183763003: Convert editing/style/style-3998892-fix.html to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/linux/editing/style/style-3998892-fix-expected.png » ('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 3 <script src="../../resources/testharnessreport.js"></script>
4 <style> 4 <script src="../assert_selection.js"></script>
5 .editing {
6 border: 2px solid red;
7 font-size: 24px;
8 }
9 .explanation {
10 border: 2px solid blue;
11 padding: 12px;
12 font-size: 24px;
13 margin-bottom: 24px;
14 }
15 .scenario { margin-bottom: 16px;}
16 .scenario:first-line { font-weight: bold; margin-bottom: 16px;}
17 .expected-results:first-line { font-weight: bold }
18 </style>
19 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script >
20
21 <script> 5 <script>
22 6 test(() => assert_selection(
23 function editingTest() { 7 '<div contenteditable><div>foo^</div><div>bar|</div></div>',
24 for (i = 0; i < 3; i++) 8 'bold',
25 moveSelectionForwardByCharacterCommand(); 9 '<div contenteditable><div>foo^</div><div><b>bar|</b></div></div>'),
26 extendSelectionForwardByLineCommand(); 10 'Bolding a selection from end of line should not change unselected text on s tarting line.');
27 boldCommand();
28 }
29
30 </script> 11 </script>
31
32 <title>Editing Test</title>
33 </head>
34 <body>
35
36 <div class="explanation">
37 <div class="scenario">
38 Tests:
39 <br>
40 Bug fix for <a href="rdar://problem/3998892">&lt;rdar://problem/3998892&gt;</a> REGRESSION (Mail): bolding a selection
41 from end of line changes unselected text on starting line.
42 </div>
43 <div class="expected-results">
44 Expected Results:
45 <br>
46 Should see first line ("foo") not bold; second line ("bar") bold.
47 </div>
48 </div>
49
50 <div contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: s pace; -khtml-line-break: after-white-space;">
51 <div id="test" class="editing">
52 <div>foo</div>
53 <div>bar</div>
54 </div>
55
56 <script>
57 runEditingTest();
58 </script>
59
60 </body>
61 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/platform/linux/editing/style/style-3998892-fix-expected.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698