blob: ffb047ea642d03ebb52156aeb3b615b3109e1aa5 [file] [log] [blame]
<html>
<head>
<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
<script>
function load()
{
document.querySelector("iframe").src = "resources/blank.html";
}
function test()
{
InspectorProtocol.eventHandler["Page.frameScheduledNavigation"] = onScheduled;
InspectorProtocol.eventHandler["Page.frameStartedLoading"] = onStarted;
InspectorProtocol.eventHandler["Page.frameClearedScheduledNavigation"] = onCleared;
InspectorProtocol.sendCommand("Page.enable", {});
function onScheduled(msg)
{
ProtocolTest.log("Scheduled navigation with delay " + msg.params.delay);
}
function onStarted(msg)
{
ProtocolTest.log("Started loading");
ProtocolTest.wasStarted = true;
if (ProtocolTest.wasCleared)
ProtocolTest.completeTest();
}
function onCleared(msg)
{
ProtocolTest.log("Cleared scheduled navigation");
ProtocolTest.wasCleared = true;
if (ProtocolTest.wasStarted)
ProtocolTest.completeTest();
}
InspectorProtocol.sendCommand("Runtime.evaluate", { "expression": "load()" });
}
</script>
</head>
<body onload="runTest()">
<iframe>
</body>
</html>