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

check unattached doc + iframes for manifest #24450

Merged
merged 2 commits into from
Jul 15, 2020
Merged
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
17 changes: 17 additions & 0 deletions html/links/manifest/document-not-attached-manual.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<title>
Manifest attached to document without a browsing context
</title>
<link rel="help" href="https://html.spec.whatwg.org/#link-type-manifest" />
<script>
// Create an orphan document, and make sure it doesn't get used
const doc = document.implementation.createHTMLDocument("Orphan document");
const link = doc.createElement("link");
link.rel = "manifest";
link.href = "/appmanifest/name-member/name-member-fail.webmanifest";
doc.head.append(link);
</script>
<h1>Manifest attached to document that does not have a browsing context</h1>
<p>
To pass, the user agent must not use the manifest in the unattached document.
</p>
21 changes: 21 additions & 0 deletions html/links/manifest/no-manifest-from-iframe-manual.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<title>
Don't install manifests that are not top-level from browsing contexts
</title>
<link rel="help" href="https://html.spec.whatwg.org/#link-type-manifest" />
<h1>Don't install manifests that are not top-level from browsing contexts</h1>
<p>
To pass, the user agent must not use the manifest in iframe. The user agent
must behave as if there is no manifest present.
</p>
<script>
const iframe = document.createElement("iframe");
iframe.srcdoc = "<h1>hi</h1>";
document.body.append(iframe);
iframe.onload = () => {
const link = iframe.contentDocument.createElement("link");
link.rel = "manifest";
link.href = "/appmanifest/name-member/name-member-fail.webmanifest";
iframe.contentDocument.head.append(link);
};
</script>