New issue
Advanced search Search tips

Issue 877138 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 20
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: ----

Blocking:
issue 678905



Sign in to add a comment

[WPT] registration-script-url.https.html fails

Project Member Reported by monorail...@ecosystem-infra.iam.gserviceaccount.com, Aug 23

Issue description

WPT import https://crrev.com/c/1186549 introduced new failures in external/wpt/service-workers:

List of new failures:
external/wpt/service-workers/service-worker/registration-script-url.https.html new failing tests: https://crrev.com/c/1186549/4/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/registration-script-url.https-expected.txt

This import contains upstream changes from 4da456ddbb7fd4572b39f14a475187d77d0a1922 to b8a706eb885495b76b81e08d73d45717aaedf116:
Added tests for the H2 parts in server.py: https://github.com/web-platform-tests/wpt/commit/b8a706eb885495b76b81e08d73d45717aaedf116
Fixed minor issue where. `recv` receiving empty string indicates socket closed/error: https://github.com/web-platform-tests/wpt/commit/441e12da8fde93815d9ae37895b66207b5d2400e
Added log error message that will print if user requests the h2 server to start but the environment is incompatible.: https://github.com/web-platform-tests/wpt/commit/61f0d3426300cb71c16c5f43595449ed4e237275
HTML: test fieldset with shadow DOM and display: contents: https://github.com/web-platform-tests/wpt/commit/69e18d06f5030e3567dcf323e24452c7f4b5f6df
HTML: update crbug number: https://github.com/web-platform-tests/wpt/commit/13334625a17ad86eab71fec9362453acf4f81ab4
HTML: test fieldset's border gap: https://github.com/web-platform-tests/wpt/commit/a68b451920b32057c705d614874ac1392536dd9b
HTML: fieldset containing block when it has a legend: https://github.com/web-platform-tests/wpt/commit/e604b5eea249e02002e725319fd43904c4cbe377
HTML: fieldset's "rendered legend" used value of display is block: https://github.com/web-platform-tests/wpt/commit/0e10a5e47320a06c6f049fabcdfc6bd36922dc83
HTML: test fieldset's legend with float and position: https://github.com/web-platform-tests/wpt/commit/4e8f6447b95290f9f31e478837c66ec26adc1e4e
HTML: test flexbox/grid/multicol on fieldset's legend: https://github.com/web-platform-tests/wpt/commit/f0d9781d64a016c49e0f12a874e07f5598d2262f
Make common/dummy.xhtml actually an XHTML document (#12637): https://github.com/web-platform-tests/wpt/commit/f0a336477c36ef6c8b7e26ce9eb8eecc000168f5
Add a test for text-decoration in tables quirk: https://github.com/web-platform-tests/wpt/commit/f4b8c1ed158c79fdb30ed70b2824da295f524755
Skip some textual lints for *.bmp: https://github.com/web-platform-tests/wpt/commit/2845cc57d5d031b87ead22733983b4a49b2855e0
Align Document::open() and close() further with the spec: https://github.com/web-platform-tests/wpt/commit/f837e221ee1050947223bb08b3643ae4da902375
Test ServiceWorkerContainer.register() with a data: URL: https://github.com/web-platform-tests/wpt/commit/1a63329ad155c08882c225190cc8d2bff9894243 [affecting this directory]
Reland "Move XR LayoutTests over to be WPTs": https://github.com/web-platform-tests/wpt/commit/50d6ee076e94273080d9f3b69be0bf4eeae156d3
Correct WebXR idlharness test: https://github.com/web-platform-tests/wpt/commit/1aace0320ac65ead4f7569484fab741e6fdfb81d

 
Blocking: 678905
Labels: Hotlist-GoodFirstBug Pri-3
Status: Available (was: Untriaged)
Summary: [WPT] registration-script-url.https.html fails (was: [WPT] New failures introduced in external/wpt/service-workers by import https://crrev.com/c/1186549)
register('data://blah') should throw a TypeError instead of SecurityError.

Failing output:
FAIL Script URL is a data URL assert_throws: Data URLs should not be registered as service workers. function "function() { throw e }" threw object "SecurityError: Failed to register a ServiceWorker: The origin of the provided scriptURL ('null') does not match the current origin ('https://web-platform.test:8444')." ("SecurityError") expected object "TypeError" ("TypeError")

Relevant spec is:
"If scopeURL’s scheme is not one of "http" and "https", reject promise with a TypeError and abort these steps."
https://w3c.github.io/ServiceWorker/#start-register-algorithm
I would like to fix this if nobody is working on it.
Owner: eui-sang.lim@samsung.com
Status: Assigned (was: Available)
eui-sang.lim@: Sure, go for it!
Status: Started (was: Assigned)
Sorry for the delay.
https://chromium-review.googlesource.com/c/chromium/src/+/1189688
Project Member

Comment 5 by bugdroid1@chromium.org, Nov 16

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/786b49188d3d930b2112de2a4242e902e2568550

commit 786b49188d3d930b2112de2a4242e902e2568550
Author: Amos Lim <eui-sang.lim@samsung.com>
Date: Fri Nov 16 02:22:20 2018

service worker: Let register('data://blah') throw a TypeError

register('data://blah') should throw a TypeError instead of SecurityError.
If scopeURL’s scheme is not one of "http" and "https", reject promise
with a TypeError and abort these steps.[1]

[1]: https://w3c.github.io/ServiceWorker/#start-register-algorithm

Bug:  877138 
Change-Id: Ic1e8cae52ec9393152044aa37da389eb499165bb
Reviewed-on: https://chromium-review.googlesource.com/c/1189688
Commit-Queue: Amos Lim <eui-sang.lim@samsung.com>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608635}
[delete] https://crrev.com/53ce5a6136b04aff8a653cdcee1f4ef788ba2515/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/registration-script-url.https-expected.txt
[modify] https://crrev.com/786b49188d3d930b2112de2a4242e902e2568550/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/registration-tests-scope.js
[modify] https://crrev.com/786b49188d3d930b2112de2a4242e902e2568550/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/registration-tests-security-error.js
[modify] https://crrev.com/786b49188d3d930b2112de2a4242e902e2568550/third_party/WebKit/LayoutTests/fast/serviceworker/access-container-on-local-file.html
[modify] https://crrev.com/786b49188d3d930b2112de2a4242e902e2568550/third_party/blink/renderer/modules/service_worker/service_worker_container.cc
[modify] https://crrev.com/786b49188d3d930b2112de2a4242e902e2568550/third_party/blink/renderer/modules/service_worker/service_worker_container_test.cc

Status: Fixed (was: Started)

Sign in to add a comment