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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/scoped/editing-commands.html

Issue 2750533007: Let insertNewLineInQuotedContent not do anything out of a quote element (Closed)
Patch Set: update Created 3 years, 9 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <body> 3 <body>
4 <p>This test ensures WebKit does not fire DOM mutation events while execCommand is in progress.</p> 4 <p>This test ensures WebKit does not fire DOM mutation events while execCommand is in progress.</p>
5 <div id="test" contenteditable></div> 5 <div id="test" contenteditable></div>
6 <pre> 6 <pre>
7 <script> 7 <script>
8 8
9 if (window.testRunner) 9 if (window.testRunner)
10 testRunner.dumpAsText(); 10 testRunner.dumpAsText();
11 11
12 var commands = [ 12 var commands = [
13 {name: 'BackColor', value: 'blue'}, 13 {name: 'BackColor', value: 'blue'},
14 {name: 'CreateLink', value: 'about:blank'}, 14 {name: 'CreateLink', value: 'about:blank'},
15 {name: 'Delete', value: null}, 15 {name: 'Delete', value: null},
16 {name: 'FontName', value: 'Arial'}, 16 {name: 'FontName', value: 'Arial'},
17 {name: 'FontSize', value: '5'}, 17 {name: 'FontSize', value: '5'},
18 {name: 'FontSizeDelta', value: '5'}, 18 {name: 'FontSizeDelta', value: '5'},
19 {name: 'ForeColor', value: 'blue'}, 19 {name: 'ForeColor', value: 'blue'},
20 {name: 'FormatBlock', value: 'pre'}, 20 {name: 'FormatBlock', value: 'pre'},
21 {name: 'ForwardDelete', value: null}, 21 {name: 'ForwardDelete', value: null},
22 {name: 'HiliteColor', value: 'red'}, 22 {name: 'HiliteColor', value: 'red'},
23 {name: 'Indent', value: null}, 23 {name: 'Indent', value: null},
24 {name: 'InsertHTML', value: "<i>hello</i>"}, 24 {name: 'InsertHTML', value: "<i>hello</i>"},
25 {name: 'InsertHorizontalRule', value: null}, 25 {name: 'InsertHorizontalRule', value: null},
26 {name: 'InsertImage', value: '../resources/abe.png'}, 26 {name: 'InsertImage', value: '../resources/abe.png'},
27 {name: 'InsertLineBreak', value: null}, 27 {name: 'InsertLineBreak', value: null},
28 {name: 'InsertNewlineInQuotedContent', value: null}, 28 {name: 'InsertNewlineInQuotedContent', value: null, selector: function (test ) { window.getSelection().collapse(document.querySelector('a'), 0); }},
29 {name: 'InsertOrderedList', value: null}, 29 {name: 'InsertOrderedList', value: null},
30 {name: 'InsertParagraph', value: null}, 30 {name: 'InsertParagraph', value: null},
31 {name: 'InsertText', value: 'webkit'}, 31 {name: 'InsertText', value: 'webkit'},
32 {name: 'InsertUnorderedList', value: null}, 32 {name: 'InsertUnorderedList', value: null},
33 {name: 'Italic', value: null}, 33 {name: 'Italic', value: null},
34 {name: 'JustifyCenter', value: null}, 34 {name: 'JustifyCenter', value: null},
35 {name: 'JustifyFull', value: null}, 35 {name: 'JustifyFull', value: null},
36 {name: 'JustifyLeft', value: null}, 36 {name: 'JustifyLeft', value: null},
37 {name: 'JustifyNone', value: null}, 37 {name: 'JustifyNone', value: null},
38 {name: 'JustifyRight', value: null}, 38 {name: 'JustifyRight', value: null},
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 if (log[0] != log[i]) { 76 if (log[0] != log[i]) {
77 console.log(log); 77 console.log(log);
78 return false; 78 return false;
79 } 79 }
80 } 80 }
81 return true; 81 return true;
82 } 82 }
83 83
84 addEventListeners(test); 84 addEventListeners(test);
85 85
86 var initial = 'hello, <input type="text"><blockquote align="right"><u><a href="a bout:blank">world</a></u></blockquote>'; 86 var initial = 'hello, <input type="text"><blockquote type="cite" align="right">< u><a href="about:blank">world</a></u></blockquote>';
yosin_UTC9 2017/03/17 09:27:02 Why do you add |type="cite"|?
yoichio 2017/03/21 03:48:07 Because InsertNewlineInQuotedContent inserts a bre
87 for (var i = 0; i < commands.length; i++) { 87 for (var i = 0; i < commands.length; i++) {
88 test.innerHTML = initial; 88 test.innerHTML = initial;
89 if (i) 89 if (i)
90 document.write("\n"); 90 document.write("\n");
91 91
92 if (test.innerHTML != initial) { 92 if (test.innerHTML != initial) {
93 document.write("FAIL: initial innerHTML didn't match"); 93 document.write("FAIL: initial innerHTML didn't match");
94 continue; 94 continue;
95 } 95 }
96 96
(...skipping 24 matching lines...) Expand all
121 if (!events[e]) 121 if (!events[e])
122 document.write('\nWARNING: ' + e + ' was never observed.'); 122 document.write('\nWARNING: ' + e + ' was never observed.');
123 } 123 }
124 124
125 document.write('\n\nDONE'); 125 document.write('\n\nDONE');
126 126
127 </script> 127 </script>
128 </pre> 128 </pre>
129 </body> 129 </body>
130 </html> 130 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698