SharedWorker: Fire an error event when type or credentials mismatch
This CL adds the step to check if type and credentials values are same with these of matched SharedWorkerGlobalScope before connecting to it. This is just added to the spec. Spec issue: https://github.com/whatwg/html/issues/5235 Pull request: https://github.com/whatwg/html/pull/5258 WPT: https://github.com/web-platform-tests/wpt/pull/21651 This changes the behavior, and WPT is already added from the public pull requests to WPT GitHub: wpt/workers/shared-worker-options-mismatch.html In this CL, http/tests/workers/shared-worker-shared.html is modified. Since the way to catch worker's error had changed, this test was no longer catching the error properly. This test was attempting to create SharedWorker with non-existing script url so ErrorEvent had been fired. However, this test couldn't successfully catch ErrorEvent and this is found out since the console error log added in this CL is printed as "text diff". Fixing this test is out-of-scope, so this CL avoid this console error by using an existing script url. Bug: 1050438 Change-Id: I03232ff19db89560d99d3ddc6a25cdd8f1898222 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2041386 Commit-Queue: Eriko Kurimoto <elkurin@google.com> Reviewed-by:Hiroki Nakagawa <nhiroki@chromium.org> Reviewed-by:
Kinuko Yasuda <kinuko@chromium.org> Reviewed-by:
Hiroshige Hayashizaki <hiroshige@chromium.org> Cr-Commit-Position: refs/heads/master@{#741848}
Showing
Please register or sign in to comment