Bug 201574 - Rewrite http/tests/workers/service/serviceworker-private-browsing.https.html as an API test
Summary: Rewrite http/tests/workers/service/serviceworker-private-browsing.https.html ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks: 201546
  Show dependency treegraph
 
Reported: 2019-09-06 20:46 PDT by Chris Dumez
Modified: 2019-09-07 22:27 PDT (History)
6 users (show)

See Also:


Attachments
Patch (13.66 KB, patch)
2019-09-06 20:51 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (13.23 KB, patch)
2019-09-07 11:26 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2019-09-06 20:46:34 PDT
Rewrite http/tests/workers/service/serviceworker-private-browsing.https.html as an API test so that we truly test private browsing. testRunner.setPrivateBrowsingEnabled_DEPRECATED() is a hack which does not work well for WK2.
Comment 1 Chris Dumez 2019-09-06 20:51:17 PDT
Created attachment 378271 [details]
Patch
Comment 2 Alex Christensen 2019-09-07 09:22:31 PDT
Comment on attachment 378271 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=378271&action=review

> Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:1419
> +    auto ephemeralConfiguration = adoptNS([[WKWebViewConfiguration alloc] init]);

In order for this to be an equivalent test, don't you need to set the processPool to be the same as the defaultWebView?
Comment 3 Chris Dumez 2019-09-07 10:58:12 PDT
(In reply to Alex Christensen from comment #2)
> Comment on attachment 378271 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=378271&action=review
> 
> > Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:1419
> > +    auto ephemeralConfiguration = adoptNS([[WKWebViewConfiguration alloc] init]);
> 
> In order for this to be an equivalent test, don't you need to set the
> processPool to be the same as the defaultWebView?

Well, that is a good point. For some reason, I assumed this was the default behavior :/ will fix.
Comment 4 Chris Dumez 2019-09-07 11:26:42 PDT
Created attachment 378297 [details]
Patch
Comment 5 Chris Dumez 2019-09-07 11:26:57 PDT
(In reply to Chris Dumez from comment #3)
> (In reply to Alex Christensen from comment #2)
> > Comment on attachment 378271 [details]
> > Patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=378271&action=review
> > 
> > > Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:1419
> > > +    auto ephemeralConfiguration = adoptNS([[WKWebViewConfiguration alloc] init]);
> > 
> > In order for this to be an equivalent test, don't you need to set the
> > processPool to be the same as the defaultWebView?
> 
> Well, that is a good point. For some reason, I assumed this was the default
> behavior :/ will fix.

Done.
Comment 6 WebKit Commit Bot 2019-09-07 22:26:57 PDT
Comment on attachment 378297 [details]
Patch

Clearing flags on attachment: 378297

Committed r249626: <https://trac.webkit.org/changeset/249626>
Comment 7 WebKit Commit Bot 2019-09-07 22:26:59 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2019-09-07 22:27:16 PDT
<rdar://problem/55155561>
Comment 9 Radar WebKit Bug Importer 2019-09-07 22:27:17 PDT
<rdar://problem/55155563>