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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/editability/empty-document-stylewithcss.html

Issue 2775503005: Editing: queryCommandValue("stylewithcss") should always return an empty string. (Closed)
Patch Set: . 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/execCommand/reset-values-after-navigation.html » ('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 <html>
3 <head> 3 <head>
4 <script> 4 <script>
5 if (window.testRunner) 5 if (window.testRunner)
6 testRunner.dumpAsText(); 6 testRunner.dumpAsText();
7 7
8 function runTest() { 8 function runTest() {
9 document.designMode="on"; 9 document.designMode="on";
10 document.open(); 10 document.open();
11 window.getSelection().addRange(document.createRange()); 11 window.getSelection().addRange(document.createRange());
12 12
13 var initialValue = document.queryCommandValue('StyleWithCSS'); 13 var initialValue = document.queryCommandState('StyleWithCSS');
14 document.execCommand("StyleWithCSS", false, !eval(initialValue)); 14 document.execCommand("StyleWithCSS", false, !eval(initialValue));
15 document.writeln('hello'); 15 document.writeln('hello');
16 16
17 document.open(); 17 document.open();
18 window.getSelection().addRange(document.createRange()); 18 window.getSelection().addRange(document.createRange());
19 var valueAfterFirstNegation = document.queryCommandValue('StyleWithCSS'); 19 var valueAfterFirstNegation = document.queryCommandState('StyleWithCSS');
20 20
21 document.execCommand("StyleWithCSS", false, !eval(valueAfterFirstNegation)); 21 document.execCommand("StyleWithCSS", false, !eval(valueAfterFirstNegation));
22 document.writeln('world'); 22 document.writeln('world');
23 var valueAfterSecondNegation = document.queryCommandValue('StyleWithCSS'); 23 var valueAfterSecondNegation = document.queryCommandState('StyleWithCSS');
24 24
25 document.open(); 25 document.open();
26 document.writeln('This test ensures WebKit executes StyleWithCSS properly ev en in an empty document.<br>'); 26 document.writeln('This test ensures WebKit executes StyleWithCSS properly ev en in an empty document.<br>');
27 document.write('First negation:' + (initialValue !== valueAfterFirstNegation ? 'PASS' : 'FAIL') + '<br>'); 27 document.write('First negation:' + (initialValue !== valueAfterFirstNegation ? 'PASS' : 'FAIL') + '<br>');
28 document.write('Second negation:' + (valueAfterFirstNegation !== valueAfterS econdNegation ? 'PASS' : 'FAIL') + '<br>'); 28 document.write('Second negation:' + (valueAfterFirstNegation !== valueAfterS econdNegation ? 'PASS' : 'FAIL') + '<br>');
29 } 29 }
30 </script> 30 </script>
31 </head> 31 </head>
32 <body onload="runTest()"></body> 32 <body onload="runTest()"></body>
33 </html> 33 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/execCommand/reset-values-after-navigation.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698