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

Side by Side Diff: third_party/WebKit/LayoutTests/html/sections/body-inserting-iframe-crash.html

Issue 2669403002: Move tests for sections elements to html/sections/. (Closed)
Patch Set: Created 3 years, 10 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
OLDNEW
1 <script> 1 <script>
2 if (window.testRunner) 2 if (window.testRunner)
3 testRunner.dumpAsText(); 3 testRunner.dumpAsText();
4 4
5 var iframe = null; 5 var iframe = null;
6 6
7 function start() { 7 function start() {
8 iframe = document.createElement('iframe'); 8 iframe = document.createElement('iframe');
9 iframe.setAttribute('marginwidth', 1); 9 iframe.setAttribute('marginwidth', 1);
10 document.body.appendChild(iframe); 10 document.body.appendChild(iframe);
11 11
12 var bodyInFrame = document.createElement('body'); 12 var bodyInFrame = document.createElement('body');
13 bodyInFrame.addEventListener('DOMSubtreeModified', removeIframe); 13 bodyInFrame.addEventListener('DOMSubtreeModified', removeIframe);
14 iframe.contentDocument.documentElement.appendChild(bodyInFrame); 14 iframe.contentDocument.documentElement.appendChild(bodyInFrame);
15 document.body.innerHTML = 'PASS if not crashed.'; 15 document.body.innerHTML = 'PASS if not crashed.';
16 } 16 }
17 17
18 function removeIframe() { 18 function removeIframe() {
19 iframe.parentNode.removeChild(iframe); 19 iframe.parentNode.removeChild(iframe);
20 iframe = null; 20 iframe = null;
21 gc(); 21 gc();
22 } 22 }
23 </script> 23 </script>
24 <body onload="start()"> 24 <body onload="start()">
25 </body> 25 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698