6 testRunner
.dumpAsText();
9 document
.designMode
="on";
11 window
.getSelection().addRange(document
.createRange());
13 var initialValue
= document
.queryCommandValue('StyleWithCSS');
14 document
.execCommand("StyleWithCSS", false, !eval(initialValue
));
15 document
.writeln('hello');
18 window
.getSelection().addRange(document
.createRange());
19 var valueAfterFirstNegation
= document
.queryCommandValue('StyleWithCSS');
21 document
.execCommand("StyleWithCSS", false, !eval(valueAfterFirstNegation
));
22 document
.writeln('world');
23 var valueAfterSecondNegation
= document
.queryCommandValue('StyleWithCSS');
26 document
.writeln('This test ensures WebKit executes StyleWithCSS properly even in an empty document.<br>');
27 document
.write('First negation:' + (initialValue
!== valueAfterFirstNegation
? 'PASS' : 'FAIL') + '<br>');
28 document
.write('Second negation:' + (valueAfterFirstNegation
!== valueAfterSecondNegation
? 'PASS' : 'FAIL') + '<br>');
32 <body onload=
"runTest()"></body>