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
Verify that COOP severed the relationship on the Opener's side, with the popup's initial Browsing context closed. #21161
Verify that COOP severed the relationship on the Opener's side, with the popup's initial Browsing context closed. #21161
Conversation
5d90f71
to
5943d83
Compare
1a640f8
to
96ad9c9
Compare
Let me know when you think this is ready for review again as it's not immediately apparent. I think you still need to find some occurrences as I'm pretty sure that at least on master this also happens in html/cross-origin-embedder-policy. |
I had a check on COEP cases, and I don't think we can have them close the popup:
I also expect coop-navigated-history-popup.https.html to be non-closable for the above reasons. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming this doesn't affect how browsers fail/pass the tests, LGTM.
(Optional nits: "window proxy" -> "browsing context" (the WindowProxy object makes it observable), if( ... )
-> if (...)
.)
bb8162c
to
62e4052
Compare
Thanks!, regarding the first nit, I did the update but I'm not sure it is accurate (or at least that my comments after the change are still accurate): Isn't the point of this that the bc (browsing context) is no longer observable by the opener, rather than the bc being closed? |
The browsing context is closed and replaced by a new browsing context. Browsing context and WindowProxy are 1:1 and we're not changing that. A spec-problem is that we might need something higher-level than a browsing context to keep track of transitions such as these. E.g., a "browsing session" or some such. |
…ered the relationship bothways
…o test opener's window proxy on some more tests
758ad90
to
79c039c
Compare
This CL lands the Cross-Origin-Opener-Policy "changes to navigation", as per: https://gist.github.com/annevk/6f2dd8c79c77123f39797f6bdac43f3e In practice, it forces a BrowsingInstance switch when we have a COOP mismatch. This is necessary but not sufficient, as we want to ensure the following behavior: (1) window.open() returned WindowProxy is closed when we know that we need to switch. (2) opener is null in opened popups. (3) window.name is empty in opened popups. This CL solves (2) and (3). Currently (1) is untested and will follow in a different patch (tests under development by pmeuleman@ at #21161). Bug:922191 Change-Id: I7d5169f7d53bfc28ea01a1a03c7658e0645bc492
This CL lands the Cross-Origin-Opener-Policy "changes to navigation", as per: https://gist.github.com/annevk/6f2dd8c79c77123f39797f6bdac43f3e In practice, it forces a BrowsingInstance switch when we have a COOP mismatch. This is necessary but not sufficient, as we want to ensure the following behavior: (1) window.open() returned WindowProxy is closed when we know that we need to switch. (2) opener is null in opened popups. (3) window.name is empty in opened popups. This CL solves (2) and (3). Currently (1) is untested and will follow in a different patch (tests under development by pmeuleman@ at #21161). Bug:922191 Change-Id: I7d5169f7d53bfc28ea01a1a03c7658e0645bc492
This CL lands the Cross-Origin-Opener-Policy "changes to navigation", as per: https://gist.github.com/annevk/6f2dd8c79c77123f39797f6bdac43f3e In practice, it forces a BrowsingInstance switch when we have a COOP mismatch. This is necessary but not sufficient, as we want to ensure the following behavior: (1) window.open() returned WindowProxy is closed when we know that we need to switch. (2) opener is null in opened popups. (3) window.name is empty in opened popups. This CL solves (2) and (3). Currently (1) is untested and will follow in a different patch (tests under development by pmeuleman@ at #21161). Bug:922191 Change-Id: I7d5169f7d53bfc28ea01a1a03c7658e0645bc492
This CL lands the Cross-Origin-Opener-Policy "changes to navigation", as per: https://gist.github.com/annevk/6f2dd8c79c77123f39797f6bdac43f3e In practice, it forces a BrowsingInstance switch when we have a COOP mismatch. This is necessary but not sufficient, as we want to ensure the following behavior: (1) window.open() returned WindowProxy is closed when we know that we need to switch. (2) opener is null in opened popups. (3) window.name is empty in opened popups. This CL solves (2). Currently (1) is untested and will follow in a different patch (tests under development by pmeuleman@ at #21161) and (2) needs to be updated with some other state in DidCommit. Bug:922191 Change-Id: I7d5169f7d53bfc28ea01a1a03c7658e0645bc492
This CL lands the Cross-Origin-Opener-Policy "changes to navigation", as per: https://gist.github.com/annevk/6f2dd8c79c77123f39797f6bdac43f3e In practice, it forces a BrowsingInstance switch when we have a COOP mismatch. This is necessary but not sufficient, as we want to ensure the following behavior: (1) window.open() returned WindowProxy is closed when we know that we need to switch. (2) opener is null in opened popups. (3) window.name is empty in opened popups. This CL solves (2). Currently (1) is untested and will follow in a different patch (tests under development by pmeuleman@ at #21161) and (2) needs to be updated with some other state in DidCommit. Bug:922191 Change-Id: I7d5169f7d53bfc28ea01a1a03c7658e0645bc492
This CL lands the Cross-Origin-Opener-Policy "changes to navigation", as per: https://gist.github.com/annevk/6f2dd8c79c77123f39797f6bdac43f3e In practice, it forces a BrowsingInstance switch when we have a COOP mismatch. This is necessary but not sufficient, as we want to ensure the following behavior: (1) window.open() returned WindowProxy is closed when we know that we need to switch. (2) opener is null in opened popups. (3) window.name is empty in opened popups. This CL solves (2). Currently (1) is untested and will follow in a different patch (tests under development by pmeuleman@ at #21161) and (2) needs to be updated with some other state in DidCommit. Bug:922191 Change-Id: I7d5169f7d53bfc28ea01a1a03c7658e0645bc492
This CL lands the Cross-Origin-Opener-Policy "changes to navigation", as per: https://gist.github.com/annevk/6f2dd8c79c77123f39797f6bdac43f3e In practice, it forces a BrowsingInstance switch when we have a COOP mismatch. This is necessary but not sufficient, as we want to ensure the following behavior: (1) window.open() returned WindowProxy is closed when we know that we need to switch. (2) opener is null in opened popups. (3) window.name is empty in opened popups. This CL solves (2). Currently (1) is untested and will follow in a different patch (tests under development by pmeuleman@ at #21161) and (2) needs to be updated with some other state in DidCommit. Bug:922191 Change-Id: I7d5169f7d53bfc28ea01a1a03c7658e0645bc492
This CL lands the Cross-Origin-Opener-Policy "changes to navigation", as per: https://gist.github.com/annevk/6f2dd8c79c77123f39797f6bdac43f3e In practice, it forces a BrowsingInstance switch when we have a COOP mismatch. This is necessary but not sufficient, as we want to ensure the following behavior: (1) window.open() returned WindowProxy is closed when we know that we need to switch. (2) opener is null in opened popups. (3) window.name is empty in opened popups. This CL solves (2). Currently (1) is untested and will follow in a different patch (tests under development by pmeuleman@ at #21161) and (2) needs to be updated with some other state in DidCommit. Bug:922191 Change-Id: I7d5169f7d53bfc28ea01a1a03c7658e0645bc492
This CL lands the Cross-Origin-Opener-Policy "changes to navigation", as per: https://gist.github.com/annevk/6f2dd8c79c77123f39797f6bdac43f3e In practice, it forces a BrowsingInstance switch when we have a COOP mismatch. This is necessary but not sufficient, as we want to ensure the following behavior: (1) window.open() returned WindowProxy is closed when we know that we need to switch. (2) opener is null in opened popups. (3) window.name is empty in opened popups. This CL solves (2). Currently (1) is untested and will follow in a different patch (tests under development by pmeuleman@ at #21161) and (2) needs to be updated with some other state in DidCommit. Bug:922191 Change-Id: I7d5169f7d53bfc28ea01a1a03c7658e0645bc492
This CL lands the Cross-Origin-Opener-Policy "changes to navigation", as per: https://gist.github.com/annevk/6f2dd8c79c77123f39797f6bdac43f3e In practice, it forces a BrowsingInstance switch when we have a COOP mismatch. This is necessary but not sufficient, as we want to ensure the following behavior: (1) window.open() returned WindowProxy is closed when we know that we need to switch. (2) opener is null in opened popups. (3) window.name is empty in opened popups. This CL solves (2). Currently (1) is untested and will follow in a different patch (tests under development by pmeuleman@ at #21161) and (2) needs to be updated with some other state in DidCommit. Bug: 922191 Change-Id: I7d5169f7d53bfc28ea01a1a03c7658e0645bc492 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1985013 Commit-Queue: Arthur Hemery <ahemery@chromium.org> Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org> Cr-Commit-Position: refs/heads/master@{#736344}
This CL lands the Cross-Origin-Opener-Policy "changes to navigation", as per: https://gist.github.com/annevk/6f2dd8c79c77123f39797f6bdac43f3e In practice, it forces a BrowsingInstance switch when we have a COOP mismatch. This is necessary but not sufficient, as we want to ensure the following behavior: (1) window.open() returned WindowProxy is closed when we know that we need to switch. (2) opener is null in opened popups. (3) window.name is empty in opened popups. This CL solves (2). Currently (1) is untested and will follow in a different patch (tests under development by pmeuleman@ at #21161) and (2) needs to be updated with some other state in DidCommit. Bug: 922191 Change-Id: I7d5169f7d53bfc28ea01a1a03c7658e0645bc492 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1985013 Commit-Queue: Arthur Hemery <ahemery@chromium.org> Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org> Cr-Commit-Position: refs/heads/master@{#736344}
This CL lands the Cross-Origin-Opener-Policy "changes to navigation", as per: https://gist.github.com/annevk/6f2dd8c79c77123f39797f6bdac43f3e In practice, it forces a BrowsingInstance switch when we have a COOP mismatch. This is necessary but not sufficient, as we want to ensure the following behavior: (1) window.open() returned WindowProxy is closed when we know that we need to switch. (2) opener is null in opened popups. (3) window.name is empty in opened popups. This CL solves (2). Currently (1) is untested and will follow in a different patch (tests under development by pmeuleman@ at web-platform-tests/wpt#21161) and (2) needs to be updated with some other state in DidCommit. Bug: 922191 Change-Id: I7d5169f7d53bfc28ea01a1a03c7658e0645bc492 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1985013 Commit-Queue: Arthur Hemery <ahemery@chromium.org> Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org> Cr-Commit-Position: refs/heads/master@{#736344}
…for COOP., a=testonly Automatic update from web-platform-tests [Security] Implement the context switch for COOP. This CL lands the Cross-Origin-Opener-Policy "changes to navigation", as per: https://gist.github.com/annevk/6f2dd8c79c77123f39797f6bdac43f3e In practice, it forces a BrowsingInstance switch when we have a COOP mismatch. This is necessary but not sufficient, as we want to ensure the following behavior: (1) window.open() returned WindowProxy is closed when we know that we need to switch. (2) opener is null in opened popups. (3) window.name is empty in opened popups. This CL solves (2). Currently (1) is untested and will follow in a different patch (tests under development by pmeuleman@ at web-platform-tests/wpt#21161) and (2) needs to be updated with some other state in DidCommit. Bug: 922191 Change-Id: I7d5169f7d53bfc28ea01a1a03c7658e0645bc492 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1985013 Commit-Queue: Arthur Hemery <ahemery@chromium.org> Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org> Cr-Commit-Position: refs/heads/master@{#736344} -- wpt-commits: 2ae8e39b7116213662bcc5357394d4418651211c wpt-pr: 21191
…for COOP., a=testonly Automatic update from web-platform-tests [Security] Implement the context switch for COOP. This CL lands the Cross-Origin-Opener-Policy "changes to navigation", as per: https://gist.github.com/annevk/6f2dd8c79c77123f39797f6bdac43f3e In practice, it forces a BrowsingInstance switch when we have a COOP mismatch. This is necessary but not sufficient, as we want to ensure the following behavior: (1) window.open() returned WindowProxy is closed when we know that we need to switch. (2) opener is null in opened popups. (3) window.name is empty in opened popups. This CL solves (2). Currently (1) is untested and will follow in a different patch (tests under development by pmeuleman at web-platform-tests/wpt#21161) and (2) needs to be updated with some other state in DidCommit. Bug: 922191 Change-Id: I7d5169f7d53bfc28ea01a1a03c7658e0645bc492 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1985013 Commit-Queue: Arthur Hemery <ahemerychromium.org> Reviewed-by: Arthur Sonzogni <arthursonzognichromium.org> Cr-Commit-Position: refs/heads/master{#736344} -- wpt-commits: 2ae8e39b7116213662bcc5357394d4418651211c wpt-pr: 21191 UltraBlame original commit: b3450e9c5b09afa339b5ff59675c8b2f2c9be817
…for COOP., a=testonly Automatic update from web-platform-tests [Security] Implement the context switch for COOP. This CL lands the Cross-Origin-Opener-Policy "changes to navigation", as per: https://gist.github.com/annevk/6f2dd8c79c77123f39797f6bdac43f3e In practice, it forces a BrowsingInstance switch when we have a COOP mismatch. This is necessary but not sufficient, as we want to ensure the following behavior: (1) window.open() returned WindowProxy is closed when we know that we need to switch. (2) opener is null in opened popups. (3) window.name is empty in opened popups. This CL solves (2). Currently (1) is untested and will follow in a different patch (tests under development by pmeuleman at web-platform-tests/wpt#21161) and (2) needs to be updated with some other state in DidCommit. Bug: 922191 Change-Id: I7d5169f7d53bfc28ea01a1a03c7658e0645bc492 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1985013 Commit-Queue: Arthur Hemery <ahemerychromium.org> Reviewed-by: Arthur Sonzogni <arthursonzognichromium.org> Cr-Commit-Position: refs/heads/master{#736344} -- wpt-commits: 2ae8e39b7116213662bcc5357394d4418651211c wpt-pr: 21191 UltraBlame original commit: b3450e9c5b09afa339b5ff59675c8b2f2c9be817
…for COOP., a=testonly Automatic update from web-platform-tests [Security] Implement the context switch for COOP. This CL lands the Cross-Origin-Opener-Policy "changes to navigation", as per: https://gist.github.com/annevk/6f2dd8c79c77123f39797f6bdac43f3e In practice, it forces a BrowsingInstance switch when we have a COOP mismatch. This is necessary but not sufficient, as we want to ensure the following behavior: (1) window.open() returned WindowProxy is closed when we know that we need to switch. (2) opener is null in opened popups. (3) window.name is empty in opened popups. This CL solves (2). Currently (1) is untested and will follow in a different patch (tests under development by pmeuleman at web-platform-tests/wpt#21161) and (2) needs to be updated with some other state in DidCommit. Bug: 922191 Change-Id: I7d5169f7d53bfc28ea01a1a03c7658e0645bc492 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1985013 Commit-Queue: Arthur Hemery <ahemerychromium.org> Reviewed-by: Arthur Sonzogni <arthursonzognichromium.org> Cr-Commit-Position: refs/heads/master{#736344} -- wpt-commits: 2ae8e39b7116213662bcc5357394d4418651211c wpt-pr: 21191 UltraBlame original commit: b3450e9c5b09afa339b5ff59675c8b2f2c9be817
…for COOP., a=testonly Automatic update from web-platform-tests [Security] Implement the context switch for COOP. This CL lands the Cross-Origin-Opener-Policy "changes to navigation", as per: https://gist.github.com/annevk/6f2dd8c79c77123f39797f6bdac43f3e In practice, it forces a BrowsingInstance switch when we have a COOP mismatch. This is necessary but not sufficient, as we want to ensure the following behavior: (1) window.open() returned WindowProxy is closed when we know that we need to switch. (2) opener is null in opened popups. (3) window.name is empty in opened popups. This CL solves (2). Currently (1) is untested and will follow in a different patch (tests under development by pmeuleman@ at web-platform-tests/wpt#21161) and (2) needs to be updated with some other state in DidCommit. Bug: 922191 Change-Id: I7d5169f7d53bfc28ea01a1a03c7658e0645bc492 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1985013 Commit-Queue: Arthur Hemery <ahemery@chromium.org> Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org> Cr-Commit-Position: refs/heads/master@{#736344} -- wpt-commits: 2ae8e39b7116213662bcc5357394d4418651211c wpt-pr: 21191
This adds am assertion to verify the windowProxy object is closed.