Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / execCommand / remove-format-image.html
blob44e0a4091bc094de76b861116082596ebf330835
1 <!DOCTYPE html>
2 <html>
3 <body onload="runTests();">
4 <script src="../../resources/dump-as-markup.js"></script>
5 <div id="test1" contenteditable><strong>hello</strong> <img src="../resources/abe.png"> world</div>
6 <div id="test2" contenteditable><img src="../resources/abe.png"></div>
7 <script>
9 function runTests() {
10 Markup.description('This tests RemoveFormant command not removing an image. You should see one image element in each of the test results');
11 window.getSelection().selectAllChildren(document.getElementById('test1'));
12 document.execCommand('RemoveFormat', false, null);
13 Markup.dump('test1', 'An image between text');
15 window.getSelection().selectAllChildren(document.getElementById('test2'));
16 document.execCommand('RemoveFormat', false, null);
17 document.execCommand('JustifyNone', false, null);
18 document.execCommand('FormatBlock', false, 'p');
19 Markup.dump('test2', 'RemoveFormat on an image followed by JustifyNone and FormatBlock with p.');
21 Markup.notifyDone();
24 Markup.waitUntilDone();
26 </script>
27 </body>
28 </html>