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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/style/toggle-style-bold-italic.html

Issue 2453463007: Convert editing/style/toggle-style-bold-italic.html to utilize w3c test harness (Closed)
Patch Set: 2016-10-27T14:52:51 Created 4 years, 1 month 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/editing/style/toggle-style-bold-italic-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 <!DOCTYPE html> 1 <!doctype html>
2 <html> 2 <script src="../../resources/testharness.js"></script>
3 <body> 3 <script src="../../resources/testharnessreport.js"></script>
4 <p id="description">Tests bold/italic style toggling on a content that has text node without renderer (Ex: Tab/Space used for indentation)</p> 4 <script src="../assert_selection.js"></script>
5 <div contenteditable id="root">
6 <div id="test">
7 <div>Some text</div>
8 <p>Some more text</p>
9 </div>
10 </div>
11 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script >
12 <script> 5 <script>
13 test('mac'); 6 test(() => assert_selection(
14 test('win'); 7 [
15 test('unix'); 8 '<div contenteditable>^',
16 function test(platform) { 9 ' <div>abc def</div>',
17 if (window.internals) 10 ' <p>ghi jkl|</p>',
18 internals.settings.setEditingBehavior(platform); 11 '</div>',
19 startNewMarkupGroup('Test for '+platform); 12 ].join('\n'),
20 runDumpAsTextEditingTest(true); 13 'bold',
21 } 14 [
22 function editingTest() { 15 '<div contenteditable>',
23 execSelectAllCommand(); 16 ' <div><b>^abc def</b></div>',
24 execBoldCommand(); 17 ' <p><b>ghi jkl|</b></p>',
25 execItalicCommand(); 18 '</div>',
26 execBoldCommand(); 19 ].join('\n')),
27 execItalicCommand(); 20 'bold');
28 } 21
22 test(() => assert_selection(
23 [
24 '<div contenteditable>^',
25 ' <div>abc def</div>',
26 ' <p>ghi jkl|</p>',
27 '</div>',
28 ].join('\n'),
29 selection => {
30 selection.document.execCommand('bold');
31 selection.document.execCommand('italic');
32 },
33 [
34 '<div contenteditable>',
35 ' <div><b><i>^abc def</i></b></div>',
36 ' <p><b><i>ghi jkl|</i></b></p>',
37 '</div>',
38 ].join('\n')),
39 'bold+italic');
40
41 test(() => assert_selection(
42 [
43 '<div contenteditable>^',
44 ' <div>abc def</div>',
45 ' <p>ghi jkl|</p>',
46 '</div>',
47 ].join('\n'),
48 selection => {
49 selection.document.execCommand('bold');
50 selection.document.execCommand('italic');
51 selection.document.execCommand('bold');
52 },
53 [
54 '<div contenteditable>',
55 ' <div><i>^abc def</i></div>',
56 ' <p><i>ghi jkl|</i></p>',
57 '</div>',
58 ].join('\n')),
59 'bold+italic+bold');
60
61 test(() => assert_selection(
62 [
63 '<div contenteditable>^',
64 ' <div>abc def</div>',
65 ' <p>ghi jkl|</p>',
66 '</div>',
67 ].join('\n'),
68 selection => {
69 selection.document.execCommand('bold');
70 selection.document.execCommand('italic');
71 selection.document.execCommand('bold');
72 selection.document.execCommand('italic');
73 },
74 [
75 '<div contenteditable>',
76 ' <div>^abc def</div>',
77 ' <p>ghi jkl|</p>',
78 '</div>',
79 ].join('\n')),
80 'bold+italic+bold+italic');
29 </script> 81 </script>
30 </body>
31 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/style/toggle-style-bold-italic-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698