Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / style / stylewithcss-without-selection.html
blobb390073373b61838f2c5edb31ae5d0fa0ddf1bbc
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <p>This is a test of styleWithCSS.</p>
5 <div id="test" contenteditable>
6 hello
7 </div>
8 <script>
10 if (window.testRunner)
11 testRunner.dumpAsText();
13 var test = document.getElementById('test');
14 document.execCommand('styleWithCSS', false, true);
15 window.getSelection().selectAllChildren(test);
16 document.execCommand('bold', false, null);
17 var firstInnerHTML = test.innerHTML;
19 document.execCommand('undo', false, null);
20 document.execCommand('styleWithCSS', false, true);
21 document.execCommand('bold', false, null);
23 var result = 'PASS';
24 if (firstInnerHTML != test.innerHTML)
25 result = 'FAIL: ' + firstInnerHTML + ' does not match ' + test.innerHTML;
26 document.body.appendChild(document.createTextNode(result));
28 </script>
29 </body>
30 </html>