Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: LayoutTests/editing/pasteboard/paste-removing-iframe.html

Issue 404483002: Revert of "Blink does not respect input.selectionStart and input.selectionEnd for some cases" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script> 3 <script>
4 if (window.testRunner) { 4 if (window.testRunner) {
5 testRunner.dumpAsText(); 5 testRunner.dumpAsText();
6 testRunner.waitUntilDone(); 6 testRunner.waitUntilDone();
7 } 7 }
8 8
9 function test() 9 function test()
10 { 10 {
11 var toRemove = document.getElementById("child"); 11 var toRemove = document.getElementById("child");
12 var childDocument = toRemove.contentDocument; 12 var childDocument = toRemove.contentDocument;
13 13
14 var textarea = childDocument.getElementById("target"); 14 var textarea = childDocument.getElementById("target");
15 textarea.addEventListener("input", function(evt) { 15 textarea.addEventListener("input", function(evt) {
16 toRemove.parentNode.removeChild(toRemove); 16 toRemove.parentNode.removeChild(toRemove);
17 if (window.testRunner) 17 if (window.testRunner)
18 window.testRunner.notifyDone(); 18 window.testRunner.notifyDone();
19 }); 19 });
20 20
21 var selection = childDocument.getSelection(); 21 var selection = childDocument.getSelection();
22 var data = childDocument.getElementById("data"); 22 var data = childDocument.getElementById("data");
23 selection.selectAllChildren(data); 23 selection.selectAllChildren(data);
24 childDocument.execCommand("copy"); 24 childDocument.execCommand("copy");
25 textarea.focus();
26 textarea.select(); 25 textarea.select();
27 childDocument.execCommand("paste"); 26 childDocument.execCommand("paste");
28 } 27 }
29 </script> 28 </script>
30 </head> 29 </head>
31 <body> 30 <body>
32 <!-- 31 <!--
33 -- This test removes an iframe with editable content 32 -- This test removes an iframe with editable content
34 -- during actually editing that editable text by handling DOM input event. 33 -- during actually editing that editable text by handling DOM input event.
35 -- WebKit should not crash even after this brutal removal. 34 -- WebKit should not crash even after this brutal removal.
36 --> 35 -->
37 <h1>PASS</h1> 36 <h1>PASS</h1>
38 <iframe id="child" onload="test()" src="resources/paste-removing-iframe-child.ht ml" /> 37 <iframe id="child" onload="test()" src="resources/paste-removing-iframe-child.ht ml" />
39 </body> 38 </body>
40 </html> 39 </html>
OLDNEW
« no previous file with comments | « LayoutTests/editing/inserting/4960120-1.html ('k') | LayoutTests/editing/pasteboard/pasting-tabs.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698