Closed Bug 1658521 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 24949 - [COOP] Access reporting: More tests for indexed/named getters.

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
82 Branch
Tracking Status
firefox82 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

arthursonzogni <arthursonzogni@chromium.org> wrote:

[COOP] Access reporting: More tests for indexed/named getters.

Expand the WPT tests:

  • property.https.html
    Into:
  • property.https.html
  • property-indexed-getter.https.html
  • property-named-getter.https.html

This adds more test cases for accesses made using the indexed/named getter.

This is subject to change, but the future implementations of COOP access
reporting for the CrossOrigin named/indexed getter might have some
limitiations. The new tests were made to reflect this.

We might catch only the accesses that would have returned an
iframe. This is mainly caused by addressing this suggestion:
https://chromium-review.googlesource.com/c/chromium/src/+/2339353/1/third_party/blink/renderer/bindings/templates/interface.cc.tmpl

The call to ReportCoopAccess is likely going to be made from:
V8Window::NamedPropertyGetterCustom(..)
which is called by:
-> V8Window::CrossOriginNamedGetter(..)
-> V8Window::NamedPropertyGetterCallback

This function is called numerous time, not only for the CrossOrigin method, but for almost all accesses.
For now, the scope of COOP access reporting is limited to the "CrossOrigin"
attribute/methods from the Window.idl file.

This function is trying match the "name" with:

  1. A CrossOrigin attribute/operations.
  2. A named iframe.
  3. A cross-origin interceptor.
  4. An element with a matching name or ID in the document.
  5. Abort and fallback to checking the context (unsure).

Even if we don't catch all accesses, we must at least catch (2) and likely (4).

Bug: 1090273
Change-Id: Id2b115dab83f0e53b4ab459dbb1f500d64d59956

Reviewed-on: https://chromium-review.googlesource.com/2346247
WPT-Export-Revision: 20e071d44815565ede6c3ae91b519de2357ad1f6

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core
PR 24949 applied with additional changes from upstream: 6df9a3d9398c15a882415eb7a6f2a7e4bb21d6c5

CI Results

Ran 12 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 3 tests and 30 subtests

Status Summary

Firefox

OK : 2
PASS : 9
FAIL : 7[Gecko-linux1804-64-opt, Gecko-linux1804-64-qr-opt, Gecko-windows10-64-opt, Gecko-windows10-64-qr-opt, Gecko-windows7-32-opt, GitHub] 10[Gecko-linux1804-64-debug, Gecko-linux1804-64-qr-debug, Gecko-windows10-64-debug, Gecko-windows10-64-qr-debug, Gecko-windows7-32-debug]
TIMEOUT: 2
NOTRUN : 24[Gecko-linux1804-64-debug, Gecko-linux1804-64-qr-debug, Gecko-windows10-64-debug, Gecko-windows10-64-qr-debug, Gecko-windows7-32-debug] 27[Gecko-linux1804-64-opt, Gecko-linux1804-64-qr-opt, Gecko-windows10-64-opt, Gecko-windows10-64-qr-opt, Gecko-windows7-32-opt, GitHub]

Chrome

OK : 2
PASS : 9
FAIL : 7
TIMEOUT: 2
NOTRUN : 27

Safari

OK : 2
FAIL : 28
TIMEOUT: 2
NOTRUN : 15

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/html/cross-origin-opener-policy/reporting/access-reporting/property-named-getter.https.html: OK [Gecko-linux1804-64-debug, Gecko-linux1804-64-opt, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows10-64-debug, Gecko-windows10-64-opt, Gecko-windows10-64-qr-debug, Gecko-windows10-64-qr-opt, Gecko-windows7-32-debug, Gecko-windows7-32-opt, GitHub], SKIP [Gecko-android-em-7.0-x86_64-debug-geckoview, Gecko-android-em-7.0-x86_64-opt-geckoview] (Chrome: OK, Safari: OK)
same-site > w => w["divID"]: FAIL (Chrome: FAIL, Safari: FAIL)
same-site > w => w["iframeName"]: FAIL (Chrome: FAIL, Safari: FAIL)
cross-origin > w => w["iframeName"]: FAIL (Chrome: FAIL, Safari: FAIL)
/html/cross-origin-opener-policy/reporting/access-reporting/property-indexed-getter.https.html: OK [Gecko-linux1804-64-debug, Gecko-linux1804-64-opt, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows10-64-debug, Gecko-windows10-64-opt, Gecko-windows10-64-qr-debug, Gecko-windows10-64-qr-opt, Gecko-windows7-32-debug, Gecko-windows7-32-opt, GitHub], SKIP [Gecko-android-em-7.0-x86_64-debug-geckoview, Gecko-android-em-7.0-x86_64-opt-geckoview] (Chrome: OK, Safari: OK)
cross-origin > w => w[0]: FAIL (Chrome: FAIL, Safari: FAIL)
same-site > w => w[0]: FAIL (Chrome: FAIL, Safari: FAIL)
/html/cross-origin-opener-policy/reporting/access-reporting/property.https.html: SKIP [Gecko-android-em-7.0-x86_64-debug-geckoview, Gecko-android-em-7.0-x86_64-opt-geckoview], TIMEOUT [Gecko-linux1804-64-debug, Gecko-linux1804-64-opt, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows10-64-debug, Gecko-windows10-64-opt, Gecko-windows10-64-qr-debug, Gecko-windows10-64-qr-opt, Gecko-windows7-32-debug, Gecko-windows7-32-opt, GitHub] (Chrome: TIMEOUT, Safari: TIMEOUT)
cross-origin > w => w.blur(): FAIL (Chrome: FAIL, Safari: FAIL)
cross-origin > w => w.close(): FAIL (Chrome: FAIL, Safari: FAIL)
same-site > w => w.opener: NOTRUN (Chrome: NOTRUN, Safari: NOTRUN)
same-site > w => w.location: NOTRUN (Chrome: NOTRUN, Safari: NOTRUN)
same-site > w => w.window: NOTRUN (Chrome: NOTRUN, Safari: NOTRUN)
same-site > w => w.blur(): NOTRUN (Chrome: NOTRUN, Safari: NOTRUN)
same-site > w => w.focus(): NOTRUN (Chrome: NOTRUN, Safari: NOTRUN)
cross-origin > w => w.postMessage("", ""): NOTRUN (Chrome: NOTRUN, Safari: FAIL)
cross-origin > w => w.top: NOTRUN (Chrome: NOTRUN, Safari: FAIL)
cross-origin > w => w.opener = "": NOTRUN (Chrome: NOTRUN, Safari: FAIL)
same-site > w => w.top: NOTRUN (Chrome: NOTRUN, Safari: NOTRUN)
cross-origin > w => w.location: NOTRUN (Chrome: NOTRUN, Safari: FAIL)
cross-origin > w => w.location = "#": NOTRUN (Chrome: NOTRUN, Safari: FAIL)
same-site > w => w.opener = "": NOTRUN (Chrome: NOTRUN, Safari: NOTRUN)
same-site > w => w.postMessage(""): NOTRUN (Chrome: NOTRUN, Safari: NOTRUN)
cross-origin > w => w.closed: FAIL [Gecko-linux1804-64-debug, Gecko-linux1804-64-qr-debug, Gecko-windows10-64-debug, Gecko-windows10-64-qr-debug, Gecko-windows7-32-debug], TIMEOUT [Gecko-linux1804-64-opt, Gecko-linux1804-64-qr-opt, Gecko-windows10-64-opt, Gecko-windows10-64-qr-opt, Gecko-windows7-32-opt, GitHub] (Chrome: TIMEOUT, Safari: FAIL)
same-site > w => w.location = "#": NOTRUN (Chrome: NOTRUN, Safari: NOTRUN)
cross-origin > w => w.self: NOTRUN (Chrome: NOTRUN, Safari: FAIL)
same-site > w => w.postMessage("", ""): NOTRUN (Chrome: NOTRUN, Safari: NOTRUN)
same-site > w => w.close(): NOTRUN (Chrome: NOTRUN, Safari: NOTRUN)
same-site > w => w.frames: NOTRUN (Chrome: NOTRUN, Safari: NOTRUN)
same-site > w => w.length: NOTRUN (Chrome: NOTRUN, Safari: NOTRUN)
same-site > w => w.closed: NOTRUN (Chrome: NOTRUN, Safari: NOTRUN)
same-site > w => w.self: NOTRUN (Chrome: NOTRUN, Safari: NOTRUN)
cross-origin > w => w.opener: NOTRUN (Chrome: NOTRUN, Safari: FAIL)
cross-origin > w => w.frames: FAIL [Gecko-linux1804-64-debug, Gecko-linux1804-64-qr-debug, Gecko-windows10-64-debug, Gecko-windows10-64-qr-debug, Gecko-windows7-32-debug], NOTRUN [Gecko-linux1804-64-opt, Gecko-linux1804-64-qr-opt, Gecko-windows10-64-opt, Gecko-windows10-64-qr-opt, Gecko-windows7-32-opt, GitHub] (Chrome: NOTRUN, Safari: FAIL)
cross-origin > w => w.length: NOTRUN [Gecko-linux1804-64-opt, Gecko-linux1804-64-qr-opt, Gecko-windows10-64-opt, Gecko-windows10-64-qr-opt, Gecko-windows7-32-opt, GitHub], TIMEOUT [Gecko-linux1804-64-debug, Gecko-linux1804-64-qr-debug, Gecko-windows10-64-debug, Gecko-windows10-64-qr-debug, Gecko-windows7-32-debug] (Chrome: NOTRUN, Safari: FAIL)
cross-origin > w => w.focus(): FAIL [Gecko-linux1804-64-debug, Gecko-linux1804-64-qr-debug, Gecko-windows10-64-debug, Gecko-windows10-64-qr-debug, Gecko-windows7-32-debug], NOTRUN [Gecko-linux1804-64-opt, Gecko-linux1804-64-qr-opt, Gecko-windows10-64-opt, Gecko-windows10-64-qr-opt, Gecko-windows7-32-opt, GitHub] (Chrome: NOTRUN, Safari: FAIL)
cross-origin > w => w.postMessage(""): NOTRUN (Chrome: NOTRUN, Safari: FAIL)
cross-origin > w => w.window: NOTRUN (Chrome: NOTRUN, Safari: TIMEOUT)

Tests Disabled in Gecko Infrastructure

/html/cross-origin-opener-policy/reporting/access-reporting/property-named-getter.https.html: OK [Gecko-linux1804-64-debug, Gecko-linux1804-64-opt, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows10-64-debug, Gecko-windows10-64-opt, Gecko-windows10-64-qr-debug, Gecko-windows10-64-qr-opt, Gecko-windows7-32-debug, Gecko-windows7-32-opt, GitHub], SKIP [Gecko-android-em-7.0-x86_64-debug-geckoview, Gecko-android-em-7.0-x86_64-opt-geckoview] (Chrome: OK, Safari: OK)
/html/cross-origin-opener-policy/reporting/access-reporting/property-indexed-getter.https.html: OK [Gecko-linux1804-64-debug, Gecko-linux1804-64-opt, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows10-64-debug, Gecko-windows10-64-opt, Gecko-windows10-64-qr-debug, Gecko-windows10-64-qr-opt, Gecko-windows7-32-debug, Gecko-windows7-32-opt, GitHub], SKIP [Gecko-android-em-7.0-x86_64-debug-geckoview, Gecko-android-em-7.0-x86_64-opt-geckoview] (Chrome: OK, Safari: OK)
/html/cross-origin-opener-policy/reporting/access-reporting/property.https.html: SKIP [Gecko-android-em-7.0-x86_64-debug-geckoview, Gecko-android-em-7.0-x86_64-opt-geckoview], TIMEOUT [Gecko-linux1804-64-debug, Gecko-linux1804-64-opt, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows10-64-debug, Gecko-windows10-64-opt, Gecko-windows10-64-qr-debug, Gecko-windows10-64-qr-opt, Gecko-windows7-32-debug, Gecko-windows7-32-opt, GitHub] (Chrome: TIMEOUT, Safari: TIMEOUT)

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/097b930cebcc [wpt PR 24949] - [COOP] Access reporting: More tests for indexed/named getters., a=testonly https://hg.mozilla.org/integration/autoland/rev/9b92068a3021 [wpt PR 24949] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
You need to log in before you can comment on or make changes to this bug.