Title: [229502] trunk/LayoutTests
- Revision
- 229502
- Author
- [email protected]
- Date
- 2018-03-09 21:27:42 -0800 (Fri, 09 Mar 2018)
Log Message
inspector/page/frameScheduledNavigation.html has different output with async policy delegates
https://bugs.webkit.org/show_bug.cgi?id=183469
Reviewed by Ryosuke Niwa.
The test tracks 3 internal events:
1. frameScheduledNavigation
2. frameStartedLoading
3. frameClearedScheduledNavigation
Without async policy delegates, the events happen in this order. However, with asynchronous
policy delegates, frameStartedLoading happens *after* frameClearedScheduledNavigation. What
happens *before* frameClearedScheduledNavigation is the navigation policy check. When we
get the policy response to continue (asynchronously), we then actually start the load and
frameStartedLoading gets logged.
* inspector/page/frameScheduledNavigation-async-delegates-expected.txt: Added.
* inspector/page/frameScheduledNavigation-async-delegates.html: Copied from LayoutTests/inspector/page/frameScheduledNavigation.html.
* inspector/page/frameScheduledNavigation.html:
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (229501 => 229502)
--- trunk/LayoutTests/ChangeLog 2018-03-10 04:44:56 UTC (rev 229501)
+++ trunk/LayoutTests/ChangeLog 2018-03-10 05:27:42 UTC (rev 229502)
@@ -1,3 +1,25 @@
+2018-03-09 Chris Dumez <[email protected]>
+
+ inspector/page/frameScheduledNavigation.html has different output with async policy delegates
+ https://bugs.webkit.org/show_bug.cgi?id=183469
+
+ Reviewed by Ryosuke Niwa.
+
+ The test tracks 3 internal events:
+ 1. frameScheduledNavigation
+ 2. frameStartedLoading
+ 3. frameClearedScheduledNavigation
+
+ Without async policy delegates, the events happen in this order. However, with asynchronous
+ policy delegates, frameStartedLoading happens *after* frameClearedScheduledNavigation. What
+ happens *before* frameClearedScheduledNavigation is the navigation policy check. When we
+ get the policy response to continue (asynchronously), we then actually start the load and
+ frameStartedLoading gets logged.
+
+ * inspector/page/frameScheduledNavigation-async-delegates-expected.txt: Added.
+ * inspector/page/frameScheduledNavigation-async-delegates.html: Copied from LayoutTests/inspector/page/frameScheduledNavigation.html.
+ * inspector/page/frameScheduledNavigation.html:
+
2018-03-09 Chris Fleizach <[email protected]>
AX: WebKit seems to be running spell checker even on non-editable content text
Added: trunk/LayoutTests/inspector/page/frameScheduledNavigation-async-delegates-expected.txt (0 => 229502)
--- trunk/LayoutTests/inspector/page/frameScheduledNavigation-async-delegates-expected.txt (rev 0)
+++ trunk/LayoutTests/inspector/page/frameScheduledNavigation-async-delegates-expected.txt 2018-03-10 05:27:42 UTC (rev 229502)
@@ -0,0 +1,5 @@
+
+Scheduled navigation with delay 0
+Started loading
+Cleared scheduled navigation
+
Copied: trunk/LayoutTests/inspector/page/frameScheduledNavigation-async-delegates.html (from rev 229501, trunk/LayoutTests/inspector/page/frameScheduledNavigation.html) (0 => 229502)
--- trunk/LayoutTests/inspector/page/frameScheduledNavigation-async-delegates.html (rev 0)
+++ trunk/LayoutTests/inspector/page/frameScheduledNavigation-async-delegates.html 2018-03-10 05:27:42 UTC (rev 229502)
@@ -0,0 +1,50 @@
+<html>
+<head>
+<script src=""
+<script>
+
+if (window.testRunner && testRunner.setShouldDecideNavigationPolicyAfterDelay)
+ testRunner.setShouldDecideNavigationPolicyAfterDelay(true);
+
+function load()
+{
+ document.querySelector("iframe").src = ""
+}
+
+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>
Modified: trunk/LayoutTests/inspector/page/frameScheduledNavigation.html (229501 => 229502)
--- trunk/LayoutTests/inspector/page/frameScheduledNavigation.html 2018-03-10 04:44:56 UTC (rev 229501)
+++ trunk/LayoutTests/inspector/page/frameScheduledNavigation.html 2018-03-10 05:27:42 UTC (rev 229502)
@@ -22,14 +22,18 @@
function onStarted(msg)
{
- // This event should be received before the scheduled navigation is cleared.
ProtocolTest.log("Started loading");
+ ProtocolTest.wasStarted = true;
+ if (ProtocolTest.wasCleared)
+ ProtocolTest.completeTest();
}
function onCleared(msg)
{
ProtocolTest.log("Cleared scheduled navigation");
- ProtocolTest.completeTest();
+ ProtocolTest.wasCleared = true;
+ if (ProtocolTest.wasStarted)
+ ProtocolTest.completeTest();
}
InspectorProtocol.sendCommand("Runtime.evaluate", { "_expression_": "load()" });
Added: trunk/LayoutTests/platform/wk2/inspector/page/frameScheduledNavigation-async-delegates-expected.txt (0 => 229502)
--- trunk/LayoutTests/platform/wk2/inspector/page/frameScheduledNavigation-async-delegates-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/wk2/inspector/page/frameScheduledNavigation-async-delegates-expected.txt 2018-03-10 05:27:42 UTC (rev 229502)
@@ -0,0 +1,5 @@
+
+Scheduled navigation with delay 0
+Cleared scheduled navigation
+Started loading
+
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes