-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test case for Cross-Origin-Opener-Policy header
Add a test case for pages served with the `Cross-Origin-Opener-Policy: same-origin` header, which currently breaks the client's login popup. This reproduces the issue from https://github.com/hypothesis/product-backlog/issues/1333.
- Loading branch information
1 parent
9070056
commit 0f69016
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!-- Header: Cross-Origin-Opener-Policy: same-origin --> | ||
<html> | ||
<head> | ||
<title>Cross-Origin-Opener-Policy test document</title> | ||
<style> | ||
body { | ||
font-family: sans-serif; | ||
font-size: 1rem; | ||
line-height: 1.5rem; | ||
} | ||
main { | ||
max-width: 600px; | ||
margin-top: 1rem; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<main> | ||
<h1>Cross-Origin-Opener-Policy test</h1> | ||
<p> | ||
This page tests the client on a document which is served with a | ||
<a | ||
href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy" | ||
><code>Cross-Origin-Opener-Policy: same-origin</code></a | ||
> | ||
header. This header prevents popup windows from accessing their opener | ||
using | ||
<a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/opener" | ||
><code>window.opener</code></a | ||
>, which affects the client's login popup. | ||
</p> | ||
{{{ hypothesisScript }}} | ||
</main> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters