Skip to content
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

Add a WPT to check for standards mode plugin document #29264

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions html/browsers/browsing-the-web/read-plugin/load-plugin.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<title>Page load processing model for plugins</title>
<link rel="author" href="masonf@chromium.org">
<link rel="help" href="https://html.spec.whatwg.org/#read-plugin">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>

<object type="application/pdf" data="support/sandbox.pdf"></object>

<script>
const t = async_test("Checking document metadata for PDF file");
const obj = document.querySelector('object');
obj.onload = () => {
t.step(function() {
const doc = obj.contentDocument;
if (doc === null) {
// Some UA's render PDF as "inline content that doesn't have a DOM", which is ok
t.done();
} else {
assert_equals(doc.compatMode, "CSS1Compat");
assert_equals(doc.contentType, "application/pdf");
t.done();
}
});
};
</script>
Binary file not shown.