WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
191660
REGRESSION (
r238115
): [iOS] TestWebKitAPI.ProcessSwap.NavigateToInvalidURL is failing
https://bugs.webkit.org/show_bug.cgi?id=191660
Summary
REGRESSION (r238115): [iOS] TestWebKitAPI.ProcessSwap.NavigateToInvalidURL is...
Ryan Haddad
Reported
2018-11-14 15:02:41 PST
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
Attachments
Patch
(4.17 KB, patch)
2018-11-14 16:24 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Ryan Haddad
Comment 1
2018-11-14 15:06:37 PST
I think this regressed with
https://trac.webkit.org/changeset/238115
Chris Dumez
Comment 2
2018-11-14 15:15:08 PST
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?
Chris Dumez
Comment 3
2018-11-14 15:53:21 PST
(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.
Chris Dumez
Comment 4
2018-11-14 16:24:51 PST
Created
attachment 354868
[details]
Patch
WebKit Commit Bot
Comment 5
2018-11-14 19:32:39 PST
Comment on
attachment 354868
[details]
Patch Clearing flags on attachment: 354868 Committed
r238216
: <
https://trac.webkit.org/changeset/238216
>
WebKit Commit Bot
Comment 6
2018-11-14 19:32:41 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 7
2018-11-14 19:33:36 PST
<
rdar://problem/46084621
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug