Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SharedWorker: Fire an error event when type or credentials mismatch #21795

Merged
merged 1 commit into from Feb 17, 2020

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Feb 14, 2020

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: whatwg/html#5235
Pull request: whatwg/html#5258
WPT: #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}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2041386 branch 6 times, most recently from 04fc82c to ad18b8a Compare February 17, 2020 07:49
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: whatwg/html#5235
Pull request: whatwg/html#5258
WPT: #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}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants