Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(546)

Issue 2884843004: [ServiceWorker] Add wpt tests to verify Client.type as 'worker' (Closed)

Created:
3 years, 7 months ago by leonhsl(Using Gerrit)
Modified:
3 years, 7 months ago
Reviewers:
falken
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, kenjibaheux+watch_chromium.org, shimazu+serviceworker_chromium.org, serviceworker-reviews, blink-reviews-w3ctests_chromium.org, nhiroki, kinuko+serviceworker, blink-reviews, horo+watch_chromium.org, falken+watch_chromium.org, tzik
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[ServiceWorker] Add wpt tests to verify Client.type as 'worker' Currently we have wpt tests verifying Clients.{get,matchAll} can return clients with type 'window' or 'sharedworker' correctly, this CL adds support for another type 'worker'. BUG=705685 TEST=blink_tests Review-Url: https://codereview.chromium.org/2884843004 Cr-Commit-Position: refs/heads/master@{#474954} Committed: https://chromium.googlesource.com/chromium/src/+/2d88b05db6842a4cc1391dc30ed604588c147041

Patch Set 1 #

Total comments: 6

Patch Set 2 : Refine tests #

Total comments: 4

Patch Set 3 : Modify clients-matchall-client-types.https.html #

Total comments: 2

Patch Set 4 : Remove redundant assertions #

Patch Set 5 : Add assert_not_equals undefined #

Messages

Total messages: 43 (23 generated)
leonhsl(Using Gerrit)
PTAL with my inline questions,, Thanks! https://codereview.chromium.org/2884843004/diff/1/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-get-client-types.https.html File third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-get-client-types.https.html (right): https://codereview.chromium.org/2884843004/diff/1/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-get-client-types.https.html#newcode40 third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-get-client-types.https.html:40: frame.contentWindow.postMessage('StartWorker', '*', [channel.port2]); ...
3 years, 7 months ago (2017-05-16 03:07:56 UTC) #4
falken
https://codereview.chromium.org/2884843004/diff/1/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-get-client-types.https.html File third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-get-client-types.https.html (right): https://codereview.chromium.org/2884843004/diff/1/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-get-client-types.https.html#newcode40 third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-get-client-types.https.html:40: frame.contentWindow.postMessage('StartWorker', '*', [channel.port2]); On 2017/05/16 03:07:56, leonhsl wrote: > ...
3 years, 7 months ago (2017-05-16 04:51:35 UTC) #7
leonhsl(Using Gerrit)
https://codereview.chromium.org/2884843004/diff/1/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-get-client-types.https.html File third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-get-client-types.https.html (right): https://codereview.chromium.org/2884843004/diff/1/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-get-client-types.https.html#newcode40 third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-get-client-types.https.html:40: frame.contentWindow.postMessage('StartWorker', '*', [channel.port2]); On 2017/05/16 04:51:35, falken wrote: > ...
3 years, 7 months ago (2017-05-18 09:36:30 UTC) #8
falken
On 2017/05/18 09:36:30, leonhsl wrote: > https://codereview.chromium.org/2884843004/diff/1/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-get-client-types.https.html > File > third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-get-client-types.https.html > (right): > > ...
3 years, 7 months ago (2017-05-19 09:09:59 UTC) #9
leonhsl(Using Gerrit)
On 2017/05/19 09:09:59, falken wrote: > On 2017/05/18 09:36:30, leonhsl wrote: > > > https://codereview.chromium.org/2884843004/diff/1/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-get-client-types.https.html ...
3 years, 7 months ago (2017-05-19 10:51:00 UTC) #10
falken
On 2017/05/19 10:51:00, leonhsl wrote: > On 2017/05/19 09:09:59, falken wrote: > > On 2017/05/18 ...
3 years, 7 months ago (2017-05-22 04:12:20 UTC) #11
leonhsl(Using Gerrit)
Hi, falken@, Thanks a lot for the information sharing about Tools/Scripts/run-blink-wptserve, I did not know ...
3 years, 7 months ago (2017-05-24 03:55:31 UTC) #12
falken
On 2017/05/24 03:55:31, leonhsl wrote: > Hi, falken@, Thanks a lot for the information sharing ...
3 years, 7 months ago (2017-05-24 05:32:09 UTC) #13
leonhsl(Using Gerrit)
Thank you very much for all the great help! Now I've figured out what happened ...
3 years, 7 months ago (2017-05-24 05:53:11 UTC) #14
falken
Thanks for digging in here. Since the bugs you identified are non-trivial, I'd prefer to ...
3 years, 7 months ago (2017-05-26 01:49:25 UTC) #19
leonhsl(Using Gerrit)
Thanks a lot for review! Uploaded ps#3, which adds dedicated worker client related tests into ...
3 years, 7 months ago (2017-05-26 03:44:17 UTC) #22
falken
Thanks for adding the matchall test. > And, I suppose we're not losing test coverage ...
3 years, 7 months ago (2017-05-26 04:24:58 UTC) #23
leonhsl(Using Gerrit)
Uploaded ps#4, PTAnL, Thanks. https://codereview.chromium.org/2884843004/diff/20001/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-get-client-types.https.html File third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-get-client-types.https.html (right): https://codereview.chromium.org/2884843004/diff/20001/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-get-client-types.https.html#newcode73 third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-get-client-types.https.html:73: 'Window client is undefined'); On ...
3 years, 7 months ago (2017-05-26 05:27:32 UTC) #29
leonhsl(Using Gerrit)
> Yes, I was worried about if assertions get added after this later on, since ...
3 years, 7 months ago (2017-05-26 05:31:15 UTC) #30
falken
On 2017/05/26 05:27:32, leonhsl wrote: > Uploaded ps#4, PTAnL, Thanks. > > https://codereview.chromium.org/2884843004/diff/20001/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-get-client-types.https.html > File ...
3 years, 7 months ago (2017-05-26 05:36:12 UTC) #31
leonhsl(Using Gerrit)
Uploaded ps#5, adding assert_not_equals together with explanation comments, sending to CQ now. Thanks!
3 years, 7 months ago (2017-05-26 05:59:55 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2884843004/80001
3 years, 7 months ago (2017-05-26 06:00:38 UTC) #38
commit-bot: I haz the power
Committed patchset #5 (id:80001) as https://chromium.googlesource.com/chromium/src/+/2d88b05db6842a4cc1391dc30ed604588c147041
3 years, 7 months ago (2017-05-26 07:27:02 UTC) #41
falken
On 2017/05/26 05:31:15, leonhsl wrote: > > Yes, I was worried about if assertions get ...
3 years, 7 months ago (2017-05-26 08:05:39 UTC) #42
leonhsl(Using Gerrit)
3 years, 7 months ago (2017-05-26 08:40:07 UTC) #43
Message was sent while issue was closed.
On 2017/05/26 08:05:39, falken wrote:
> On 2017/05/26 05:31:15, leonhsl wrote:
> > > Yes, I was worried about if assertions get added after this later on,
since
> I
> > > don't think we'll get to this bug in a while.
> > > 
> > 
> > Actually I'm considering to start to dig in these 2 bugs now;-) Could I?
> 
> Thanks for looking into it :) As mentioned on
> https://bugs.chromium.org/p/chromium/issues/detail?id=724371 I'm a bit worried
> that intercepting the worker script will make the code more complex since
we're
> already starting to redesign how interception works in
> https://bugs.chromium.org/p/chromium/issues/detail?id=715640. (There are a ton
> of open bugs like SW should intercept X). So while digging into client id bug
is
> good, I'd rather we leave the worker script interception one alone for now
> especially if the fix looks non-trivial.

Yeah this afternoon after I tried to look into real details for these 2 bugs I
realized they are also relating closely with request interception, just like
issue 724371.
By reading related code, IIUC, currently all dedicated workers WON'T be a SW
client, because dedicated worker does not create its
ServiceWorkerNetworkProvider from beginning. Please correct me if I'm wrong..

And, about the client id bug, the root cause is also relating with that, because
the dedicated worker has no ServiceWorkerNetworkProvider for itself, it's
reusing the sub frame's ServiceWorkerNetworkProvider, meaning that fetch
requests originating from the dedicated worker will be intercepted just like
they're coming from the sub frame, so the returned client id will just be sub
frame's id...

Thanks a lot for kindly explanations again, and I'd like to revisit here
later;-) After issue 715640 solved and I can fully understand it.

Powered by Google App Engine
This is Rietveld 408576698