Failed TestWebKitAPI.ProcessSwap.NavigateToInvalidURL Received data during response processing, queuing it. /Volumes/Data/slave/ios-simulator-12-release/build/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:2382 Expected equality of these values: 2 numberOfDecidePolicyCalls Which is: 1 https://build.webkit.org/builders/Apple%20iOS%2012%20Simulator%20Release%20WK2%20%28Tests%29/builds/959/steps/run-api-tests/logs/stdio
I think this regressed with https://trac.webkit.org/changeset/238115
TEST(ProcessSwap, NavigateToInvalidURL) { auto processPoolConfiguration = adoptNS([[_WKProcessPoolConfiguration alloc] init]); processPoolConfiguration.get().processSwapsOnNavigation = YES; auto processPool = adoptNS([[WKProcessPool alloc] _initWithConfiguration:processPoolConfiguration.get()]); auto webViewConfiguration = adoptNS([[WKWebViewConfiguration alloc] init]); [webViewConfiguration setProcessPool:processPool.get()]; auto handler = adoptNS([[PSONScheme alloc] initWithBytes:navigateToInvalidURLTestBytes]); [webViewConfiguration setURLSchemeHandler:handler.get() forURLScheme:@"PSON"]; auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:webViewConfiguration.get()]); auto navigationDelegate = adoptNS([[PSONNavigationDelegate alloc] init]); [webView setNavigationDelegate:navigationDelegate.get()]; auto uiDelegate = adoptNS([[PSONUIDelegate alloc] initWithNavigationDelegate:navigationDelegate.get()]); [webView setUIDelegate:uiDelegate.get()]; numberOfDecidePolicyCalls = 0; [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]]; TestWebKitAPI::Util::run(&done); done = false; auto pid1 = [webView _webProcessIdentifier]; EXPECT_TRUE(!!pid1); TestWebKitAPI::Util::run(&didReceiveAlert); didReceiveAlert = false; auto pid2 = [webView _webProcessIdentifier]; EXPECT_TRUE(!!pid2); EXPECT_EQ(2, numberOfDecidePolicyCalls); EXPECT_EQ(pid1, pid2); } Since the safe browsing check, we're getting one decidePolicyForNavigationAction call instead of 2. Previously there would be one for "pson://www.webkit.org/main.html" and presumably another one for the invalid URL load 'http://A=a%B=b'. Alex?
(In reply to Chris Dumez from comment #2) > TEST(ProcessSwap, NavigateToInvalidURL) > { > auto processPoolConfiguration = adoptNS([[_WKProcessPoolConfiguration > alloc] init]); > processPoolConfiguration.get().processSwapsOnNavigation = YES; > auto processPool = adoptNS([[WKProcessPool alloc] > _initWithConfiguration:processPoolConfiguration.get()]); > > auto webViewConfiguration = adoptNS([[WKWebViewConfiguration alloc] > init]); > [webViewConfiguration setProcessPool:processPool.get()]; > auto handler = adoptNS([[PSONScheme alloc] > initWithBytes:navigateToInvalidURLTestBytes]); > [webViewConfiguration setURLSchemeHandler:handler.get() > forURLScheme:@"PSON"]; > > auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, > 800, 600) configuration:webViewConfiguration.get()]); > auto navigationDelegate = adoptNS([[PSONNavigationDelegate alloc] init]); > [webView setNavigationDelegate:navigationDelegate.get()]; > auto uiDelegate = adoptNS([[PSONUIDelegate alloc] > initWithNavigationDelegate:navigationDelegate.get()]); > [webView setUIDelegate:uiDelegate.get()]; > > numberOfDecidePolicyCalls = 0; > [webView loadRequest:[NSURLRequest requestWithURL:[NSURL > URLWithString:@"pson://www.webkit.org/main.html"]]]; > TestWebKitAPI::Util::run(&done); > done = false; > auto pid1 = [webView _webProcessIdentifier]; > EXPECT_TRUE(!!pid1); > > TestWebKitAPI::Util::run(&didReceiveAlert); > didReceiveAlert = false; > auto pid2 = [webView _webProcessIdentifier]; > EXPECT_TRUE(!!pid2); > > EXPECT_EQ(2, numberOfDecidePolicyCalls); > EXPECT_EQ(pid1, pid2); > } > > Since the safe browsing check, we're getting one > decidePolicyForNavigationAction call instead of 2. Previously there would be > one for "pson://www.webkit.org/main.html" and presumably another one for the > invalid URL load 'http://A=a%B=b'. > > Alex? Oh, I think this is just a timing issue and the safe browsing check merely delayed things by a bit. I am investigate. Likely, I just need to write the test in a better way.
Created attachment 354868 [details] Patch
Comment on attachment 354868 [details] Patch Clearing flags on attachment: 354868 Committed r238216: <https://trac.webkit.org/changeset/238216>
All reviewed patches have been landed. Closing bug.
<rdar://problem/46084621>