Closed Bug 1513190 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 14458 - WPT: CSS: Add same-origin tests for loading error stylesheets.

Categories

(Core :: DOM: CSS Object Model, enhancement, P4)

enhancement

Tracking

()

RESOLVED FIXED
mozilla66
Tracking Status
firefox66 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 14458 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/14458
Details from upstream follow.

Matt Falkenhagen <falken@chromium.org> wrote:
>  WPT: CSS: Add same-origin tests for loading error stylesheets.
>  
>  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}
>
PR 14458 applied with additional changes from upstream: 600dd6cb4295d0bcfc867b8877287d485d3b0e4e
Component: web-platform-tests → DOM: CSS Object Model
Product: Testing → Core
Ran 1 tests and 6 subtests
OK     : 1
PASS   : 4
FAIL   : 2

New tests that have failures or other problems:
/css/cssom/stylesheet-same-origin.sub.html
    Origin-clean check in cross-origin CSSOM Stylesheets (redirect from cross-origin to same-origin): FAIL
    Origin-clean check in loading error CSSOM Stylesheets: FAIL
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a888e9085ab3
[wpt PR 14458] - WPT: CSS: Add same-origin tests for loading error stylesheets., a=testonly
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in before you can comment on or make changes to this bug.