Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Issue 705685 Add Client.type
Starred by 2 users Reported by m...@mikepennisi.com, Mar 27 Back to list
Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux, Android, Windows, Chrome, Mac
Pri: 3
Type: Feature

Blocking:
issue 674593
issue 678905


Show other hotlists

Hotlists containing this issue:
Non-Standard-IDL


Sign in to add a comment
UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/56.0.2924.76 Chrome/56.0.2924.76 Safari/537.36

Steps to reproduce the problem:
1. Within a Service Worker, retrieve a reference to a valid Client instance (e.g. via `clients.matchAll`)
2. Reference the `type` attribute of this Client instance

What is the expected behavior?
The attribute value should be one of the following four strings: "window", "worker", "sharedworker", or "all".

What went wrong?
The attribute value is undefined.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 58.0.3029.19  Channel: dev
OS Version: 
Flash Version: 

Specification: https://w3c.github.io/ServiceWorker/#client
Chrome Status: https://www.chromestatus.com/feature/5023199309856768

The lack of support was originally referenced in issue 697110 [1], although that issue is largely focused on a distinct bug. I'm reporting this as a standalone issue to facilitate bug searching and more precise tracking from the project's test suite.

[1] https://bugs.chromium.org/p/chromium/issues/detail?id=697110
 
Labels: TE-NeedsTriageHelp
Labels: -Type-Bug -TE-NeedsTriageHelp OS-Android OS-Chrome OS-Mac OS-Windows Type-Feature
Status: Untriaged
Summary: Update Client to the latest specification (add type and ancestorOrigins, remove frameType) (was: Implement `Client#type`)
Added to the draft specification in December, 2016 -
https://github.com/w3c/ServiceWorker/commit/2d3f0683b748ca31f0f527f9d161235181e81e4b
Also, frameType should be removed and ancestorOrigins should be added -
https://github.com/w3c/ServiceWorker/commit/58be22d7ffdb743db406c02175b9268569c3e1f5
Blocking: 674593
Summary: Add Client.type (was: Update Client to the latest specification (add type and ancestorOrigins, remove frameType))
https://bugs.chromium.org/p/chromium/issues/detail?id=
Project Member Comment 4 by bugdroid1@chromium.org, Mar 31
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b6b2ff25cd6773cca63208bd50cba3a20b31cfba

commit b6b2ff25cd6773cca63208bd50cba3a20b31cfba
Author: mike <mike@mikepennisi.com>
Date: Fri Mar 31 02:28:19 2017

Upstream service worker `client` tests to WPT

BUG=688116, 705685
R=falken@chromium.org

Review-Url: https://codereview.chromium.org/2778903002
Cr-Commit-Position: refs/heads/master@{#461000}

[rename] https://crrev.com/b6b2ff25cd6773cca63208bd50cba3a20b31cfba/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/client-id.https.html
[rename] https://crrev.com/b6b2ff25cd6773cca63208bd50cba3a20b31cfba/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-get-client-types.https.html
[modify] https://crrev.com/b6b2ff25cd6773cca63208bd50cba3a20b31cfba/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-get-cross-origin.https.html
[modify] https://crrev.com/b6b2ff25cd6773cca63208bd50cba3a20b31cfba/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-get.https.html
[modify] https://crrev.com/b6b2ff25cd6773cca63208bd50cba3a20b31cfba/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-matchall-client-types.https.html
[rename] https://crrev.com/b6b2ff25cd6773cca63208bd50cba3a20b31cfba/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-matchall-on-evaluation.https.html
[rename] https://crrev.com/b6b2ff25cd6773cca63208bd50cba3a20b31cfba/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/client-id-worker.js
[copy] https://crrev.com/b6b2ff25cd6773cca63208bd50cba3a20b31cfba/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/clients-get-client-types-frame.html
[copy] https://crrev.com/b6b2ff25cd6773cca63208bd50cba3a20b31cfba/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/clients-get-client-types-shared-worker.js
[rename] https://crrev.com/b6b2ff25cd6773cca63208bd50cba3a20b31cfba/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/clients-get-cross-origin-frame.html
[modify] https://crrev.com/b6b2ff25cd6773cca63208bd50cba3a20b31cfba/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/clients-get-worker.js
[modify] https://crrev.com/b6b2ff25cd6773cca63208bd50cba3a20b31cfba/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/clients-matchall-client-types-iframe.html
[rename] https://crrev.com/b6b2ff25cd6773cca63208bd50cba3a20b31cfba/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/clients-matchall-on-evaluation-worker.js
[modify] https://crrev.com/b6b2ff25cd6773cca63208bd50cba3a20b31cfba/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/clients-matchall-worker.js
[copy] https://crrev.com/b6b2ff25cd6773cca63208bd50cba3a20b31cfba/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/clients-get-client-types.html
[rename] https://crrev.com/b6b2ff25cd6773cca63208bd50cba3a20b31cfba/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/clients-matchall-include-uncontrolled.html
[rename] https://crrev.com/b6b2ff25cd6773cca63208bd50cba3a20b31cfba/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/clients-matchall.html
[rename] https://crrev.com/b6b2ff25cd6773cca63208bd50cba3a20b31cfba/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/clients-get-client-types-frame.html
[rename] https://crrev.com/b6b2ff25cd6773cca63208bd50cba3a20b31cfba/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/clients-get-client-types-shared-worker.js
[rename] https://crrev.com/b6b2ff25cd6773cca63208bd50cba3a20b31cfba/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/clients-get-worker.js
[rename] https://crrev.com/b6b2ff25cd6773cca63208bd50cba3a20b31cfba/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/clients-matchall-worker.js
[delete] https://crrev.com/d015b23fea83d7ae0c5aaa687a3c53f82ee91c21/third_party/WebKit/LayoutTests/http/tests/serviceworker/clients-get-cross-origin.html
[delete] https://crrev.com/d015b23fea83d7ae0c5aaa687a3c53f82ee91c21/third_party/WebKit/LayoutTests/http/tests/serviceworker/clients-get.html
[delete] https://crrev.com/d015b23fea83d7ae0c5aaa687a3c53f82ee91c21/third_party/WebKit/LayoutTests/http/tests/serviceworker/clients-matchall-client-types.html
[delete] https://crrev.com/d015b23fea83d7ae0c5aaa687a3c53f82ee91c21/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/clients-matchall-client-types-iframe.html

Blocking: 678905
Labels: -Pri-2 Pri-3
Status: Available
The WPT clients-match* tests likely fail due to this.
Cc: foolip@chromium.org
Owner: leon....@intel.com
Status: Started
This is being implemented at https://codereview.chromium.org/2845963002/.
Project Member Comment 8 by bugdroid1@chromium.org, May 10
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2ffd4b3b6bc3e571d2fee28955ba9bae10289a28

commit 2ffd4b3b6bc3e571d2fee28955ba9bae10289a28
Author: leon.han <leon.han@intel.com>
Date: Wed May 10 05:35:34 2017

[ServiceWorker] Add type attribute for Client interface

Specification: https://w3c.github.io/ServiceWorker/#client

For Clients.{get,matchAll,openWindow}, currently the C++ impl has
already been able to get the correct client type
{"window","worker","sharedworker"} but does not export it to Js Client
object. This CL adds this support and revises related layout tests.

BUG=705685
TEST=blink_tests

Review-Url: https://codereview.chromium.org/2845963002
Cr-Commit-Position: refs/heads/master@{#470480}

[delete] https://crrev.com/a942138fe716b963ce8247cdcbd3082e841fd19c/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-matchall-exact-controller.https-expected.txt
[delete] https://crrev.com/a942138fe716b963ce8247cdcbd3082e841fd19c/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-matchall.https-expected.txt
[modify] https://crrev.com/2ffd4b3b6bc3e571d2fee28955ba9bae10289a28/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/2ffd4b3b6bc3e571d2fee28955ba9bae10289a28/third_party/WebKit/LayoutTests/platform/mac/virtual/stable/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/2ffd4b3b6bc3e571d2fee28955ba9bae10289a28/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/2ffd4b3b6bc3e571d2fee28955ba9bae10289a28/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/2ffd4b3b6bc3e571d2fee28955ba9bae10289a28/third_party/WebKit/LayoutTests/virtual/stable/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/2ffd4b3b6bc3e571d2fee28955ba9bae10289a28/third_party/WebKit/Source/modules/serviceworkers/Client.idl
[modify] https://crrev.com/2ffd4b3b6bc3e571d2fee28955ba9bae10289a28/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClient.cpp
[modify] https://crrev.com/2ffd4b3b6bc3e571d2fee28955ba9bae10289a28/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClient.h

Status: Fixed
Status: Started
Reopening to address comments on https://codereview.chromium.org/2845963002#msg53
Project Member Comment 11 by bugdroid1@chromium.org, May 16
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/311cc352fa99a028311cab7d6af9d6cd9a6d610e

commit 311cc352fa99a028311cab7d6af9d6cd9a6d610e
Author: leon.han <leon.han@intel.com>
Date: Tue May 16 02:59:51 2017

[ServiceWorker] Revise wpt tests for Client.type

For tests related with Client.type,
'
- Verify that the WPT test is a superset of the chromium/ tests.
- Delete the chromium/ tests
'
chromium/clients-get-client-types.html
--> covered by wpt clients-get-client-types.https.html
chromium/{clients-matchall.html, clients-matchall-include-uncontrolled.html}
--> covered by wpt clients-matchall*.https.html

BUG=705685
TEST=blink_tests

Review-Url: https://codereview.chromium.org/2881743002
Cr-Commit-Position: refs/heads/master@{#471995}

[modify] https://crrev.com/311cc352fa99a028311cab7d6af9d6cd9a6d610e/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/311cc352fa99a028311cab7d6af9d6cd9a6d610e/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-get-client-types.https.html
[modify] https://crrev.com/311cc352fa99a028311cab7d6af9d6cd9a6d610e/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-get.https.html
[modify] https://crrev.com/311cc352fa99a028311cab7d6af9d6cd9a6d610e/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-matchall-exact-controller.https.html
[modify] https://crrev.com/311cc352fa99a028311cab7d6af9d6cd9a6d610e/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-matchall-include-uncontrolled.https.html
[modify] https://crrev.com/311cc352fa99a028311cab7d6af9d6cd9a6d610e/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-matchall.https.html
[modify] https://crrev.com/311cc352fa99a028311cab7d6af9d6cd9a6d610e/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/clients-get-worker.js
[delete] https://crrev.com/6eecabd7b0f4d82b3d5a452716c3f02d546d4c96/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/clients-get-client-types.html
[delete] https://crrev.com/6eecabd7b0f4d82b3d5a452716c3f02d546d4c96/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/clients-matchall-include-uncontrolled.html
[delete] https://crrev.com/6eecabd7b0f4d82b3d5a452716c3f02d546d4c96/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/clients-matchall.html
[delete] https://crrev.com/6eecabd7b0f4d82b3d5a452716c3f02d546d4c96/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/clients-get-client-types-frame.html
[delete] https://crrev.com/6eecabd7b0f4d82b3d5a452716c3f02d546d4c96/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/clients-get-client-types-shared-worker.js
[delete] https://crrev.com/6eecabd7b0f4d82b3d5a452716c3f02d546d4c96/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/clients-get-worker.js
[delete] https://crrev.com/6eecabd7b0f4d82b3d5a452716c3f02d546d4c96/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/clients-matchall-worker.js

Awesome. Thanks, Leon!
Description: Show this description
Project Member Comment 14 by bugdroid1@chromium.org, May 26
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2d88b05db6842a4cc1391dc30ed604588c147041

commit 2d88b05db6842a4cc1391dc30ed604588c147041
Author: leon.han <leon.han@intel.com>
Date: Fri May 26 07:26:44 2017

[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}

[add] https://crrev.com/2d88b05db6842a4cc1391dc30ed604588c147041/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-get-client-types.https-expected.txt
[modify] https://crrev.com/2d88b05db6842a4cc1391dc30ed604588c147041/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-get-client-types.https.html
[modify] https://crrev.com/2d88b05db6842a4cc1391dc30ed604588c147041/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/clients-matchall-client-types.https.html
[add] https://crrev.com/2d88b05db6842a4cc1391dc30ed604588c147041/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/clients-get-client-types-frame-worker.js
[modify] https://crrev.com/2d88b05db6842a4cc1391dc30ed604588c147041/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/clients-get-client-types-frame.html
[add] https://crrev.com/2d88b05db6842a4cc1391dc30ed604588c147041/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/clients-get-client-types-worker.js
[add] https://crrev.com/2d88b05db6842a4cc1391dc30ed604588c147041/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/clients-matchall-client-types-dedicated-worker.js

Sign in to add a comment