-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test that plugin documents are not accessible
Follows whatwg/html#6947.
- Loading branch information
Showing
3 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
html/browsers/browsing-the-web/navigating-across-documents/plugin-document.historical.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>Same-origin PDFs must not create accessible Document objects</title> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
|
||
<!-- https://github.com/whatwg/html/pull/6947 --> | ||
|
||
<iframe src="resources/portable-document-format-sample-valid.pdf"></iframe> | ||
|
||
<script> | ||
setup({ explicit_done: true }); | ||
|
||
window.onload = () => { | ||
test(() => { | ||
assert_throws_dom("SecurityError", () => { | ||
document.querySelector("iframe").contentWindow.document; | ||
}); | ||
}); | ||
done(); | ||
}; | ||
</script> |
Binary file added
BIN
+57.5 KB
...g-the-web/navigating-across-documents/resources/portable-document-format-sample-valid.pdf
Binary file not shown.
1 change: 1 addition & 0 deletions
1
...b/navigating-across-documents/resources/portable-document-format-sample-valid.pdf.headers
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 @@ | ||
Content-Type: application/pdf |