diff options
Diffstat (limited to 'testing/web-platform/tests/conformance-checkers/html/elements/script')
72 files changed, 591 insertions, 0 deletions
diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/language-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/language-novalid.html new file mode 100644 index 0000000000..3ac19056a0 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/language-novalid.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<html> +<head> +<title>the "language" attribute is obsolete</title> +<meta charset=utf-8> +</head> +<body> +<script language=vbscript src=url></script> +</body> +</html> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src-empty-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src-empty-novalid.html new file mode 100644 index 0000000000..ebf2dca0a2 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src-empty-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>empty src is not valid</title> +<script src=""></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src-isvalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src-isvalid.html new file mode 100644 index 0000000000..5585b74431 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src-isvalid.html @@ -0,0 +1,91 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>valid src</title> +<script src="a:foo.com"></script><!-- scheme-private --> +<script src="foo:/"></script><!-- scheme-private-slash --> +<script src="foo://"></script><!-- scheme-private-slash-slash --> +<script src="foo:/bar.com/"></script><!-- scheme-private-path --> +<script src="foo://///////"></script><!-- scheme-private-path-leading-slashes-only --> +<script src="foo://///////bar.com/"></script><!-- scheme-private-path-leading-slashes-chars --> +<script src="foo:////://///"></script><!-- scheme-private-path-leading-slashes-colon-slashes --> +<script src="c:/foo"></script><!-- scheme-private-single-letter --> +<script src="madeupscheme:/example.com/"></script><!-- scheme-private-single-slash --> +<script src="file:/example.com/"></script><!-- scheme-file-single-slash --> +<script src="ftps:/example.com/"></script><!-- scheme-ftps-single-slash --> +<script src="gopher:/example.com/"></script><!-- scheme-gopher-single-slash --> +<script src="ws:/example.com/"></script><!-- scheme-ws-single-slash --> +<script src="wss:/example.com/"></script><!-- scheme-wss-single-slash --> +<script src="javascript:/example.com/"></script><!-- scheme-javascript-single-slash --> +<script src="mailto:/example.com/"></script><!-- scheme-mailto-single-slash --> +<script src="madeupscheme:example.com/"></script><!-- scheme-private-no-slash --> +<script src="ftps:example.com/"></script><!-- scheme-ftps-no-slash --> +<script src="gopher:example.com/"></script><!-- scheme-gopher-no-slash --> +<script src="wss:example.com/"></script><!-- scheme-wss-no-slash --> +<script src="mailto:example.com/"></script><!-- scheme-mailto-no-slash --> +<script src="data:text/plain,foo"></script><!-- scheme-data-no-slash --> +<script src="http://user:pass@foo:21/bar;par?b#c"></script><!-- userinfo --> +<script src="http://[2001::1]"></script><!-- host-ipv6 --> +<script src="http://[2001::1]:80"></script><!-- host-ipv6-port --> +<script src="http://f:/c"></script><!-- port-none-but-colon --> +<script src="http://f:0/c"></script><!-- port-0 --> +<script src="http://f:00000000000000/c"></script><!-- port-00000000000000 --> +<script src="http://f:00000000000000000000080/c"></script><!-- port-00000000000000000000080 --> +<script src="http://a:b@c:29/d"></script><!-- userinfo-host-port-path --> +<script src="http://foo.com:b@d/"></script><!-- userinfo-username-non-alpha --> +<script src="http://foo/abcd?efgh?ijkl"></script><!-- query-contains-question-mark --> +<script src="http://foo/abcd#foo?bar"></script><!-- fragment-contains-question-mark --> +<script src="http://example.com/foo/%2e"></script><!-- path-percent-encoded-dot --> +<script src="http://example.com/%20foo"></script><!-- path-percent-encoded-space --> +<script src="http://example.com/©zbar"></script><!-- path-non-ascii --> +<script src="http://example.com/foo%41%7a"></script><!-- path-percent-encoded-multiple --> +<script src="http://example.com/foo%91"></script><!-- path-percent-encoded-u0091 --> +<script src="http://example.com/foo%00"></script><!-- path-percent-encoded-u0000 --> +<script src="http://example.com/%3A%3a%3C%3c"></script><!-- path-percent-encoded-mixed-case --> +<script src="http://example.com/你好你好"></script><!-- path-unicode-han --> +<script src="http://example.com//foo"></script><!-- path-uFEFF --> +<script src="http://example.com//foo//bar"></script><!-- path-u202E-u202D --> +<script src="http://💩"></script><!-- host-is-pile-of-poo --> +<script src="http💩//:foo"></script><!-- path-contains-pile-of-poo --> +<script src="http://example.com/foo?💩"></script><!-- query-contains-pile-of-poo --> +<script src="http://example.com/foo#💩"></script><!-- fragment-contains-pile-of-poo --> +<script src="http://192.0x00A80001"></script><!-- host-192.0x00A80001 --> +<script src="http://%25DOMAIN:foobar@foodomain.com"></script><!-- userinfo-username-contains-percent-encoded --> +<script src="http://@www.example.com"></script><!-- userinfo-empty --> +<script src="http://:b@www.example.com"></script><!-- userinfo-user-empty --> +<script src="http://a:@www.example.com"></script><!-- userinfo-password-empty --> +<script src="http://GOOgoo.com"></script><!-- host-exotic-whitespace --> +<script src="http://www.foo。bar.com"></script><!-- host-exotic-dot --> +<script src="http://Go.com"></script><!-- host-fullwidth --> +<script src="http://你好你好"></script><!-- host-idn-unicode-han --> +<script src="http://192.168.0.257/"></script><!-- host-IP-address-broken --> +<script src="//foo/bar"></script><!-- scheme-schemeless-relative --> +<script src="/"></script><!-- path-slash-only-relative --> +<script src="/a/b/c"></script><!-- path-simple-relative --> +<script src="/a%2fc"></script><!-- path-percent-encoded-slash-relative --> +<script src="/a/%2f/c"></script><!-- path-percent-encoded-slash-plus-slashes-relative --> +<script src="?"></script><!-- query-empty-no-path-relative --> +<script src="#"></script><!-- fragment-empty-hash-only-no-path-relative --> +<script src="#/"></script><!-- fragment-slash-relative --> +<script src="#;?"></script><!-- fragment-semicolon-question-mark-relative --> +<script src="#β"></script><!-- fragment-non-ascii-relative --> +<script src="foo.com"></script><!-- scheme-none-relative --> +<script src=":"></script><!-- path-colon-relative --> +<script src=":a"></script><!-- path-leading-colon-letter-relative --> +<script src=":foo.com"></script><!-- path-leading-colon-chars-relative --> +<script src=":/"></script><!-- path-leading-colon-slash-relative --> +<script src=":#"></script><!-- path-leading-colon-hash-relative --> +<script src=":23"></script><!-- path-leading-colon-number-relative --> +<script src="/:23"></script><!-- path-slash-colon-number-relative --> +<script src="::"></script><!-- path-leading-colon-colon-relative --> +<script src="::23"></script><!-- path-colon-colon-number-relative --> +<script src="💩http://foo"></script><!-- path-starts-with-pile-of-poo --> +<script src="/💩"></script><!-- path-slash-pile-of-poo --> +<script src="File://foo/bar.html"></script><!-- scheme-file-uppercase --> +<script src="file://C|/foo/bar"></script><!-- scheme-file-slash-slash-c-bar --> +<script src="file://server/foo/bar"></script><!-- scheme-file-host-included --> +<script src="file:///foo/bar.txt"></script><!-- scheme-file-host-empty --> +<script src="file:"></script><!-- scheme-file-scheme-only --> +<script src="file:/"></script><!-- scheme-file-slash-only --> +<script src="file://"></script><!-- scheme-file-slash-slash-only --> +<script src="file:///"></script><!-- scheme-file-slash-slash-slash-only --> +<script src="file:test"></script><!-- scheme-file-no-slash --> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src-whitespace-only-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src-whitespace-only-novalid.html new file mode 100644 index 0000000000..3d850fc735 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src-whitespace-only-novalid.html @@ -0,0 +1,5 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>empty src is not valid</title> +<script src=" +"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/fragment-backslash-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/fragment-backslash-novalid.html new file mode 100644 index 0000000000..55bcbb9f9a --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/fragment-backslash-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: fragment-backslash</title> +<script src="#\"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/fragment-contains-hash-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/fragment-contains-hash-novalid.html new file mode 100644 index 0000000000..03cab75058 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/fragment-contains-hash-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: fragment-contains-hash</title> +<script src="http://foo/path#f#g"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/fragment-leading-space-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/fragment-leading-space-novalid.html new file mode 100644 index 0000000000..0c97b6b1a6 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/fragment-leading-space-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: fragment-leading-space</title> +<script src="http://f:21/b# e"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-cr-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-cr-novalid.html new file mode 100644 index 0000000000..4e90cab023 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-cr-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: host-cr</title> +<script src="http://example.
org"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-double-percent-encoded-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-double-percent-encoded-novalid.html new file mode 100644 index 0000000000..229c0115f0 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-double-percent-encoded-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: host-double-percent-encoded</title> +<script src="http://%41.com"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-double-percent-encoded-percent-encoded-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-double-percent-encoded-percent-encoded-novalid.html new file mode 100644 index 0000000000..958c18e4b9 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-double-percent-encoded-percent-encoded-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: host-double-percent-encoded-percent-encoded</title> +<script src="http://%ef%bc%85%ef%bc%94%ef%bc%91.com"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-empty-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-empty-novalid.html new file mode 100644 index 0000000000..37338edcce --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-empty-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: host-empty</title> +<script src="http://"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-empty-userinfo-empty-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-empty-userinfo-empty-novalid.html new file mode 100644 index 0000000000..b8c12b06ed --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-empty-userinfo-empty-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: host-empty-userinfo-empty</title> +<script src="http://@/www.example.com"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-empty-with-userinfo-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-empty-with-userinfo-novalid.html new file mode 100644 index 0000000000..82e95ba5ec --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-empty-with-userinfo-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: host-empty-with-userinfo</title> +<script src="http://user:pass@/"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-hostname-in-brackets-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-hostname-in-brackets-novalid.html new file mode 100644 index 0000000000..63c908e807 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-hostname-in-brackets-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: host-hostname-in-brackets</title> +<script src="http://[www.google.com]/"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-invalid-unicode-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-invalid-unicode-novalid.html new file mode 100644 index 0000000000..38936b3b86 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-invalid-unicode-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: host-invalid-unicode</title> +<script src="http://zyx.com"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-invalid-unicode-percent-encoded-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-invalid-unicode-percent-encoded-novalid.html new file mode 100644 index 0000000000..1e3cac534e --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-invalid-unicode-percent-encoded-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: host-invalid-unicode-percent-encoded</title> +<script src="http://%ef%b7%90zyx.com"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-newline-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-newline-novalid.html new file mode 100644 index 0000000000..4995fe428c --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-newline-novalid.html @@ -0,0 +1,5 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: host-newline</title> +<script src="http://example. +org"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-space-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-space-novalid.html new file mode 100644 index 0000000000..676705ed88 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-space-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: host-space</title> +<script src="http://example .org"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-square-brackets-port-contains-colon-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-square-brackets-port-contains-colon-novalid.html new file mode 100644 index 0000000000..4f8581e69a --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-square-brackets-port-contains-colon-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: host-square-brackets-port-contains-colon</title> +<script src="http://[1::2]:3:4"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-tab-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-tab-novalid.html new file mode 100644 index 0000000000..58a8aecd69 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-tab-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: host-tab</title> +<script src="http://example .org"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-u0000-percent-encoded-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-u0000-percent-encoded-novalid.html new file mode 100644 index 0000000000..c58b09b9df --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-u0000-percent-encoded-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: host-u0000-percent-encoded</title> +<script src="http://%00.com"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-u0000-percent-encoded-percent-encoded-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-u0000-percent-encoded-percent-encoded-novalid.html new file mode 100644 index 0000000000..f659cf0d5b --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/host-u0000-percent-encoded-percent-encoded-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: host-u0000-percent-encoded-percent-encoded</title> +<script src="http://%ef%bc%85%ef%bc%90%ef%bc%90.com"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/path-bare-percent-sign-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/path-bare-percent-sign-novalid.html new file mode 100644 index 0000000000..c23ef7bc93 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/path-bare-percent-sign-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: path-bare-percent-sign</title> +<script src="http://example.com/foo%"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/path-contains-space-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/path-contains-space-novalid.html new file mode 100644 index 0000000000..f54c9aeaa8 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/path-contains-space-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: path-contains-space</title> +<script src="/a/ /c"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/path-leading-backslash-at-sign-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/path-leading-backslash-at-sign-novalid.html new file mode 100644 index 0000000000..f8a8317d05 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/path-leading-backslash-at-sign-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: path-leading-backslash-at-sign</title> +<script src="http://foo.com/\@"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/path-leading-colon-backslash-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/path-leading-colon-backslash-novalid.html new file mode 100644 index 0000000000..df39dc2fdf --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/path-leading-colon-backslash-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: path-leading-colon-backslash</title> +<script src=":\"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/path-leading-colon-chars-backslash-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/path-leading-colon-chars-backslash-novalid.html new file mode 100644 index 0000000000..af8803b602 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/path-leading-colon-chars-backslash-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: path-leading-colon-chars-backslash</title> +<script src=":foo.com\"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/path-leading-space-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/path-leading-space-novalid.html new file mode 100644 index 0000000000..49d0a41cbf --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/path-leading-space-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: path-leading-space</title> +<script src="http://f:21/ b"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/path-percent-encoded-malformed-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/path-percent-encoded-malformed-novalid.html new file mode 100644 index 0000000000..99d207f402 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/path-percent-encoded-malformed-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: path-percent-encoded-malformed</title> +<script src="http://example.com/foo/%2e%2"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/path-relative-square-brackets-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/path-relative-square-brackets-novalid.html new file mode 100644 index 0000000000..3f2447018c --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/path-relative-square-brackets-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: path-relative-square-brackets</title> +<script src="[61:24:74]:98"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/path-tab-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/path-tab-novalid.html new file mode 100644 index 0000000000..28f15327a0 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/path-tab-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: path-tab</title> +<script src="http://example.com/foo bar"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/path-trailing-space-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/path-trailing-space-novalid.html new file mode 100644 index 0000000000..157fd07dc4 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/path-trailing-space-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: path-trailing-space</title> +<script src="http://f:21/b ?"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/path-u0091-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/path-u0091-novalid.html new file mode 100644 index 0000000000..5ff1dfb7a4 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/path-u0091-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: path-u0091</title> +<script src="http://example.com/foo"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/port-999999-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/port-999999-novalid.html new file mode 100644 index 0000000000..e9fc4b917b --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/port-999999-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: port-999999</title> +<script src="http://f:999999/c"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/port-cr-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/port-cr-novalid.html new file mode 100644 index 0000000000..14cc85f13f --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/port-cr-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: port-cr</title> +<script src="http://f:
/c"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/port-leading-colon-bracket-colon-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/port-leading-colon-bracket-colon-novalid.html new file mode 100644 index 0000000000..b20a459624 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/port-leading-colon-bracket-colon-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: port-leading-colon-bracket-colon</title> +<script src="http://2001::1]:80"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/port-leading-colon-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/port-leading-colon-novalid.html new file mode 100644 index 0000000000..5e2e7db787 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/port-leading-colon-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: port-leading-colon</title> +<script src="http://2001::1"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/port-leading-dash-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/port-leading-dash-novalid.html new file mode 100644 index 0000000000..ce486bcca1 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/port-leading-dash-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: port-leading-dash</title> +<script src="http://foo:-80/"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/port-multiple-letters-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/port-multiple-letters-novalid.html new file mode 100644 index 0000000000..2f7174ec1a --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/port-multiple-letters-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: port-multiple-letters</title> +<script src="http://f:fifty-two/c"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/port-newline-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/port-newline-novalid.html new file mode 100644 index 0000000000..003f9d489c --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/port-newline-novalid.html @@ -0,0 +1,5 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: port-newline</title> +<script src="http://f: +/c"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/port-single-letter-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/port-single-letter-novalid.html new file mode 100644 index 0000000000..c57c169484 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/port-single-letter-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: port-single-letter</title> +<script src="http://f:b/c"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/port-space-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/port-space-novalid.html new file mode 100644 index 0000000000..ed84a101e6 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/port-space-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: port-space</title> +<script src="http://f: /c"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/port-tab-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/port-tab-novalid.html new file mode 100644 index 0000000000..fca9c6b9ce --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/port-tab-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: port-tab</title> +<script src="http://f: /c"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/query-leading-space-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/query-leading-space-novalid.html new file mode 100644 index 0000000000..f864a2a065 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/query-leading-space-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: query-leading-space</title> +<script src="http://f:21/b? d"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/query-trailing-space-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/query-trailing-space-novalid.html new file mode 100644 index 0000000000..92a5453cb9 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/query-trailing-space-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: query-trailing-space</title> +<script src="http://f:21/b?d #"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-data-contains-fragment-haswarn.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-data-contains-fragment-haswarn.html new file mode 100644 index 0000000000..f26fb056d9 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-data-contains-fragment-haswarn.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>data:text/html,test#test warning: scheme-data-contains-fragment</title> +<script src="data:text/html,test#test"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-data-single-slash-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-data-single-slash-novalid.html new file mode 100644 index 0000000000..1bae7962e2 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-data-single-slash-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: scheme-data-single-slash</title> +<script src="data:/example.com/"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-file-backslash-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-file-backslash-novalid.html new file mode 100644 index 0000000000..d23ad76fda --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-file-backslash-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: scheme-file-backslash</title> +<script src="file:c:\foo\bar.html"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-file-single-slash-c-bar-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-file-single-slash-c-bar-novalid.html new file mode 100644 index 0000000000..5efd30aaae --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-file-single-slash-c-bar-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: scheme-file-single-slash-c-bar</title> +<script src="file:/C|/foo/bar"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-file-slash-slash-abc-bar-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-file-slash-slash-abc-bar-novalid.html new file mode 100644 index 0000000000..42b33d4413 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-file-slash-slash-abc-bar-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: scheme-file-slash-slash-abc-bar</title> +<script src="file://abc|/foo/bar"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-file-triple-slash-c-bar-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-file-triple-slash-c-bar-novalid.html new file mode 100644 index 0000000000..b9b9db1ee9 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-file-triple-slash-c-bar-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: scheme-file-triple-slash-c-bar</title> +<script src="file:///C|/foo/bar"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-ftp-no-slash-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-ftp-no-slash-novalid.html new file mode 100644 index 0000000000..9dfcff8470 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-ftp-no-slash-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: scheme-ftp-no-slash</title> +<script src="ftp:example.com/"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-ftp-single-slash-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-ftp-single-slash-novalid.html new file mode 100644 index 0000000000..7d641fa5b3 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-ftp-single-slash-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: scheme-ftp-single-slash</title> +<script src="ftp:/example.com/"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-http-backslash-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-http-backslash-novalid.html new file mode 100644 index 0000000000..5b1877e885 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-http-backslash-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: scheme-http-backslash</title> +<script src="http:\\foo.com\"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-http-no-slash-colon-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-http-no-slash-colon-novalid.html new file mode 100644 index 0000000000..fa9437aba5 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-http-no-slash-colon-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: scheme-http-no-slash-colon</title> +<script src="http::@c:29"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-http-no-slash-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-http-no-slash-novalid.html new file mode 100644 index 0000000000..5e0848eaac --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-http-no-slash-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: scheme-http-no-slash</title> +<script src="http:foo.com"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-http-no-slash-square-bracket-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-http-no-slash-square-bracket-novalid.html new file mode 100644 index 0000000000..bb4642fc70 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-http-no-slash-square-bracket-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: scheme-http-no-slash-square-bracket</title> +<script src="http:[61:27]/:foo"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-http-single-slash-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-http-single-slash-novalid.html new file mode 100644 index 0000000000..90a94ef29b --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-http-single-slash-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: scheme-http-single-slash</title> +<script src="http:/example.com/"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-https-no-slash-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-https-no-slash-novalid.html new file mode 100644 index 0000000000..63c8ba3cda --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-https-no-slash-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: scheme-https-no-slash</title> +<script src="https:example.com/"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-https-single-slash-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-https-single-slash-novalid.html new file mode 100644 index 0000000000..656fdc01b8 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-https-single-slash-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: scheme-https-single-slash</title> +<script src="https:/example.com/"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-trailing-cr-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-trailing-cr-novalid.html new file mode 100644 index 0000000000..3c97e99758 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-trailing-cr-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: scheme-trailing-cr</title> +<script src="a:
foo.com"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-trailing-newline-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-trailing-newline-novalid.html new file mode 100644 index 0000000000..a0415fb9cd --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-trailing-newline-novalid.html @@ -0,0 +1,5 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: scheme-trailing-newline</title> +<script src="a: +foo.com"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-trailing-space-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-trailing-space-novalid.html new file mode 100644 index 0000000000..e500ae56e0 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-trailing-space-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: scheme-trailing-space</title> +<script src="a: foo.com"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-trailing-tab-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-trailing-tab-novalid.html new file mode 100644 index 0000000000..37449448eb --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/scheme-trailing-tab-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: scheme-trailing-tab</title> +<script src="a: foo.com"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/userinfo-backslash-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/userinfo-backslash-novalid.html new file mode 100644 index 0000000000..44419f43a7 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/userinfo-backslash-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: userinfo-backslash</title> +<script src="http://a\b:c\d@foo.com"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/userinfo-password-bad-chars-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/userinfo-password-bad-chars-novalid.html new file mode 100644 index 0000000000..b9a2992360 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/userinfo-password-bad-chars-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: userinfo-password-bad-chars</title> +<script src="http://&a:foo(b]c@d:2/"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/userinfo-password-contains-pile-of-poo-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/userinfo-password-contains-pile-of-poo-novalid.html new file mode 100644 index 0000000000..26baccf602 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/userinfo-password-contains-pile-of-poo-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: userinfo-password-contains-pile-of-poo</title> +<script src="http://foo:💩@example.com"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/userinfo-username-contains-at-sign-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/userinfo-username-contains-at-sign-novalid.html new file mode 100644 index 0000000000..38e21c6ea6 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/userinfo-username-contains-at-sign-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: userinfo-username-contains-at-sign</title> +<script src="http://::@c@d:2"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/src/userinfo-username-contains-pile-of-poo-novalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/userinfo-username-contains-pile-of-poo-novalid.html new file mode 100644 index 0000000000..dd331c5ff9 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/src/userinfo-username-contains-pile-of-poo-novalid.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>invalid src: userinfo-username-contains-pile-of-poo</title> +<script src="http://💩:foo@example.com"></script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/streams-demo-append-child-isvalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/streams-demo-append-child-isvalid.html new file mode 100644 index 0000000000..d2fdf78b56 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/streams-demo-append-child-isvalid.html @@ -0,0 +1,98 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Append child writable stream demo</title> + +<script src="transforms/transform-stream-polyfill.js"></script> +<script src="transforms/text-encode-transform.js"></script> +<script src="transforms/parse-json.js"></script> +<script src="transforms/split-stream.js"></script> +<script src="resources/highlight.pack.js"></script> +<script src="resources/web-animations.min.js"></script> +<script src="tags/view-source.js"></script> + +<link rel=stylesheet href="resources/common.css"> +<link rel=stylesheet href="resources/commits.css"> + +<h1>Append child writable stream demo</h1> +<a id=back-to-index href=index.html>Back to demo index</a> +<view-source></view-source> + +<div id=buttons> + <button id="load">Load JSON stream</button> + <button id="reset">Reset</button> +</div> + +<div id=target></div> + +<script> +'use strict'; +const loadButton = document.querySelector('#load'); +const resetButton = document.querySelector('#reset'); +const targetDiv = document.querySelector('#target'); +const FIELDS = ['Hash', 'Date', 'Author', 'Subject']; +const FIELDS_LOWERCASE = FIELDS.map(string => string.toLowerCase()); + +function createTable(parentElement) { + const table = document.createElement('table'); + table.id = 'commits'; + const tr = document.createElement('tr'); + for (const heading of FIELDS) { + const th = document.createElement('th'); + th.textContent = heading; + tr.appendChild(th); + } + table.appendChild(tr); + parentElement.appendChild(table); + return table; +} + +// BEGIN SOURCE TO VIEW +function appendChildWritableStream(parentNode) { + return new WritableStream({ + write(chunk) { + parentNode.appendChild(chunk); + } + }); +} + +async function fetchThenJSONToDOM() { + const jsonToElementTransform = new TransformStream({ + transform(chunk, controller) { + const tr = document.createElement('tr'); + for (const cell of FIELDS_LOWERCASE) { + const td = document.createElement('td'); + td.textContent = chunk[cell]; + tr.appendChild(td); + } + controller.enqueue(tr); + } + }); + + const response = await fetch('data/commits.json', + { + mode: 'same-origin', + headers: { + 'Cache-Control': 'no-cache, no-store' + } + }); + + const table = createTable(targetDiv); + return response.body + .pipeThrough(new TextDecoder()) + .pipeThrough(splitStream('\n')) + .pipeThrough(parseJSON()) + .pipeThrough(jsonToElementTransform) + .pipeTo(appendChildWritableStream(table)); +} +// END SOURCE TO VIEW + +loadButton.onclick = () => { + loadButton.disabled = true; + setTimeout(fetchThenJSONToDOM, 0); +}; + +resetButton.onclick = () => { + targetDiv.innerHTML = ''; + loadButton.disabled = false; +}; +</script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/streams-demo-streaming-element-backpressure-isvalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/streams-demo-streaming-element-backpressure-isvalid.html new file mode 100644 index 0000000000..35bf133571 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/streams-demo-streaming-element-backpressure-isvalid.html @@ -0,0 +1,60 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Streaming element with backpressure demo</title> + +<script src="transforms/transform-stream-polyfill.js"></script> +<script src="transforms/text-encode-transform.js"></script> +<script src="tags/streaming-element-backpressure.js"></script> +<script src="resources/highlight.pack.js"></script> +<script src="resources/web-animations.min.js"></script> +<script src="tags/view-source.js"></script> + +<link rel=stylesheet href="resources/common.css"> +<link rel=stylesheet href="resources/jank-meter.css"> +<link rel=stylesheet href="resources/commits.css"> + +<h1>Streaming element with backpressure demo</h1> +<a id=back-to-index href=index.html>Back to demo index</a> +<view-source></view-source> + +<div id=buttons> + <button id="load">Load HTML stream, applying backpressure</button> + <button id="reset">Reset</button> +</div> + +<div id=jank-meter>JANK METER</div> + +<streaming-element-backpressure id=target></streaming-element-backpressure> + +<script> +'use strict'; +const loadButton = document.querySelector('#load'); +const resetButton = document.querySelector('#reset'); +const targetDiv = document.querySelector('#target'); + +loadButton.onclick = async () => { + loadButton.disabled = true; + fetchDirectlyIntoDOM(); +}; + +// BEGIN SOURCE TO VIEW +async function fetchDirectlyIntoDOM() { + const response = await fetch('data/commits.include', + { + mode: 'same-origin', + headers: { + 'Cache-Control': 'no-cache, no-store' + } + }); + + await response.body + .pipeThrough(new TextDecoder()) + .pipeTo(targetDiv.writable); +} +// END SOURCE TO VIEW + +resetButton.onclick = () => { + targetDiv.reset(); + loadButton.disabled = false; +}; +</script> diff --git a/testing/web-platform/tests/conformance-checkers/html/elements/script/streams-demo-streaming-element-isvalid.html b/testing/web-platform/tests/conformance-checkers/html/elements/script/streams-demo-streaming-element-isvalid.html new file mode 100644 index 0000000000..c9c70d5487 --- /dev/null +++ b/testing/web-platform/tests/conformance-checkers/html/elements/script/streams-demo-streaming-element-isvalid.html @@ -0,0 +1,60 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Streaming element demo</title> + +<script src="transforms/transform-stream-polyfill.js"></script> +<script src="transforms/text-encode-transform.js"></script> +<script src="tags/streaming-element.js"></script> +<script src="resources/highlight.pack.js"></script> +<script src="resources/web-animations.min.js"></script> +<script src="tags/view-source.js"></script> + +<link rel=stylesheet href="resources/common.css"> +<link rel=stylesheet href="resources/jank-meter.css"> +<link rel=stylesheet href="resources/commits.css"> + +<h1>Streaming element demo</h1> +<a id=back-to-index href=index.html>Back to demo index</a> +<view-source></view-source> + +<div id=buttons> + <button id="load">Load HTML stream</button> + <button id="reset">Reset</button> +</div> + +<div id=jank-meter>JANK METER</div> + +<streaming-element id=target></streaming-element> + +<script> +'use strict'; +const loadButton = document.querySelector('#load'); +const resetButton = document.querySelector('#reset'); +const targetDiv = document.querySelector('#target'); + +// BEGIN SOURCE TO VIEW +async function streamDirectlyIntoDOM() { + const response = await fetch('data/commits.include', + { + mode: 'same-origin', + headers: { + 'Cache-Control': 'no-cache, no-store' + } + }); + + await response.body + .pipeThrough(new TextDecoder()) + .pipeTo(targetDiv.writable); +} + +loadButton.onclick = () => { + loadButton.disabled = true; + streamDirectlyIntoDOM(); +}; +// END SOURCE TO VIEW + +resetButton.onclick = () => { + targetDiv.reset(); + loadButton.disabled = false; +}; +</script> |