blob: 48c0a7b5d69b7fe7fd7d19dd36118ee1b757ac03 [file] [log] [blame]
<html>
<head>
<script src="../inspector-test.js"></script>
<script src="../resources-test.js"></script>
<script src="resource-tree-test.js"></script>
<link rel="stylesheet" href="resources/styles-initial.css">
<script>
function navigateIframe()
{
var iframe = document.getElementById("iframe");
iframe.removeAttribute("onload");
iframe.onload = onIframeLoad;
iframe.setAttribute("src", "resources/resource-tree-frame-navigate-iframe-after.html");
document.body.appendChild(iframe);
}
function onIframeLoad()
{
console.log("iframe navigated");
}
function test()
{
WebInspector.showPanel("resources");
InspectorTest.runAfterResourcesAreFinished(["resource-tree-frame-navigate-iframe-before.html", "script-initial.js", "styles-initial.css", "styles-initial-2.css"], step1);
function step1()
{
InspectorTest.addResult("Before navigation");
InspectorTest.addResult("====================================");
InspectorTest.dumpResourceTreeEverything();
InspectorTest.addConsoleSniffer(step2);
InspectorTest.evaluateInPage("navigateIframe()");
}
function step2()
{
InspectorTest.runAfterResourcesAreFinished(["resource-tree-frame-navigate-iframe-after.html", "styles-navigated.css", "script-navigated.js"], step3);
}
function step3()
{
InspectorTest.addResult("");
InspectorTest.addResult("After navigation");
InspectorTest.addResult("====================================");
InspectorTest.dumpResourceTreeEverything();
InspectorTest.completeTest();
}
}
</script>
</head>
<body>
<p>
Tests resource tree model on iframe navigation, compares resource tree against golden. Every line is important.
</p>
<iframe id="iframe" src="resources/resource-tree-frame-navigate-iframe-before.html" onload="runTest()">
</body>
</html>