summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/links/manifest
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/links/manifest')
-rw-r--r--testing/web-platform/tests/html/links/manifest/document-not-attached-manual.html17
-rw-r--r--testing/web-platform/tests/html/links/manifest/link-relationship/link-rel-manifest.html16
-rw-r--r--testing/web-platform/tests/html/links/manifest/link-relationship/link-tree-order-manual.html13
-rw-r--r--testing/web-platform/tests/html/links/manifest/mime-type-application-json-manual.html9
-rw-r--r--testing/web-platform/tests/html/links/manifest/mime-type-application-json.webmanifest3
-rw-r--r--testing/web-platform/tests/html/links/manifest/mime-type-application-json.webmanifest.headers1
-rw-r--r--testing/web-platform/tests/html/links/manifest/mime-type-application-manifest+json-manual.html10
-rw-r--r--testing/web-platform/tests/html/links/manifest/mime-type-application-manifest+json.webmanifest3
-rw-r--r--testing/web-platform/tests/html/links/manifest/mime-type-application-manifest+json.webmanifest.headers1
-rw-r--r--testing/web-platform/tests/html/links/manifest/mime-type-invalid-manual.html9
-rw-r--r--testing/web-platform/tests/html/links/manifest/mime-type-invalid.webmanifest3
-rw-r--r--testing/web-platform/tests/html/links/manifest/mime-type-invalid.webmanifest.headers1
-rw-r--r--testing/web-platform/tests/html/links/manifest/mime-type-none-manual.html9
-rw-r--r--testing/web-platform/tests/html/links/manifest/mime-type-none.webmanifest3
-rw-r--r--testing/web-platform/tests/html/links/manifest/mime-type-none.webmanifest.headers0
-rw-r--r--testing/web-platform/tests/html/links/manifest/mime-type-text-json-manual.html9
-rw-r--r--testing/web-platform/tests/html/links/manifest/mime-type-text-json.webmanifest3
-rw-r--r--testing/web-platform/tests/html/links/manifest/mime-type-text-json.webmanifest.headers1
-rw-r--r--testing/web-platform/tests/html/links/manifest/no-manifest-from-iframe-manual.html21
-rw-r--r--testing/web-platform/tests/html/links/manifest/wrong-mime-type-text-plain-manual.html9
-rw-r--r--testing/web-platform/tests/html/links/manifest/wrong-mime-type-text-plain.webmanifest3
-rw-r--r--testing/web-platform/tests/html/links/manifest/wrong-mime-type-text-plain.webmanifest.headers1
22 files changed, 145 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/links/manifest/document-not-attached-manual.html b/testing/web-platform/tests/html/links/manifest/document-not-attached-manual.html
new file mode 100644
index 0000000000..313fb2b96b
--- /dev/null
+++ b/testing/web-platform/tests/html/links/manifest/document-not-attached-manual.html
@@ -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>
diff --git a/testing/web-platform/tests/html/links/manifest/link-relationship/link-rel-manifest.html b/testing/web-platform/tests/html/links/manifest/link-relationship/link-rel-manifest.html
new file mode 100644
index 0000000000..2d9fd78948
--- /dev/null
+++ b/testing/web-platform/tests/html/links/manifest/link-relationship/link-rel-manifest.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<title>
+ Test that "manifest" is a supported value for the `rel` of a `link`
+</title>
+<link rel="help" href="https://html.spec.whatwg.org/#link-type-manifest" />
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+ test(() => {
+ const result = document.createElement("link").relList.supports("manifest");
+ assert_true(
+ result,
+ "Expected true if manifest is supported as a link relationship"
+ );
+ }, 'link element supports a rel value of "manifest".');
+</script>
diff --git a/testing/web-platform/tests/html/links/manifest/link-relationship/link-tree-order-manual.html b/testing/web-platform/tests/html/links/manifest/link-relationship/link-tree-order-manual.html
new file mode 100644
index 0000000000..aa9ec9c12d
--- /dev/null
+++ b/testing/web-platform/tests/html/links/manifest/link-relationship/link-tree-order-manual.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<title>Test that name member is supported</title>
+<link rel="help" href="https://html.spec.whatwg.org/#link-type-manifest" />
+<link rel="manifesto" href="/appmanifest/name-member/name-member-fail.webmanifest" />
+<link
+ rel="hello manifest another-relationship"
+ href="/appmanifest/name-member/name-member.webmanifest"
+/>
+<link rel="manifest" href="/appmanifest/name-member/name-member-fail.webmanifest" />
+<link rel="hello manifest" href="/appmanifest/name-member/name-member-fail.webmanifest" />
+<p>
+ If when installing the name is "pass" then the test has passed.
+</p>
diff --git a/testing/web-platform/tests/html/links/manifest/mime-type-application-json-manual.html b/testing/web-platform/tests/html/links/manifest/mime-type-application-json-manual.html
new file mode 100644
index 0000000000..5d1a498704
--- /dev/null
+++ b/testing/web-platform/tests/html/links/manifest/mime-type-application-json-manual.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<title>Test JSON MIME Type support (application/json)</title>
+<link rel="help" href="https://html.spec.whatwg.org/#link-type-manifest" />
+<link rel="manifest" href="mime-type-application-json.webmanifest" />
+<h1>Test JSON MIME Type support for web manifest</h1>
+<p>
+ To pass, the use agent must treat the manifest valid (name is "pass"). The
+ response's Content-Type metadata is a JSON MIME type "application/json".
+</p>
diff --git a/testing/web-platform/tests/html/links/manifest/mime-type-application-json.webmanifest b/testing/web-platform/tests/html/links/manifest/mime-type-application-json.webmanifest
new file mode 100644
index 0000000000..c51d155a24
--- /dev/null
+++ b/testing/web-platform/tests/html/links/manifest/mime-type-application-json.webmanifest
@@ -0,0 +1,3 @@
+{
+ "name": "pass"
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/html/links/manifest/mime-type-application-json.webmanifest.headers b/testing/web-platform/tests/html/links/manifest/mime-type-application-json.webmanifest.headers
new file mode 100644
index 0000000000..75f8856556
--- /dev/null
+++ b/testing/web-platform/tests/html/links/manifest/mime-type-application-json.webmanifest.headers
@@ -0,0 +1 @@
+Content-Type: application/json; charset=utf-8 \ No newline at end of file
diff --git a/testing/web-platform/tests/html/links/manifest/mime-type-application-manifest+json-manual.html b/testing/web-platform/tests/html/links/manifest/mime-type-application-manifest+json-manual.html
new file mode 100644
index 0000000000..f41c4fdab0
--- /dev/null
+++ b/testing/web-platform/tests/html/links/manifest/mime-type-application-manifest+json-manual.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<title>Test JSON MIME Type support (application/manifest+json)</title>
+<link rel="help" href="https://html.spec.whatwg.org/#link-type-manifest" />
+<link rel="manifest" href="mime-type-application-manifest+json.webmanifest" />
+<h1>Test JSON MIME Type support for web manifest</h1>
+<p>
+ To pass, the use agent must treat the manifest valid (name is "pass"). The
+ response's Content-Type metadata is a JSON MIME type
+ "application/manifest+json".
+</p>
diff --git a/testing/web-platform/tests/html/links/manifest/mime-type-application-manifest+json.webmanifest b/testing/web-platform/tests/html/links/manifest/mime-type-application-manifest+json.webmanifest
new file mode 100644
index 0000000000..c51d155a24
--- /dev/null
+++ b/testing/web-platform/tests/html/links/manifest/mime-type-application-manifest+json.webmanifest
@@ -0,0 +1,3 @@
+{
+ "name": "pass"
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/html/links/manifest/mime-type-application-manifest+json.webmanifest.headers b/testing/web-platform/tests/html/links/manifest/mime-type-application-manifest+json.webmanifest.headers
new file mode 100644
index 0000000000..23f36ea27c
--- /dev/null
+++ b/testing/web-platform/tests/html/links/manifest/mime-type-application-manifest+json.webmanifest.headers
@@ -0,0 +1 @@
+Content-Type: application/manifest+json; charset=utf-8 \ No newline at end of file
diff --git a/testing/web-platform/tests/html/links/manifest/mime-type-invalid-manual.html b/testing/web-platform/tests/html/links/manifest/mime-type-invalid-manual.html
new file mode 100644
index 0000000000..45c2000a45
--- /dev/null
+++ b/testing/web-platform/tests/html/links/manifest/mime-type-invalid-manual.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<title>Test JSON MIME Type support (application/json)</title>
+<link rel="help" href="https://html.spec.whatwg.org/#link-type-manifest" />
+<link rel="manifest" href="mime-type-invalid.webmanifest" />
+<h1>Test JSON MIME Type support for web manifest</h1>
+<p>
+ To pass, the use agent must treat the manifest as invalid. The
+ response's Content-Type metadata is an invalid mime type.
+</p>
diff --git a/testing/web-platform/tests/html/links/manifest/mime-type-invalid.webmanifest b/testing/web-platform/tests/html/links/manifest/mime-type-invalid.webmanifest
new file mode 100644
index 0000000000..66051f078a
--- /dev/null
+++ b/testing/web-platform/tests/html/links/manifest/mime-type-invalid.webmanifest
@@ -0,0 +1,3 @@
+{
+ "name": "fail - invalid MIME type"
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/html/links/manifest/mime-type-invalid.webmanifest.headers b/testing/web-platform/tests/html/links/manifest/mime-type-invalid.webmanifest.headers
new file mode 100644
index 0000000000..ac90386634
--- /dev/null
+++ b/testing/web-platform/tests/html/links/manifest/mime-type-invalid.webmanifest.headers
@@ -0,0 +1 @@
+Content-Type: ׺°”˜`”°º× INVALID MIME TYPE ׺°”˜`”°º× \ No newline at end of file
diff --git a/testing/web-platform/tests/html/links/manifest/mime-type-none-manual.html b/testing/web-platform/tests/html/links/manifest/mime-type-none-manual.html
new file mode 100644
index 0000000000..8f934155e1
--- /dev/null
+++ b/testing/web-platform/tests/html/links/manifest/mime-type-none-manual.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<title>Test JSON MIME Type support (application/json)</title>
+<link rel="help" href="https://html.spec.whatwg.org/#link-type-manifest" />
+<link rel="manifest" href="mime-type-invalid.webmanifest" />
+<h1>Test JSON MIME Type support for web manifest</h1>
+<p>
+ To pass, the use agent must treat the manifest as invalid. The
+ response's does not contain any Content-Type HTTP header.
+</p>
diff --git a/testing/web-platform/tests/html/links/manifest/mime-type-none.webmanifest b/testing/web-platform/tests/html/links/manifest/mime-type-none.webmanifest
new file mode 100644
index 0000000000..cae1d82a32
--- /dev/null
+++ b/testing/web-platform/tests/html/links/manifest/mime-type-none.webmanifest
@@ -0,0 +1,3 @@
+{
+ "name": "fail - no Content-Type HTTP header"
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/html/links/manifest/mime-type-none.webmanifest.headers b/testing/web-platform/tests/html/links/manifest/mime-type-none.webmanifest.headers
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/testing/web-platform/tests/html/links/manifest/mime-type-none.webmanifest.headers
diff --git a/testing/web-platform/tests/html/links/manifest/mime-type-text-json-manual.html b/testing/web-platform/tests/html/links/manifest/mime-type-text-json-manual.html
new file mode 100644
index 0000000000..4597d6ddbd
--- /dev/null
+++ b/testing/web-platform/tests/html/links/manifest/mime-type-text-json-manual.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<title>Test JSON MIME Type support (text/json)</title>
+<link rel="help" href="https://html.spec.whatwg.org/#link-type-manifest" />
+<link rel="manifest" href="mime-type-text-json.webmanifest" />
+<h1>Test JSON MIME Type support for web manifest</h1>
+<p>
+ To pass, the use agent must treat the manifest valid (name is "pass"). The
+ response's Content-Type metadata is a JSON MIME type "text/json".
+</p>
diff --git a/testing/web-platform/tests/html/links/manifest/mime-type-text-json.webmanifest b/testing/web-platform/tests/html/links/manifest/mime-type-text-json.webmanifest
new file mode 100644
index 0000000000..c51d155a24
--- /dev/null
+++ b/testing/web-platform/tests/html/links/manifest/mime-type-text-json.webmanifest
@@ -0,0 +1,3 @@
+{
+ "name": "pass"
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/html/links/manifest/mime-type-text-json.webmanifest.headers b/testing/web-platform/tests/html/links/manifest/mime-type-text-json.webmanifest.headers
new file mode 100644
index 0000000000..3f4f83f922
--- /dev/null
+++ b/testing/web-platform/tests/html/links/manifest/mime-type-text-json.webmanifest.headers
@@ -0,0 +1 @@
+Content-Type: text/json; charset=utf-8 \ No newline at end of file
diff --git a/testing/web-platform/tests/html/links/manifest/no-manifest-from-iframe-manual.html b/testing/web-platform/tests/html/links/manifest/no-manifest-from-iframe-manual.html
new file mode 100644
index 0000000000..7b52e48731
--- /dev/null
+++ b/testing/web-platform/tests/html/links/manifest/no-manifest-from-iframe-manual.html
@@ -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>
diff --git a/testing/web-platform/tests/html/links/manifest/wrong-mime-type-text-plain-manual.html b/testing/web-platform/tests/html/links/manifest/wrong-mime-type-text-plain-manual.html
new file mode 100644
index 0000000000..fdf5abf099
--- /dev/null
+++ b/testing/web-platform/tests/html/links/manifest/wrong-mime-type-text-plain-manual.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<title>Test JSON MIME Type support (text/plain)</title>
+<link rel="help" href="https://html.spec.whatwg.org/#link-type-manifest" />
+<link rel="manifest" href="wrong-mime-type-text-plain.webmanifest.webmanifest" />
+<h1>Test JSON MIME Type support for web manifest</h1>
+<p>
+ To pass, the use agent must treat the manifest as not present. The response's
+ Content-Type metadata "text/plain" is <strong>NOT</strong> a JSON MIME type.
+</p>
diff --git a/testing/web-platform/tests/html/links/manifest/wrong-mime-type-text-plain.webmanifest b/testing/web-platform/tests/html/links/manifest/wrong-mime-type-text-plain.webmanifest
new file mode 100644
index 0000000000..eac6871328
--- /dev/null
+++ b/testing/web-platform/tests/html/links/manifest/wrong-mime-type-text-plain.webmanifest
@@ -0,0 +1,3 @@
+{
+ "name": "fail - MIME type is text/plain"
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/html/links/manifest/wrong-mime-type-text-plain.webmanifest.headers b/testing/web-platform/tests/html/links/manifest/wrong-mime-type-text-plain.webmanifest.headers
new file mode 100644
index 0000000000..80fbe8db6c
--- /dev/null
+++ b/testing/web-platform/tests/html/links/manifest/wrong-mime-type-text-plain.webmanifest.headers
@@ -0,0 +1 @@
+Content-Type: text/plain; charset=utf-8 \ No newline at end of file