Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/browsers/browsing-the-web/navigating-across-documents/plugin-document.historical.html - WPT Dashboard Interop Dashboard
<!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>
<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>