[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 limitations. 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/c/chromium/src/+/2346247Reviewed-by:Camille Lamy <clamy@chromium.org> Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org> Cr-Commit-Position: refs/heads/master@{#796794}
Showing
Please register or sign in to comment