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

Side by Side Diff: LayoutTests/fast/dom/insertedIntoDocument-iframe.html

Issue 221673003: Defer iframe JavaScript URL evaluation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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 gc = window.gc || function() 9 gc = window.gc || function()
10 { 10 {
11 if (window.GCController) 11 if (window.GCController)
12 return GCController.collect(); 12 return GCController.collect();
13 13
14 for (var i = 0; i < 10000; ++i) 14 for (var i = 0; i < 10000; ++i)
15 var s = new String("AAAA"); 15 var s = new String("AAAA");
16 } 16 }
17 17
18 window.onload = function() 18 window.onload = function()
19 { 19 {
20 parent = document.createElement("div"); 20 parent = document.createElement("div");
21 parent.innerHTML = "<iframe></iframe><element id='element'/>"; 21 parent.innerHTML = "<iframe></iframe><element id='element'/>";
22 22
23 iframe = parent.firstChild; 23 iframe = parent.firstChild;
24 iframe.src = "javascript:top.document.body.removeChild(top.parent)"; 24 iframe.src = "javascript:top.document.body.removeChild(top.parent)";
25 25 setTimeout(testAndFinish, 0);
26 }
27
28 testAndFinish = function()
29 {
26 document.body.appendChild(parent); 30 document.body.appendChild(parent);
27
28 parent = iframe = null; 31 parent = iframe = null;
29 gc(); 32 gc();
30 33
31 setTimeout(finishTest, 0); 34 setTimeout(finishTest, 0);
32 } 35 }
33 36
34 finishTest = function() 37 finishTest = function()
35 { 38 {
36 document.getElementById("element"); 39 document.getElementById("element");
37 40
38 if (window.testRunner) 41 if (window.testRunner)
39 testRunner.notifyDone(); 42 testRunner.notifyDone();
40 } 43 }
41 </script> 44 </script>
42 </head> 45 </head>
43 <body>PASS</body> 46 <body>PASS</body>
44 </html> 47 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698