summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-syntax/charset
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/css/css-syntax/charset
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-syntax/charset')
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/.htaccess4
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/MANIFEST20
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/page-utf16-css-bomless-utf16.htmlbin0 -> 1196 bytes
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/page-utf16-css-bomless-utf16be.htmlbin0 -> 1206 bytes
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/page-utf16-css-no-decl-ascii-only.htmlbin0 -> 1198 bytes
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/page-utf16-css-no-decl.htmlbin0 -> 1188 bytes
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-charset-attribute-bogus.html17
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-at-charset-1250-charset-attribute-windows-1253.html17
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-at-charset-bogus-charset-attribute-windows-1250.html17
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-at-charset-bogus.html17
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-at-charset-utf16-ascii-only.html17
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-at-charset-utf16.html17
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-at-charset-utf16be.html17
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-at-charset-windows-1250-in-utf16.html23
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-at-charset-windows-1250-in-utf16be.html23
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-http-bogus-at-charset-windows-1250.html17
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-http-bogus.html17
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-http-windows-1250-at-charset-windows-1253.html17
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-no-decl.html17
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-utf8-bom.html17
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/page-windows-1252-http-windows-1251-css-utf8-bom.html17
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/support/MANIFEST15
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/support/at-charset-bogus.css2
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/support/at-charset-utf16-ascii-only.css2
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/support/at-charset-utf16.css2
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/support/at-charset-utf16be.css2
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/support/at-charset-windows-1250-in-utf16.cssbin0 -> 77 bytes
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/support/at-charset-windows-1250-in-utf16be.cssbin0 -> 77 bytes
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/support/at-charset-windows-1250.css2
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/support/bomless-utf16.cssbin0 -> 52 bytes
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/support/bomless-utf16be.cssbin0 -> 52 bytes
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/support/http-bogus-at-charset-windows-1250.bogus.css2
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/support/http-bogus-at-charset-windows-1250.bogus.css.headers1
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/support/http-bogus.bogus.css1
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/support/http-bogus.bogus.css.headers1
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/support/http-windows-1250-at-charset-windows-1253.windows1250.css2
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/support/http-windows-1250-at-charset-windows-1253.windows1250.css.headers1
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/support/no-decl-ascii-only.css1
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/support/no-decl.css1
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/support/utf8-bom-http-windows-1251.css1
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/support/utf8-bom-http-windows-1251.css.headers1
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/support/utf8-bom.css1
-rw-r--r--testing/web-platform/tests/css/css-syntax/charset/xml-stylesheet-page-windows-1251-charset-attribute-windows-1250.xhtml20
43 files changed, 349 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-syntax/charset/.htaccess b/testing/web-platform/tests/css/css-syntax/charset/.htaccess
new file mode 100644
index 0000000000..e14b20d395
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/.htaccess
@@ -0,0 +1,4 @@
+IndexOptions NameWidth=*
+AddDefaultCharset Off
+AddCharset bogus .bogus
+AddCharset windows-1250 .windows1250
diff --git a/testing/web-platform/tests/css/css-syntax/charset/MANIFEST b/testing/web-platform/tests/css/css-syntax/charset/MANIFEST
new file mode 100644
index 0000000000..4bc83f6e70
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/MANIFEST
@@ -0,0 +1,20 @@
+page-utf16-css-bomless-utf16be.html
+page-utf16-css-bomless-utf16.html
+page-utf16-css-no-decl-ascii-only.html
+page-utf16-css-no-decl.html
+page-windows-1251-charset-attribute-bogus.html
+page-windows-1251-css-at-charset-1250-charset-attribute-windows-1253.html
+page-windows-1251-css-at-charset-bogus-charset-attribute-windows-1250.html
+page-windows-1251-css-at-charset-bogus.html
+page-windows-1251-css-at-charset-utf16-ascii-only.html
+page-windows-1251-css-at-charset-utf16be.html
+page-windows-1251-css-at-charset-utf16.html
+page-windows-1251-css-at-charset-windows-1250-in-utf16be.html
+page-windows-1251-css-at-charset-windows-1250-in-utf16.html
+page-windows-1251-css-http-bogus-at-charset-windows-1250.html
+page-windows-1251-css-http-bogus.html
+page-windows-1251-css-http-windows-1250-at-charset-windows-1253.html
+page-windows-1251-css-no-decl.html
+page-windows-1251-css-utf8-bom.html
+dir support
+xml-stylesheet-page-windows-1251-charset-attribute-windows-1250.xhtml
diff --git a/testing/web-platform/tests/css/css-syntax/charset/page-utf16-css-bomless-utf16.html b/testing/web-platform/tests/css/css-syntax/charset/page-utf16-css-bomless-utf16.html
new file mode 100644
index 0000000000..f98bc211b1
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/page-utf16-css-bomless-utf16.html
Binary files differ
diff --git a/testing/web-platform/tests/css/css-syntax/charset/page-utf16-css-bomless-utf16be.html b/testing/web-platform/tests/css/css-syntax/charset/page-utf16-css-bomless-utf16be.html
new file mode 100644
index 0000000000..1d4728322d
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/page-utf16-css-bomless-utf16be.html
Binary files differ
diff --git a/testing/web-platform/tests/css/css-syntax/charset/page-utf16-css-no-decl-ascii-only.html b/testing/web-platform/tests/css/css-syntax/charset/page-utf16-css-no-decl-ascii-only.html
new file mode 100644
index 0000000000..56e09ace11
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/page-utf16-css-no-decl-ascii-only.html
Binary files differ
diff --git a/testing/web-platform/tests/css/css-syntax/charset/page-utf16-css-no-decl.html b/testing/web-platform/tests/css/css-syntax/charset/page-utf16-css-no-decl.html
new file mode 100644
index 0000000000..2ff52cf5d7
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/page-utf16-css-no-decl.html
Binary files differ
diff --git a/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-charset-attribute-bogus.html b/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-charset-attribute-bogus.html
new file mode 100644
index 0000000000..939143a763
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-charset-attribute-bogus.html
@@ -0,0 +1,17 @@
+<!doctype html>
+<title>CSS charset: page windows-1251, charset attribute bogus</title>
+<link rel=help href="https://drafts.csswg.org/css-syntax-3/#determine-the-fallback-encoding">
+<meta charset=windows-1251>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<link rel=stylesheet href="support/no-decl.css" charset="bogus">
+<div id=log></div>
+<div id=&#x0418;></div>
+<script>
+var elm = document.getElementById('\u0418');
+var t = async_test();
+onload = t.step_func(function(){
+ assert_equals(getComputedStyle(elm, '').visibility, 'hidden');
+ this.done();
+});
+</script>
diff --git a/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-at-charset-1250-charset-attribute-windows-1253.html b/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-at-charset-1250-charset-attribute-windows-1253.html
new file mode 100644
index 0000000000..df51dfa30c
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-at-charset-1250-charset-attribute-windows-1253.html
@@ -0,0 +1,17 @@
+<!doctype html>
+<title>CSS charset: page windows-1251, @charset windows-1250, charset attribute windows-1253</title>
+<link rel=help href="https://drafts.csswg.org/css-syntax-3/#determine-the-fallback-encoding">
+<meta charset=windows-1251>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<link rel=stylesheet href="support/at-charset-windows-1250.css" charset=windows-1253>
+<div id=log></div>
+<div id=&#x010C;></div>
+<script>
+var elm = document.getElementById('\u010C');
+var t = async_test();
+onload = t.step_func(function(){
+ assert_equals(getComputedStyle(elm, '').visibility, 'hidden');
+ this.done();
+});
+</script>
diff --git a/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-at-charset-bogus-charset-attribute-windows-1250.html b/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-at-charset-bogus-charset-attribute-windows-1250.html
new file mode 100644
index 0000000000..7521e85afe
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-at-charset-bogus-charset-attribute-windows-1250.html
@@ -0,0 +1,17 @@
+<!doctype html>
+<title>CSS charset: page windows-1251, CSS @charset bogus, charset attribute windows-1250</title>
+<link rel=help href="https://drafts.csswg.org/css-syntax-3/#determine-the-fallback-encoding">
+<meta charset=windows-1251>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<link rel=stylesheet href="support/at-charset-bogus.css" charset=windows-1250>
+<div id=log></div>
+<div id=&#x010C;></div>
+<script>
+var elm = document.getElementById('\u010C');
+var t = async_test();
+onload = t.step_func(function(){
+ assert_equals(getComputedStyle(elm, '').visibility, 'hidden');
+ this.done();
+});
+</script>
diff --git a/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-at-charset-bogus.html b/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-at-charset-bogus.html
new file mode 100644
index 0000000000..2d7c3ef611
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-at-charset-bogus.html
@@ -0,0 +1,17 @@
+<!doctype html>
+<title>CSS charset: page windows-1251, @charset bogus</title>
+<link rel=help href="https://drafts.csswg.org/css-syntax-3/#determine-the-fallback-encoding">
+<meta charset=windows-1251>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<link rel=stylesheet href="support/at-charset-bogus.css">
+<div id=log></div>
+<div id=&#x0418;></div>
+<script>
+var elm = document.getElementById('\u0418');
+var t = async_test();
+onload = t.step_func(function(){
+ assert_equals(getComputedStyle(elm, '').visibility, 'hidden');
+ this.done();
+});
+</script>
diff --git a/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-at-charset-utf16-ascii-only.html b/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-at-charset-utf16-ascii-only.html
new file mode 100644
index 0000000000..d65afd31f5
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-at-charset-utf16-ascii-only.html
@@ -0,0 +1,17 @@
+<!doctype html>
+<title>CSS charset: page windows-1251, CSS @charset utf-16 (ASCII only)</title>
+<link rel=help href="https://drafts.csswg.org/css-syntax-3/#determine-the-fallback-encoding">
+<meta charset=windows-1251>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<link rel=stylesheet href="support/at-charset-utf16-ascii-only.css">
+<div id=log></div>
+<div id=foo></div>
+<script>
+var elm = document.getElementById('foo');
+var t = async_test();
+onload = t.step_func(function(){
+ assert_equals(getComputedStyle(elm, '').visibility, 'hidden');
+ this.done();
+});
+</script>
diff --git a/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-at-charset-utf16.html b/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-at-charset-utf16.html
new file mode 100644
index 0000000000..04c1270e0c
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-at-charset-utf16.html
@@ -0,0 +1,17 @@
+<!doctype html>
+<title>CSS charset: page windows-1251, CSS @charset utf-16</title>
+<link rel=help href="https://drafts.csswg.org/css-syntax-3/#determine-the-fallback-encoding">
+<meta charset=windows-1251>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<link rel=stylesheet href="support/at-charset-utf16.css">
+<div id=log></div>
+<div id=&#xfffd;></div>
+<script>
+var elm = document.getElementById('\ufffd');
+var t = async_test();
+onload = t.step_func(function(){
+ assert_equals(getComputedStyle(elm, '').visibility, 'hidden');
+ this.done();
+});
+</script>
diff --git a/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-at-charset-utf16be.html b/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-at-charset-utf16be.html
new file mode 100644
index 0000000000..4b2d48dbc1
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-at-charset-utf16be.html
@@ -0,0 +1,17 @@
+<!doctype html>
+<title>CSS charset: page windows-1251, CSS @charset utf-16be</title>
+<link rel=help href="https://drafts.csswg.org/css-syntax-3/#determine-the-fallback-encoding">
+<meta charset=windows-1251>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<link rel=stylesheet href="support/at-charset-utf16be.css">
+<div id=log></div>
+<div id=&#xfffd;></div>
+<script>
+var elm = document.getElementById('\ufffd');
+var t = async_test();
+onload = t.step_func(function(){
+ assert_equals(getComputedStyle(elm, '').visibility, 'hidden');
+ this.done();
+});
+</script>
diff --git a/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-at-charset-windows-1250-in-utf16.html b/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-at-charset-windows-1250-in-utf16.html
new file mode 100644
index 0000000000..463e3778f6
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-at-charset-windows-1250-in-utf16.html
@@ -0,0 +1,23 @@
+<!doctype html>
+<title>CSS charset: page windows-1251, CSS @charset windows-1250 in utf-16</title>
+<link rel=help href="https://drafts.csswg.org/css-syntax-3/#determine-the-fallback-encoding">
+<meta charset=windows-1251>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<link rel=stylesheet href="support/at-charset-windows-1250-in-utf16.css">
+<div id=log></div>
+<div id=&#xfffd;></div>
+<div id=&#x0418;></div>
+<div id=&#x010c;></div>
+<script>
+var elm_fffd = document.getElementById('\ufffd');
+var elm_0418 = document.getElementById('\u0418');
+var elm_010c = document.getElementById('\u010c');
+var t = async_test();
+onload = t.step_func(function(){
+ assert_equals(getComputedStyle(elm_fffd, '').visibility, 'visible', 'selector U+FFFD matched (utf-8)');
+ assert_equals(getComputedStyle(elm_0418, '').visibility, 'hidden', 'selector U+0418 did not match (windows-1251)');
+ assert_equals(getComputedStyle(elm_010c, '').visibility, 'visible', 'selector U+010C matched (windows-1250)');
+ this.done();
+});
+</script>
diff --git a/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-at-charset-windows-1250-in-utf16be.html b/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-at-charset-windows-1250-in-utf16be.html
new file mode 100644
index 0000000000..7de3f37d9b
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-at-charset-windows-1250-in-utf16be.html
@@ -0,0 +1,23 @@
+<!doctype html>
+<title>CSS charset: page windows-1251, CSS @charset windows-1250 in utf-16be</title>
+<link rel=help href="https://drafts.csswg.org/css-syntax-3/#determine-the-fallback-encoding">
+<meta charset=windows-1251>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<link rel=stylesheet href="support/at-charset-windows-1250-in-utf16be.css">
+<div id=log></div>
+<div id=&#xfffd;></div>
+<div id=&#x0418;></div>
+<div id=&#x010c;></div>
+<script>
+var elm_fffd = document.getElementById('\ufffd');
+var elm_0418 = document.getElementById('\u0418');
+var elm_010c = document.getElementById('\u010c');
+var t = async_test();
+onload = t.step_func(function(){
+ assert_equals(getComputedStyle(elm_fffd, '').visibility, 'visible', 'selector U+FFFD matched (utf-8)');
+ assert_equals(getComputedStyle(elm_0418, '').visibility, 'hidden', 'selector U+0418 did not match (windows-1251)');
+ assert_equals(getComputedStyle(elm_010c, '').visibility, 'visible', 'selector U+010C matched (windows-1250)');
+ this.done();
+});
+</script>
diff --git a/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-http-bogus-at-charset-windows-1250.html b/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-http-bogus-at-charset-windows-1250.html
new file mode 100644
index 0000000000..2fcc56bca9
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-http-bogus-at-charset-windows-1250.html
@@ -0,0 +1,17 @@
+<!doctype html>
+<title>CSS charset: page windows-1251, CSS HTTP bogus, @charset windows-1250</title>
+<link rel=help href="https://drafts.csswg.org/css-syntax-3/#determine-the-fallback-encoding">
+<meta charset=windows-1251>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<link rel=stylesheet href="support/http-bogus-at-charset-windows-1250.bogus.css">
+<div id=log></div>
+<div id=&#x010C;></div>
+<script>
+var elm = document.getElementById('\u010C');
+var t = async_test();
+onload = t.step_func(function(){
+ assert_equals(getComputedStyle(elm, '').visibility, 'hidden');
+ this.done();
+});
+</script>
diff --git a/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-http-bogus.html b/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-http-bogus.html
new file mode 100644
index 0000000000..e26501b9eb
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-http-bogus.html
@@ -0,0 +1,17 @@
+<!doctype html>
+<title>CSS charset: page windows-1251, CSS HTTP bogus</title>
+<link rel=help href="https://drafts.csswg.org/css-syntax-3/#determine-the-fallback-encoding">
+<meta charset=windows-1251>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<link rel=stylesheet href="support/http-bogus.bogus.css">
+<div id=log></div>
+<div id=&#x0418;></div>
+<script>
+var elm = document.getElementById('\u0418');
+var t = async_test();
+onload = t.step_func(function(){
+ assert_equals(getComputedStyle(elm, '').visibility, 'hidden');
+ this.done();
+});
+</script>
diff --git a/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-http-windows-1250-at-charset-windows-1253.html b/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-http-windows-1250-at-charset-windows-1253.html
new file mode 100644
index 0000000000..3658e445f8
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-http-windows-1250-at-charset-windows-1253.html
@@ -0,0 +1,17 @@
+<!doctype html>
+<title>CSS charset: page windows-1251, CSS HTTP windows-1250, @charset windows-1253</title>
+<link rel=help href="https://drafts.csswg.org/css-syntax-3/#determine-the-fallback-encoding">
+<meta charset=windows-1251>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<link rel=stylesheet href="support/http-windows-1250-at-charset-windows-1253.windows1250.css">
+<div id=log></div>
+<div id=&#x010C;></div>
+<script>
+var elm = document.getElementById('\u010C');
+var t = async_test();
+onload = t.step_func(function(){
+ assert_equals(getComputedStyle(elm, '').visibility, 'hidden');
+ this.done();
+});
+</script>
diff --git a/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-no-decl.html b/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-no-decl.html
new file mode 100644
index 0000000000..288f01efbd
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-no-decl.html
@@ -0,0 +1,17 @@
+<!doctype html>
+<title>CSS charset: page windows-1251, CSS no decl</title>
+<link rel=help href="https://drafts.csswg.org/css-syntax-3/#determine-the-fallback-encoding">
+<meta charset=windows-1251>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<link rel=stylesheet href="support/no-decl.css">
+<div id=log></div>
+<div id=&#x0418;></div>
+<script>
+var elm = document.getElementById('\u0418');
+var t = async_test();
+onload = t.step_func(function(){
+ assert_equals(getComputedStyle(elm, '').visibility, 'hidden');
+ this.done();
+});
+</script>
diff --git a/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-utf8-bom.html b/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-utf8-bom.html
new file mode 100644
index 0000000000..2c32f09151
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/page-windows-1251-css-utf8-bom.html
@@ -0,0 +1,17 @@
+<!doctype html>
+<title>CSS charset: page windows-1251, CSS UTF-8 BOM</title>
+<link rel=help href="https://drafts.csswg.org/css-syntax-3/#determine-the-fallback-encoding">
+<meta charset=windows-1251>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<link rel=stylesheet href="support/utf8-bom.css">
+<div id=log></div>
+<div id=&#xfffd;></div>
+<script>
+var elm = document.getElementById('\ufffd');
+var t = async_test();
+onload = t.step_func(function(){
+ assert_equals(getComputedStyle(elm, '').visibility, 'hidden');
+ this.done();
+});
+</script>
diff --git a/testing/web-platform/tests/css/css-syntax/charset/page-windows-1252-http-windows-1251-css-utf8-bom.html b/testing/web-platform/tests/css/css-syntax/charset/page-windows-1252-http-windows-1251-css-utf8-bom.html
new file mode 100644
index 0000000000..6a65942e16
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/page-windows-1252-http-windows-1251-css-utf8-bom.html
@@ -0,0 +1,17 @@
+<!doctype html>
+<title>CSS charset: page windows-1252, CSS-HTTP windows-1251, CSS UTF-8 BOM</title>
+<link rel=help href="https://drafts.csswg.org/css-syntax-3/#determine-the-fallback-encoding">
+<meta charset=windows-1252>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<link rel=stylesheet href="support/utf8-bom-http-windows-1251.css">
+<div id=log></div>
+<div id=&#xfffd;></div>
+<script>
+var elm = document.getElementById('\ufffd');
+var t = async_test();
+onload = t.step_func(function(){
+ assert_equals(getComputedStyle(elm, '').visibility, 'hidden');
+ this.done();
+});
+</script>
diff --git a/testing/web-platform/tests/css/css-syntax/charset/support/MANIFEST b/testing/web-platform/tests/css/css-syntax/charset/support/MANIFEST
new file mode 100644
index 0000000000..9688e1f88d
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/support/MANIFEST
@@ -0,0 +1,15 @@
+support at-charset-bogus.css
+support at-charset-utf16-ascii-only.css
+support at-charset-utf16be.css
+support at-charset-utf16.css
+support at-charset-windows-1250.css
+support at-charset-windows-1250-in-utf16be.css
+support at-charset-windows-1250-in-utf16.css
+support bomless-utf16be.css
+support bomless-utf16.css
+support http-bogus-at-charset-windows-1250.bogus.css
+support http-bogus.bogus.css
+support http-windows-1250-at-charset-windows-1253.windows1250.css
+support no-decl-ascii-only.css
+support no-decl.css
+support utf8-bom.css
diff --git a/testing/web-platform/tests/css/css-syntax/charset/support/at-charset-bogus.css b/testing/web-platform/tests/css/css-syntax/charset/support/at-charset-bogus.css
new file mode 100644
index 0000000000..50f9b7779a
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/support/at-charset-bogus.css
@@ -0,0 +1,2 @@
+@charset "bogus";
+#È { visibility:hidden } \ No newline at end of file
diff --git a/testing/web-platform/tests/css/css-syntax/charset/support/at-charset-utf16-ascii-only.css b/testing/web-platform/tests/css/css-syntax/charset/support/at-charset-utf16-ascii-only.css
new file mode 100644
index 0000000000..e7f067e066
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/support/at-charset-utf16-ascii-only.css
@@ -0,0 +1,2 @@
+@charset "utf-16";
+#foo { visibility:hidden } \ No newline at end of file
diff --git a/testing/web-platform/tests/css/css-syntax/charset/support/at-charset-utf16.css b/testing/web-platform/tests/css/css-syntax/charset/support/at-charset-utf16.css
new file mode 100644
index 0000000000..e7dbf5784f
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/support/at-charset-utf16.css
@@ -0,0 +1,2 @@
+@charset "utf-16";
+#È { visibility:hidden } \ No newline at end of file
diff --git a/testing/web-platform/tests/css/css-syntax/charset/support/at-charset-utf16be.css b/testing/web-platform/tests/css/css-syntax/charset/support/at-charset-utf16be.css
new file mode 100644
index 0000000000..cb51b419dc
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/support/at-charset-utf16be.css
@@ -0,0 +1,2 @@
+@charset "utf-16be";
+#È { visibility:hidden } \ No newline at end of file
diff --git a/testing/web-platform/tests/css/css-syntax/charset/support/at-charset-windows-1250-in-utf16.css b/testing/web-platform/tests/css/css-syntax/charset/support/at-charset-windows-1250-in-utf16.css
new file mode 100644
index 0000000000..1132bfd193
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/support/at-charset-windows-1250-in-utf16.css
Binary files differ
diff --git a/testing/web-platform/tests/css/css-syntax/charset/support/at-charset-windows-1250-in-utf16be.css b/testing/web-platform/tests/css/css-syntax/charset/support/at-charset-windows-1250-in-utf16be.css
new file mode 100644
index 0000000000..38bb069784
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/support/at-charset-windows-1250-in-utf16be.css
Binary files differ
diff --git a/testing/web-platform/tests/css/css-syntax/charset/support/at-charset-windows-1250.css b/testing/web-platform/tests/css/css-syntax/charset/support/at-charset-windows-1250.css
new file mode 100644
index 0000000000..6c06db0e9c
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/support/at-charset-windows-1250.css
@@ -0,0 +1,2 @@
+@charset "windows-1250";
+#È { visibility:hidden } \ No newline at end of file
diff --git a/testing/web-platform/tests/css/css-syntax/charset/support/bomless-utf16.css b/testing/web-platform/tests/css/css-syntax/charset/support/bomless-utf16.css
new file mode 100644
index 0000000000..b5399b74bf
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/support/bomless-utf16.css
Binary files differ
diff --git a/testing/web-platform/tests/css/css-syntax/charset/support/bomless-utf16be.css b/testing/web-platform/tests/css/css-syntax/charset/support/bomless-utf16be.css
new file mode 100644
index 0000000000..eaadad0135
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/support/bomless-utf16be.css
Binary files differ
diff --git a/testing/web-platform/tests/css/css-syntax/charset/support/http-bogus-at-charset-windows-1250.bogus.css b/testing/web-platform/tests/css/css-syntax/charset/support/http-bogus-at-charset-windows-1250.bogus.css
new file mode 100644
index 0000000000..6c06db0e9c
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/support/http-bogus-at-charset-windows-1250.bogus.css
@@ -0,0 +1,2 @@
+@charset "windows-1250";
+#È { visibility:hidden } \ No newline at end of file
diff --git a/testing/web-platform/tests/css/css-syntax/charset/support/http-bogus-at-charset-windows-1250.bogus.css.headers b/testing/web-platform/tests/css/css-syntax/charset/support/http-bogus-at-charset-windows-1250.bogus.css.headers
new file mode 100644
index 0000000000..f08dbd94d1
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/support/http-bogus-at-charset-windows-1250.bogus.css.headers
@@ -0,0 +1 @@
+Content-Type: text/css; charset=bogus
diff --git a/testing/web-platform/tests/css/css-syntax/charset/support/http-bogus.bogus.css b/testing/web-platform/tests/css/css-syntax/charset/support/http-bogus.bogus.css
new file mode 100644
index 0000000000..ba2371f8b0
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/support/http-bogus.bogus.css
@@ -0,0 +1 @@
+#È { visibility:hidden } \ No newline at end of file
diff --git a/testing/web-platform/tests/css/css-syntax/charset/support/http-bogus.bogus.css.headers b/testing/web-platform/tests/css/css-syntax/charset/support/http-bogus.bogus.css.headers
new file mode 100644
index 0000000000..f08dbd94d1
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/support/http-bogus.bogus.css.headers
@@ -0,0 +1 @@
+Content-Type: text/css; charset=bogus
diff --git a/testing/web-platform/tests/css/css-syntax/charset/support/http-windows-1250-at-charset-windows-1253.windows1250.css b/testing/web-platform/tests/css/css-syntax/charset/support/http-windows-1250-at-charset-windows-1253.windows1250.css
new file mode 100644
index 0000000000..987dff3155
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/support/http-windows-1250-at-charset-windows-1253.windows1250.css
@@ -0,0 +1,2 @@
+@charset "windows-1253";
+#È { visibility:hidden } \ No newline at end of file
diff --git a/testing/web-platform/tests/css/css-syntax/charset/support/http-windows-1250-at-charset-windows-1253.windows1250.css.headers b/testing/web-platform/tests/css/css-syntax/charset/support/http-windows-1250-at-charset-windows-1253.windows1250.css.headers
new file mode 100644
index 0000000000..c0993d2101
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/support/http-windows-1250-at-charset-windows-1253.windows1250.css.headers
@@ -0,0 +1 @@
+Content-Type: text/css; charset=windows-1250
diff --git a/testing/web-platform/tests/css/css-syntax/charset/support/no-decl-ascii-only.css b/testing/web-platform/tests/css/css-syntax/charset/support/no-decl-ascii-only.css
new file mode 100644
index 0000000000..0736f81397
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/support/no-decl-ascii-only.css
@@ -0,0 +1 @@
+#foo { visibility:hidden } \ No newline at end of file
diff --git a/testing/web-platform/tests/css/css-syntax/charset/support/no-decl.css b/testing/web-platform/tests/css/css-syntax/charset/support/no-decl.css
new file mode 100644
index 0000000000..ba2371f8b0
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/support/no-decl.css
@@ -0,0 +1 @@
+#È { visibility:hidden } \ No newline at end of file
diff --git a/testing/web-platform/tests/css/css-syntax/charset/support/utf8-bom-http-windows-1251.css b/testing/web-platform/tests/css/css-syntax/charset/support/utf8-bom-http-windows-1251.css
new file mode 100644
index 0000000000..1dbf5cf2fc
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/support/utf8-bom-http-windows-1251.css
@@ -0,0 +1 @@
+#È { visibility:hidden } \ No newline at end of file
diff --git a/testing/web-platform/tests/css/css-syntax/charset/support/utf8-bom-http-windows-1251.css.headers b/testing/web-platform/tests/css/css-syntax/charset/support/utf8-bom-http-windows-1251.css.headers
new file mode 100644
index 0000000000..9a67b0fea4
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/support/utf8-bom-http-windows-1251.css.headers
@@ -0,0 +1 @@
+Content-Type: text/css; charset=windows-1251
diff --git a/testing/web-platform/tests/css/css-syntax/charset/support/utf8-bom.css b/testing/web-platform/tests/css/css-syntax/charset/support/utf8-bom.css
new file mode 100644
index 0000000000..1dbf5cf2fc
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/support/utf8-bom.css
@@ -0,0 +1 @@
+#È { visibility:hidden } \ No newline at end of file
diff --git a/testing/web-platform/tests/css/css-syntax/charset/xml-stylesheet-page-windows-1251-charset-attribute-windows-1250.xhtml b/testing/web-platform/tests/css/css-syntax/charset/xml-stylesheet-page-windows-1251-charset-attribute-windows-1250.xhtml
new file mode 100644
index 0000000000..512df7a0ba
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/charset/xml-stylesheet-page-windows-1251-charset-attribute-windows-1250.xhtml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="windows-1251"?>
+<?xml-stylesheet href="support/no-decl.css" charset="windows-1250"?>
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+<title>CSS charset: page windows-1251, charset attribute bogus</title>
+<link rel="help" href="https://drafts.csswg.org/css-syntax-3/#determine-the-fallback-encoding"/>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+</head><body>
+<div id="log"></div>
+<div id="foo"></div>
+<script>
+var elm = document.getElementById('foo');
+elm.id = '\u010C';
+var t = async_test();
+onload = t.step_func(function(){
+ assert_equals(getComputedStyle(elm, '').visibility, 'hidden');
+ this.done();
+});
+</script>
+</body></html>