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

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

Issue 2453723002: Convert editing/style/toggle-style-bold-italic-mixed-editability.html to utilize w3c test harness (Closed)
Patch Set: 2016-10-26T18:09:23 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-mixed-editability-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">This tests bold/italic style toggling for a content with mix ed editability</p> 4 <script src="../assert_selection.js"></script>
5 <div contenteditable id="root">
6 <div id="test">
7 Editable <span contenteditable=false>Non-editable</span> Editable
8 </div>
9 </div>
10 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script >
11 <script> 5 <script>
12 test('mac'); 6 test(() => assert_selection(
13 test('win'); 7 [
14 test('unix'); 8 '<div contenteditable>',
15 function test(platform) { 9 '^abc <span contenteditable="false">def</span> ghi|',
16 if (window.internals) 10 '</div>',
17 internals.settings.setEditingBehavior(platform); 11 ].join(''),
18 startNewMarkupGroup('Test for '+platform); 12 'bold',
19 runDumpAsTextEditingTest(true); 13 [
20 } 14 '<div contenteditable>',
21 function editingTest() { 15 '<b>^abc </b><span contenteditable="false">def</span><b> ghi|</b>',
22 execSelectAllCommand(); 16 '</div>',
23 execBoldCommand(); 17 ].join('')),
24 execItalicCommand(); 18 'bold');
25 execBoldCommand(); 19
26 execItalicCommand(); 20 test(() => assert_selection(
27 } 21 [
22 '<div contenteditable>',
23 '^abc <span contenteditable="false">def</span> ghi|',
24 '</div>',
25 ].join(''),
26 selection => {
27 selection.document.execCommand('bold');
28 selection.document.execCommand('italic');
29 },
30 [
31 '<div contenteditable>',
32 '<b><i>^abc </i></b>',
33 '<span contenteditable="false">def</span>',
34 '<b><i> ghi|</i></b>',
35 '</div>',
36 ].join('')),
37 'bold+italic');
38
39 test(() => assert_selection(
40 [
41 '<div contenteditable>',
42 '^abc <span contenteditable="false">def</span> ghi|',
43 '</div>',
44 ].join(''),
45 selection => {
46 selection.document.execCommand('bold');
47 selection.document.execCommand('italic');
48 selection.document.execCommand('bold');
49 },
50 [
51 '<div contenteditable>',
52 '<i>^abc </i>',
53 '<span contenteditable="false">def</span>',
54 '<i> ghi|</i>',
55 '</div>',
56 ].join('')),
57 'bold+italic+bold');
58
59 test(() => assert_selection(
60 [
61 '<div contenteditable>',
62 '^abc <span contenteditable="false">def</span> ghi|',
63 '</div>',
64 ].join(''),
65 selection => {
66 selection.document.execCommand('bold');
67 selection.document.execCommand('italic');
68 selection.document.execCommand('bold');
69 selection.document.execCommand('italic');
70 },
71 [
72 '<div contenteditable>',
73 '^abc <span contenteditable="false">def</span> ghi|',
74 '</div>',
75 ].join('')),
76 'bold+italic+bold+italic');
28 </script> 77 </script>
29 </body>
30 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/style/toggle-style-bold-italic-mixed-editability-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698