| <script src="../../http/tests/inspector/resources/protocol-test.js"></script> |
| if (window.testRunner && testRunner.setShouldDecideNavigationPolicyAfterDelay) |
| testRunner.setShouldDecideNavigationPolicyAfterDelay(true); |
| document.querySelector("iframe").src = "resources/blank.html"; |
| 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); |
| ProtocolTest.log("Started loading"); |
| ProtocolTest.wasStarted = true; |
| if (ProtocolTest.wasCleared) |
| ProtocolTest.completeTest(); |
| ProtocolTest.log("Cleared scheduled navigation"); |
| ProtocolTest.wasCleared = true; |
| if (ProtocolTest.wasStarted) |
| ProtocolTest.completeTest(); |
| InspectorProtocol.sendCommand("Runtime.evaluate", { "expression": "load()" }); |
| <body onload="runTest()"> |