Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / undo / undo-after-removing-iframe.html
blob42a63601ef1b695b2c78cb587ba6ec287164be0e
1 <!DOCTYPE html>
2 <div id="container">
3 <p id="description"></p>
4 <div id="sample" contenteditable="true">Foo</div>
5 <iframe id="iframe"></iframe>
6 </div>
7 <div id="console"></div>
8 <script src="../../resources/js-test.js"></script>
9 <script>
10 description('Check we can undo after removing iframe.');
11 function $(id) { return document.getElementById(id); }
13 var doc = $('iframe').contentDocument;
14 doc.designMode = 'on';
15 doc.execCommand('SelectAll');
16 doc.execCommand('InsertHTML', false, 'ONE<iframe id="iframe1"></iframe>');
18 window.getSelection().collapse($('sample'), 0);
19 document.execCommand('InsertHTML', false, 'One');
20 document.execCommand('InsertHTML', false, 'Two');
21 document.execCommand('InsertHTML', false, 'Three');
23 doc.execCommand('InsertHTML', false, 'TWO<iframe id="iframe2"></iframe>');
24 doc.execCommand('InsertHTML', false, 'THREE<iframe id="iframe3"></iframe>');
25 doc.execCommand('Undo'); // Undo 'THREE'; remove IFRAME
26 doc.execCommand('Undo'); // Undo 'TWO'; remove IFRAME
27 shouldBeEqualToString('doc.body.innerHTML', 'ONE<iframe id="iframe1"></iframe>');
29 document.execCommand('Undo'); // Undo 'Three'
30 $('iframe').remove();
32 document.execCommand('Undo'); // Undo 'Two'
33 shouldBeEqualToString('$("sample").textContent', 'OneFoo');
35 if (window.testRunner)
36 $('container').outerHTML = '';
37 </script>