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

WPT: CSS: Add same-origin tests for loading error stylesheets. #14458

Merged
merged 1 commit into from Dec 11, 2018

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

This adds a test that a stylesheet that failed to load is considered
cross-origin. That is, accessing |styleSheet.rules| throws a
SecurityError. This aligns with the specifications:

Bug: 911974
Change-Id: I558e6d3dfa564b15284c393ffc35b80f54a9bc4e
Reviewed-on: https://chromium-review.googlesource.com/c/1371307
Commit-Queue: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615479}

This adds a test that a stylesheet that failed to load is considered
cross-origin. That is, accessing |styleSheet.rules| throws a
SecurityError.  This aligns with the specifications:
- cssRules checks the `origin-clean` flag:
  https://drafts.csswg.org/cssom/#dom-cssstylesheet-cssrules
- This is set to true iff CORS-same-origin:
  https://html.spec.whatwg.org/multipage/links.html#link-type-stylesheet
- CORS-same-origin is false for "error" responses:
  https://html.spec.whatwg.org/multipage/urls-and-fetching.html#cors-same-origin

Bug: 911974
Change-Id: I558e6d3dfa564b15284c393ffc35b80f54a9bc4e
Reviewed-on: https://chromium-review.googlesource.com/c/1371307
Commit-Queue: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615479}
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.

Already reviewed downstream.

@chromium-wpt-export-bot chromium-wpt-export-bot merged commit 19d3a23 into master Dec 11, 2018
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-f2128a1506 branch December 11, 2018 10:48
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

3 participants