Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector-protocol / heap-profiler / take-heap-snapshot.html
blob7d5d5047cb94514b217978142a057040099c63d4
1 <html>
2 <head>
3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
4 <script>
5 if (window.testRunner) {
6 testRunner.dumpAsText();
7 testRunner.waitUntilDone();
10 var fooRef;
11 function storeFunctionRefAndNavigateIFrame()
13 var frame = document.getElementById("myframe");
14 fooRef = frame.contentWindow.foo;
15 frame.src = "about:blank";
16 frame.onload = didNavigate;
19 function didNavigate()
21 runTest();
23 function test()
25 function didTakeHeapSnapshot(messageObject)
27 InspectorTest.log("SUCCESS: didTakeHeapSnapshot");
28 InspectorTest.completeTest();
31 InspectorTest.sendCommand("Profiler.takeHeapSnapshot", { "reportProgress": false }, didTakeHeapSnapshot);
33 </script>
34 </head>
35 <body>
36 <p>Test that heap profiler doesn't crash while taking snapshot on a page where iframe was navigated to a new location after
37 storing a hold of a function from the previous page. <a href="https://bugs.webkit.org/show_bug.cgi?id=103076">Bug 103076.</p>
38 <iframe id="myframe" src="resources/page-with-function.html" onload="storeFunctionRefAndNavigateIFrame()"></iframe>
39 </body>
40 </html>