[WK2] Small Caps font variant issue for Italic fonts
[framework/web/webkit-efl.git] / LayoutTests / editing / editability / empty-document-stylewithcss.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script>
5 if (window.testRunner)
6     testRunner.dumpAsText();
7
8 function runTest() {
9     document.designMode="on";
10     document.open();
11     window.getSelection().addRange(document.createRange());
12
13     var initialValue = document.queryCommandValue('StyleWithCSS');
14     document.execCommand("StyleWithCSS", false, !eval(initialValue));
15     document.writeln('hello');
16
17     document.open();
18     window.getSelection().addRange(document.createRange());
19     var valueAfterFirstNegation = document.queryCommandValue('StyleWithCSS');
20
21     document.execCommand("StyleWithCSS", false, !eval(valueAfterFirstNegation));
22     document.writeln('world');
23     var valueAfterSecondNegation = document.queryCommandValue('StyleWithCSS');
24
25     document.open();
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>');
29 }
30 </script>
31 </head>
32 <body onload="runTest()"></body>
33 </html>