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

Side by Side Diff: LayoutTests/loader/iframe-src-change-onload-crash.html

Issue 19962002: Protect documents from deletion when their onload removes them (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script>
5 function start() {
6 if (window.testRunner) {
7 testRunner.dumpAsText();
8 testRunner.waitUntilDone();
9 }
10 iframeElmt = document.createElement('iframe');
11 iframeElmt.src = 'resources/empty.xml';
12 window.setTimeout('window.top.do_test()', 0);
13 }
14
15 function do_test() {
16 window.top.cb_onload_count = 0;
17 window.top.conce = function() {
18 window.top.cb_onload_count++;
19 var f = eval('window.top.cb_onload_' + window.top.cb_onload_count);
20 if (f) return f(arguments, this);
21 };
22
23 iframeElmt.onload = window.top.conce;
24
25 document.body.appendChild(iframeElmt);
26 }
27
28 function cb_onload_1() {
29 iframeElmt = arguments[1];
30 iframeElmt.src = 'javascript:window.top.cb_scriptsrc();';
31 }
32
33 function cb_scriptsrc() {
34 return 'X';
35 }
36
37 function cb_onload_2() {
38 gc();
39 if (window.testRunner) {
40 testRunner.notifyDone();
41 }
42 }
43 </script>
44 </head>
45 <body onload="start()">
46 <p>Test PASSES if it does not crash in ASAN builds.</p>
47 </body>
48 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/loader/iframe-src-change-onload-crash-expected.txt » ('j') | Source/core/dom/Document.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698