OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <p id="description"></p> | 7 <p id="description"></p> |
8 <div id="console"></div> | 8 <div id="console"></div> |
9 <script> | 9 <script> |
10 description('Test styleWithCSS command'); | 10 description('Test styleWithCSS command'); |
(...skipping 12 matching lines...) Expand all Loading... |
23 testStyleWithCSS('FALSE', false); | 23 testStyleWithCSS('FALSE', false); |
24 testStyleWithCSS('random string', true); | 24 testStyleWithCSS('random string', true); |
25 testStyleWithCSS(null, true); | 25 testStyleWithCSS(null, true); |
26 | 26 |
27 document.execCommand('styleWithCSS', false, true); | 27 document.execCommand('styleWithCSS', false, true); |
28 if (document.queryCommandState('styleWithCSS') === true) | 28 if (document.queryCommandState('styleWithCSS') === true) |
29 testPassed("queryCommandState('styleWithCSS') returns true"); | 29 testPassed("queryCommandState('styleWithCSS') returns true"); |
30 else | 30 else |
31 testFailed("queryCommandState('styleWithCSS') should return boolean true"); | 31 testFailed("queryCommandState('styleWithCSS') should return boolean true"); |
32 | 32 |
33 if (document.queryCommandValue('styleWithCSS') === 'true') | 33 if (document.queryCommandValue('styleWithCSS') === '') |
34 testPassed("queryCommandValue('styleWithCSS') returns 'true'"); | 34 testPassed("queryCommandValue('styleWithCSS') returns ''"); |
35 else | 35 else |
36 testFailed("queryCommandValue('styleWithCSS') should return 'true'"); | 36 testFailed("queryCommandValue('styleWithCSS') should return ''"); |
37 | 37 |
38 document.execCommand('styleWithCSS', false, false); | 38 document.execCommand('styleWithCSS', false, false); |
39 if (document.queryCommandState('styleWithCSS') === false) | 39 if (document.queryCommandState('styleWithCSS') === false) |
40 testPassed("queryCommandState('styleWithCSS') returns false"); | 40 testPassed("queryCommandState('styleWithCSS') returns false"); |
41 else | 41 else |
42 testFailed("queryCommandState('styleWithCSS') should return boolean false"); | 42 testFailed("queryCommandState('styleWithCSS') should return boolean false"); |
43 | 43 |
44 if (document.queryCommandValue('styleWithCSS') === 'false') | 44 if (document.queryCommandValue('styleWithCSS') === '') |
45 testPassed("queryCommandValue('styleWithCSS') returns 'false'"); | 45 testPassed("queryCommandValue('styleWithCSS') returns ''"); |
46 else | 46 else |
47 testFailed("queryCommandValue('styleWithCSS') should return 'false'"); | 47 testFailed("queryCommandValue('styleWithCSS') should return ''"); |
48 | 48 |
49 </script> | 49 </script> |
50 </body> | 50 </body> |
51 </html> | 51 </html> |
OLD | NEW |