| OLD | NEW |
| 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> |
| OLD | NEW |