Title: [241063] branches/safari-607-branch/Tools
Revision
241063
Author
[email protected]
Date
2019-02-06 14:16:37 -0800 (Wed, 06 Feb 2019)

Log Message

Cherry-pick r240695. rdar://problem/47776355

    REGRESSION: ProcessSwap.DoSameSiteNavigationAfterCrossSiteProvisionalLoadStarted Failing on iOS
    https://bugs.webkit.org/show_bug.cgi?id=193977
    <rdar://problem/47643716>

    Reviewed by Geoff Garen.

    Update API test to address flakiness on iOS. Instead of doing the last navigation after receiving the
    didStartProvisionalLoad, do we right after we answer the navigation policy request. Flakiness was due
    to the previous provisional committing *before* we make the last load.

    * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240695 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-607-branch/Tools/ChangeLog (241062 => 241063)


--- branches/safari-607-branch/Tools/ChangeLog	2019-02-06 22:16:34 UTC (rev 241062)
+++ branches/safari-607-branch/Tools/ChangeLog	2019-02-06 22:16:37 UTC (rev 241063)
@@ -1,5 +1,38 @@
 2019-02-05  Alan Coon  <[email protected]>
 
+        Cherry-pick r240695. rdar://problem/47776355
+
+    REGRESSION: ProcessSwap.DoSameSiteNavigationAfterCrossSiteProvisionalLoadStarted Failing on iOS
+    https://bugs.webkit.org/show_bug.cgi?id=193977
+    <rdar://problem/47643716>
+    
+    Reviewed by Geoff Garen.
+    
+    Update API test to address flakiness on iOS. Instead of doing the last navigation after receiving the
+    didStartProvisionalLoad, do we right after we answer the navigation policy request. Flakiness was due
+    to the previous provisional committing *before* we make the last load.
+    
+    * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-01-29  Chris Dumez  <[email protected]>
+
+            REGRESSION: ProcessSwap.DoSameSiteNavigationAfterCrossSiteProvisionalLoadStarted Failing on iOS
+            https://bugs.webkit.org/show_bug.cgi?id=193977
+            <rdar://problem/47643716>
+
+            Reviewed by Geoff Garen.
+
+            Update API test to address flakiness on iOS. Instead of doing the last navigation after receiving the
+            didStartProvisionalLoad, do we right after we answer the navigation policy request. Flakiness was due
+            to the previous provisional committing *before* we make the last load.
+
+            * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
+
+2019-02-05  Alan Coon  <[email protected]>
+
         Cherry-pick r240675. rdar://problem/47776350
 
     Regression (r240046): [PSON] Spurious changes to [WKWebView url] and [WKWebView loading] after [WKWebView loadRequest]

Modified: branches/safari-607-branch/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm (241062 => 241063)


--- branches/safari-607-branch/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm	2019-02-06 22:16:34 UTC (rev 241062)
+++ branches/safari-607-branch/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm	2019-02-06 22:16:37 UTC (rev 241063)
@@ -2448,6 +2448,8 @@
     auto delegate = adoptNS([[PSONNavigationDelegate alloc] init]);
     [webView setNavigationDelegate:delegate.get()];
 
+    [webView configuration].preferences.safeBrowsingEnabled = NO;
+
     NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main1.html"]];
     [webView loadRequest:request];
 
@@ -2456,14 +2458,14 @@
 
     auto webkitPID = [webView _webProcessIdentifier];
 
-    didStartProvisionalLoad = false;
-    request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]];
-    [webView loadRequest:request];
+    delegate->decidePolicyForNavigationAction = ^(WKNavigationAction *, void (^decisionHandler)(WKNavigationActionPolicy)) {
+        decisionHandler(WKNavigationActionPolicyAllow);
 
-    TestWebKitAPI::Util::run(&didStartProvisionalLoad);
-    didStartProvisionalLoad = false;
+        delegate->decidePolicyForNavigationAction = nil;
+        [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main2.html"]]];
+    };
 
-    request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main2.html"]];
+    request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]];
     [webView loadRequest:request];
 
     TestWebKitAPI::Util::run(&done);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to