blob: 7d5d5047cb94514b217978142a057040099c63d4 [file] [log] [blame]
<html>
<head>
<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
var fooRef;
function storeFunctionRefAndNavigateIFrame()
{
var frame = document.getElementById("myframe");
fooRef = frame.contentWindow.foo;
frame.src = "about:blank";
frame.onload = didNavigate;
}
function didNavigate()
{
runTest();
}
function test()
{
function didTakeHeapSnapshot(messageObject)
{
InspectorTest.log("SUCCESS: didTakeHeapSnapshot");
InspectorTest.completeTest();
}
InspectorTest.sendCommand("Profiler.takeHeapSnapshot", { "reportProgress": false }, didTakeHeapSnapshot);
}
</script>
</head>
<body>
<p>Test that heap profiler doesn't crash while taking snapshot on a page where iframe was navigated to a new location after
storing a hold of a function from the previous page. <a href="https://bugs.webkit.org/show_bug.cgi?id=103076">Bug 103076.</p>
<iframe id="myframe" src="resources/page-with-function.html" onload="storeFunctionRefAndNavigateIFrame()"></iframe>
</body>
</html>