summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/CSS2/syntax
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/CSS2/syntax
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/CSS2/syntax')
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/.htaccess7
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-001-ref.xht17
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-001.xht27
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-002.xht23
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-003.xht23
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-004.xht23
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-005.xht24
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-006.xht23
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-007.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-008.xht23
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-009.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-010.xht23
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-011.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-012.xht24
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-013.html23
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-014.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-015.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-016.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-019.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-020.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-021.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-024.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-025.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-026.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-027.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-028.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-029.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-030.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-033.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-034.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-035.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-036.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-037.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-038.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-039-ref.xht11
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-039.xht18
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-040.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-041.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-042.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-043.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-044.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-045.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-046.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-047.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-048.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-049.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-050.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-051.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-052.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-053.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-054.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-055.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-056.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-057.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-058.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-059.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-060.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-061.xht24
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-071.xht19
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-071.xht.headers1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-072.xht19
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-072.xht.headers1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-073.xht19
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-073.xht.headers1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-074.xht19
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-074.xht.headers1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-075.xht19
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-075.xht.headers1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-076.xht19
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-076.xht.headers1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-077.xht19
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-077.xht.headers1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-quotes-001.xht17
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-ref.xht6
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-space-001.xht17
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-space-002.xht17
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-utf16-be-001.xht17
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-utf16-be-002.xht17
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-utf16-be-003.xht17
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-utf16-le-001.xht17
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-utf16-le-002.xht17
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-charset-utf16-le-003.xht17
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-keywords-000.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-keywords-001.xht23
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-keywords-002.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-rule-001.xht30
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-rule-002.xht23
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-rule-003.xht23
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-rule-004.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-rule-005.xht19
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-rule-006.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-rule-007.xht19
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-rule-008.xht19
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-rule-009.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-rule-010.xht29
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-rule-011.xht30
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-rule-012.xht30
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-rule-013-ref.xht18
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-rule-013.xht67
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-rules-000.xht24
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-rules-001.xht23
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-rules-002.xht23
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-rules-003.xht23
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/at-rules-004.xht23
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/bad-selector-001.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/blocks-001-ref.xht15
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/blocks-001.xht42
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/blocks-002.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/blocks-003.xht35
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/blocks-004.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/blocks-005.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/blocks-006.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/blocks-and-strings-001.xht23
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/case-sensitive-000.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/case-sensitive-001.xht26
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/case-sensitive-003-ref.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/case-sensitive-003.xht72
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/case-sensitive-004.xht47
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/case-sensitive-005-ref.xht17
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/case-sensitive-005.xht24
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/case-sensitive-006.html21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/case-sensitive-007.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/case-sensitive-008.xht26
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/character-encoding-031.xht18
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/character-encoding-031.xht.headers1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/character-encoding-032.xht18
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/character-encoding-032.xht.headers1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/character-encoding-033.xht18
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/character-encoding-033.xht.headers1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/character-encoding-034.xht18
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/character-encoding-034.xht.headers1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/character-encoding-035.xht18
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/character-encoding-035.xht.headers1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/character-encoding-036.xht18
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/character-encoding-036.xht.headers1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/character-encoding-037.xht18
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/character-encoding-037.xht.headers1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/character-encoding-038.xht24
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/character-encoding-041-ref.xht14
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/character-encoding-041.xht20
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/character-representation-001.xht19
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/characters-0080-009F-001-ref.xht26
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/characters-0080-009F-001.xht32
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/charset-attr-001.xht18
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/colors-001.xht24
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/colors-002.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/colors-003.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/colors-004.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/colors-005.xht20
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/colors-006-ref.xht107
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/colors-006.xht196
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/comments-001.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/comments-002.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/comments-003.xht34
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/comments-004.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/comments-005.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/comments-006.xht29
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/comments-007.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/comments-008.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/comments-009.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/content-type-000-ref.xht29
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/content-type-000.xht41
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/content-type-001.xht35
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/core-syntax-001-ref.xht16
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/core-syntax-001.xht18
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/core-syntax-006-ref.xht16
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/core-syntax-006.xht20
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/core-syntax-007-ref.xht16
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/core-syntax-007.xht20
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/core-syntax-008.xht18
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/core-syntax-009.xht29
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/counters-001-ref.xht16
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/counters-001.xht26
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/counters-002.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/counters-003-ref.xht11
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/counters-003.xht27
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/counters-004-ref.xht11
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/counters-004.xht27
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/counters-005.xht27
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/counters-006.xht31
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/counters-007.xht33
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/counters-008.xht33
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/counters-009.xht35
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/counters-010-ref.xht15
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/counters-010.xht55
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/declaration-001.xht17
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/declaration-002.xht17
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/declaration-003.xht17
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/declaration-004.xht17
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/declaration-005.xht17
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/declaration-006.xht17
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/declaration-whitespace-001.xht34
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/declarations-009-ref.xht20
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/declarations-009.xht49
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/eof-001.xht20
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/eof-002.xht20
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/eof-003.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/eof-004.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/eof-005.xht17
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/eof-006.xht17
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/eof-007.xht20
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escaped-ident-001.xht20
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escaped-ident-002.xht20
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escaped-ident-003.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escaped-ident-004.xht20
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escaped-ident-char-001.xht20
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escaped-ident-spaces-001.xht20
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escaped-ident-spaces-002.xht20
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escaped-ident-spaces-003.xht20
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escaped-ident-spaces-004.xht20
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escaped-ident-spaces-005.xht20
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escaped-ident-spaces-006.xht20
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escaped-ident-spaces-007.xht24
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escaped-newline-001-ref.xht11
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escaped-newline-001.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escaped-url-001-ref.xht23
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escaped-url-001.xht34
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escapes-000-ref.xht13
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escapes-000.xht25
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escapes-001.xht20
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escapes-002.xht30
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escapes-003.xht20
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escapes-004.xht20
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escapes-005.xht20
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escapes-006.xht20
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escapes-007.xht20
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escapes-008.xht25
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escapes-009.xht19
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escapes-010.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escapes-011.xht16
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escapes-012.xht16
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escapes-013-ref.xht17
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escapes-013.xht18
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escapes-014.xht17
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escapes-015.xht151
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/escapes-016.xht151
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/ident-000-ref.xht16
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/ident-000.xht24
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/ident-001.xht24
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/ident-002.xht24
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/ident-003-ref.xht20
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/ident-003.xht42
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/ident-004.xht24
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/ident-005.xht24
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/ident-006.xht24
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/ident-007.xht24
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/ident-008.xht25
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/ident-009.xht24
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/ident-010.xht24
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/ident-011.xht24
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/ident-012-ref.xht18
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/ident-012.xht32
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/ident-013.xht24
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/ident-014.xht20
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/ident-015.xht20
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/ident-016.xht20
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/ident-017.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/ident-018.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/ident-019.xht20
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/ignored-rules-001.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/ignored-rules-002.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/ignored-rules-003.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/ignored-rules-004.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/ignored-rules-005.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/ignored-rules-006.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/ignored-rules-007.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/import-000.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/import-001.xht24
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/invalid-at-rule-001.xht24
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/invalid-decl-at-rule-001.xht30
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/invalid-decl-at-rule-002.xht30
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/keywords-000.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/keywords-001-ref.xht18
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/keywords-001.xht23
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/malformed-decl-001.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/malformed-decl-002.xht23
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/malformed-decl-003.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/malformed-decl-004.xht23
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/malformed-decl-005.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/malformed-decl-006.xht23
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/malformed-decl-007.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/malformed-decl-008.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/malformed-decl-block-001-ref.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/malformed-decl-block-001.xht34
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/matching-brackets-001-ref.xht16
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/matching-brackets-001.xht45
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/matching-brackets-002-ref.xht15
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/matching-brackets-002.xht33
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/matching-brackets-003.xht41
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/quoted-keywords-001.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/quoted-keywords-002.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/quoted-string-001-ref.xht11
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/quoted-string-001.xht20
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/quoted-string-002-ref.xht11
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/quoted-string-002.xht20
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/quoted-string-003.xht20
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/quoted-string-004.xht20
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/scientific-notation-001-ref.xht23
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/scientific-notation-001.xht29
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/sgml-comments-000.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/sgml-comments-001.xht24
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/sgml-comments-002-ref.xht17
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/sgml-comments-002.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/signed-numbers-001-ref.xht14
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/signed-numbers-001.xht29
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/signed-numbers-002.xht30
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/square-brackets-001.xht216
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/strings-000.xht18
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/'green block.pngbin0 -> 502 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/,uri-014.pngbin0 -> 84 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/1x1-green.pngbin0 -> 135 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/1x1-lime.pngbin0 -> 135 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/1x1-maroon.pngbin0 -> 109 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/1x1-navy.pngbin0 -> 109 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/1x1-red.pngbin0 -> 135 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/1x1-white.pngbin0 -> 109 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/60x60-gg-rr.pngbin0 -> 224 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/60x60-green.pngbin0 -> 218 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/a-green.css1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-001.css9
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-001.css.headers1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-002.css5
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-002.css.headers1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-003.css4
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-003.css.headers1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-007.css5
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-008.css5
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-009.css5
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-010.css4
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-011.css4
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-012.css4
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-013.css4
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-014.css5
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-015.cssbin0 -> 116 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-016.cssbin0 -> 116 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-017.cssbin0 -> 232 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-018.cssbin0 -> 232 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-019.css4
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-020.cssbin0 -> 72 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-021.cssbin0 -> 72 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-022.cssbin0 -> 144 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-023.cssbin0 -> 144 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-024.css5
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-025.css5
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-026.css5
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-027.css5
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-028.css5
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-029.cssbin0 -> 114 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-030.cssbin0 -> 114 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-031.cssbin0 -> 228 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-032.cssbin0 -> 236 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-033.css4
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-034.css4
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-035.cssbin0 -> 61 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-036.cssbin0 -> 130 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-037.css5
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-038.css5
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-039.css6
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-040.cssbin0 -> 110 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-041.cssbin0 -> 224 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-042.css5
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-043.cssbin0 -> 116 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-044.cssbin0 -> 236 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-045.cssbin0 -> 122 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-046.cssbin0 -> 122 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-047.cssbin0 -> 112 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-048.cssbin0 -> 112 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-049.css6
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-050.css5
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-051.css8
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-052.css5
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-053.css1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-054.css5
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-055.css5
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-056.css5
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-057.css5
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-058.css5
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-059.css5
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-060.cssbin0 -> 160 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-071.css2
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-071.css.headers1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-072.css2
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-072.css.headers1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-073.css2
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-073.css.headers1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-074.css2
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-074.css.headers1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-075.css2
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-075.css.headers1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-076.css2
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-076.css.headers1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-077.css2
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-077.css.headers1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-quotes-001.cssbin0 -> 82 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-space-001.cssbin0 -> 84 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-space-002.cssbin0 -> 84 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-utf16-be-001.cssbin0 -> 82 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-utf16-be-002.cssbin0 -> 88 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-utf16-be-003.cssbin0 -> 84 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-utf16-le-001.cssbin0 -> 82 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-utf16-le-002.cssbin0 -> 88 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-charset-utf16-le-003.cssbin0 -> 84 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-rule-green.css5
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/at-rule-red.css5
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/b-green.css1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/c-red.css1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/cat.pngbin0 -> 1883 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-031.css1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-031.css.headers1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-032.css1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-032.css.headers1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-033.css1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-033.css.headers1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-034.css1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-034.css.headers1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-035.css1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-035.css.headers1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-036.css1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-036.css.headers1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-037.css1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-037.css.headers1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-038.css1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-041.css3
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-041.css.headers1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/charset-attr-001.cssbin0 -> 44 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/core-syntax-009.css12
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/diamond.pngbin0 -> 188 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/eof-green.css5
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/green15x15.pngbin0 -> 170 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/import-green.css1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/import-red.css1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/pattern-grg-rgr-grg.pngbin0 -> 222 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/pattern-grg-rrg-rgg.pngbin0 -> 231 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/pattern-rgr-grg-rgr.pngbin0 -> 223 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/pattern-tr.pngbin0 -> 137 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/plaintext-css.txt5
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/plaintext.css5
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/plaintext.css.headers1
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/ring.pngbin0 -> 715 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/square-purple.pngbin0 -> 92 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/square-teal.pngbin0 -> 92 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/square-white.pngbin0 -> 78 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/swatch-blue.pngbin0 -> 84 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/swatch-green.pngbin0 -> 84 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/swatch-lime.pngbin0 -> 84 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/swatch-orange.pngbin0 -> 84 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/swatch-red.pngbin0 -> 84 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/swatch-white.pngbin0 -> 85 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/swatch-yellow.pngbin0 -> 84 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/test-bl.pngbin0 -> 1368 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/test-br.pngbin0 -> 1045 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/test-outer.pngbin0 -> 2412 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/test-tl.pngbin0 -> 1025 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/test-tr.pngbin0 -> 1235 bytes
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/uri-001.css4
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/support/uri-002.css5
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/unterminated-string-001.xht23
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/uri-001.xht19
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/uri-002.xht18
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/uri-003.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/uri-004.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/uri-005.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/uri-006.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/uri-007.xht23
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/uri-008.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/uri-009.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/uri-010.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/uri-011.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/uri-012-ref.xht16
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/uri-012.xht29
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/uri-013-ref.xht30
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/uri-013.xht118
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/uri-014.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/uri-015.xht21
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/uri-016-ref.xht23
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/uri-016.xht32
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/uri-017-ref.xht17
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/uri-017.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/uri-018.xht17
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/whitespace-001.xht22
-rw-r--r--testing/web-platform/tests/css/CSS2/syntax/whitespace-002.xht22
481 files changed, 8224 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/CSS2/syntax/.htaccess b/testing/web-platform/tests/css/CSS2/syntax/.htaccess
new file mode 100644
index 0000000000..635b1dcb70
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/.htaccess
@@ -0,0 +1,7 @@
+<files ~ '^character-encoding-03[1234567]\.(xht|xhtml|xml|html|htm)$'>
+AddCharset us-ascii .xht .xhtml .xml .html .htm
+</files>
+
+<files ~ '^at-charset-07[1234567]\.(xht|xhtml|xml|html|htm)$'>
+AddCharset us-ascii .xht .xhtml .xml .html .htm
+</files>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-001-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-001-ref.xht
new file mode 100644
index 0000000000..5be793f712
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-001-ref.xht
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>CSS Reftest Reference</title>
+<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"/>
+<style type="text/css">
+div {
+ color: green;
+}
+</style>
+</head>
+<body>
+<p>Test passes if both lines of "Filler Text" below are green.</p>
+<div>Filler Text</div>
+<div>Filler Text</div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-001.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-001.xht
new file mode 100644
index 0000000000..06642b8f5d
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-001.xht
@@ -0,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: HTTP Charset vs BOM</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="flags" content="http" />
+ <meta name="assert" content="The Byte Order Mark in the stylesheet overrides the HTTP charset setting." />
+ <style type="text/css">
+ @import "support/at-charset-001.css"; /* shift-jis encoding with UTF-8 BOM */
+ .平和
+ {
+ color: green;
+ }
+ div
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="平和">Filler Text</div>
+ <div id="div2">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-002.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-002.xht
new file mode 100644
index 0000000000..5db020d1e0
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-002.xht
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: HTTP Charset over @charset</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="flags" content="http" />
+ <meta name="assert" content="The HTTP charset setting overrides the @charset designation in the stylesheet." />
+ <style type="text/css">
+ @import "support/at-charset-002.css";
+ div
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="平和">Filler Text</div>
+ <div id="div2">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-003.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-003.xht
new file mode 100644
index 0000000000..d2b0ad7af2
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-003.xht
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: HTTP charset over link charset</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="flags" content="http" />
+ <meta name="assert" content="The HTTP charset setting overrides the charset designation in the link tag." />
+ <link charset="windows-1252" href="support/at-charset-003.css" rel="Stylesheet" />
+ <style type="text/css">
+ div
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="平和">Filler Text</div>
+ <div id="div2">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-004.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-004.xht
new file mode 100644
index 0000000000..6d23331e95
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-004.xht
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: HTTP charset over set referring code page (UTF-8)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="flags" content="http" />
+ <meta name="assert" content="The HTTP charset setting overrides the referring document's code page." />
+ <style type="text/css">
+ @import "support/at-charset-003.css";
+ div
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="平和">Filler Text</div>
+ <div id="div2">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-005.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-005.xht
new file mode 100644
index 0000000000..d76f64f650
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-005.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: HTTP charset over set referring code page (windows-1252)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="flags" content="http" />
+ <meta name="assert" content="The HTTP charset setting overrides the charset designation in the referring document's meta tag." />
+ <meta http-equiv="Content-Type" content="text/html; windows-1252" />
+ <style type="text/css">
+ @import "support/at-charset-003.css";
+ div
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="&#x5e73;&#x548c;">Filler Text</div>
+ <div id="div2">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-006.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-006.xht
new file mode 100644
index 0000000000..d78b378b1a
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-006.xht
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: HTTP charset over referring code page (not set)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="flags" content="http" />
+ <meta name="assert" content="The HTTP charset setting overrides the charset of referring document." />
+ <style type="text/css">
+ @import "support/at-charset-003.css";
+ div
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="&#x5e73;&#x548c;">Filler Text</div>
+ <div id="div2">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-007.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-007.xht
new file mode 100644
index 0000000000..06e2b3592f
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-007.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @charset over link charset attribute</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="assert" content="The @charset setting in the stylesheet overrides the charset attribute of the link element." />
+ <link rel="Stylesheet" href="support/at-charset-007.css" charset="windows-1252" />
+ <style type="text/css">
+ div
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="平和">Filler Text</div>
+ <div id="div2">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-008.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-008.xht
new file mode 100644
index 0000000000..5419cd181e
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-008.xht
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @charset over referring document's code page (set)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="assert" content="The @charset setting in the stylesheet overrides the referring document's set code page." />
+ <meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
+ <style type="text/css">
+ @import "support/at-charset-008.css";
+ div
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="&#x5e73;&#x548c;">Filler Text</div>
+ <div id="div2">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-009.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-009.xht
new file mode 100644
index 0000000000..21b9c50031
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-009.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @charset over referring document's code page (unset)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="assert" content="The @charset setting in the stylesheet overrides the referring document's unset code page." />
+ <style type="text/css">
+ @import "support/at-charset-009.css";
+ div
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="&#x5e73;&#x548c;">Filler Text</div>
+ <div id="div2">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-010.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-010.xht
new file mode 100644
index 0000000000..5f0b323407
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-010.xht
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Link charset attribute over referring document's codepage (set)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="assert" content="The stylesheet's encoding is determined by the link element's charset attribute and not the referring document's code page." />
+ <meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
+ <link rel="stylesheet" href="support/at-charset-010.css" charset="shift-JIS" />
+ <style type="text/css">
+ div
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="&#x5e73;&#x548c;">Filler Text</div>
+ <div id="div2">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-011.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-011.xht
new file mode 100644
index 0000000000..6581c75ae0
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-011.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Link charset attribute over referring document's codepage (not set)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="assert" content="The stylesheet's encoding is determined by the link element's charset attribute and not the referring document's code page." />
+ <link rel="stylesheet" href="support/at-charset-011.css" charset="shift-JIS" />
+ <style type="text/css">
+ div
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="&#x5e73;&#x548c;">Filler Text</div>
+ <div id="div2">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-012.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-012.xht
new file mode 100644
index 0000000000..46d24904c2
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-012.xht
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="shift-JIS"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Stylesheet encoding via the referring document's encoding (set)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="assert" content="The stylesheet's encoding is determined by the set encoding of the referring document." />
+ <meta http-equiv="Content-Type" content="text/html; charset=shift-JIS" />
+ <style type="text/css">
+ @import "support/at-charset-012.css";
+ div
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="&#x5e73;&#x548c;">Filler Text</div>
+ <div id="div2">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-013.html b/testing/web-platform/tests/css/CSS2/syntax/at-charset-013.html
new file mode 100644
index 0000000000..643bb3ccc7
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-013.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS Test: Stylesheet encoding via the referring document's encoding (user set)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset">
+ <meta name="flags" content="interact HTMLonly">
+ <meta name="assert" content="The stylesheet's encoding is determined by the user set referring document's encoding.">
+ <style type="text/css">
+ @import "support/at-charset-013.css";
+ div
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>PREREQUISITE: Set the encoding of the page to "Shift-JIS".</p>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="&#x5e73;&#x548c;">Filler Text</div>
+ <div id="div2">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-014.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-014.xht
new file mode 100644
index 0000000000..346985de43
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-014.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Matching BOM and @charset (utf-8)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="assert" content="The encoding is correctly interpreted from the matched BOM and @charset." />
+ <style type="text/css">
+ @import "support/at-charset-014.css";
+ div
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="平和">Filler Text</div>
+ <div id="div2">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-015.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-015.xht
new file mode 100644
index 0000000000..c6703f9486
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-015.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Matching BOM and @charset (utf-16 LE)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="assert" content="The encoding is correctly interpreted from the matched BOM and @charset." />
+ <style type="text/css">
+ @import "support/at-charset-015.css";
+ div
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="平和">Filler Text</div>
+ <div id="div2">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-016.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-016.xht
new file mode 100644
index 0000000000..655cc7f194
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-016.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Matching BOM and @charset (utf-16 BE)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="assert" content="The encoding is correctly interpreted from the matched BOM and @charset." />
+ <style type="text/css">
+ @import "support/at-charset-016.css";
+ div
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="平和">Filler Text</div>
+ <div id="div2">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-019.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-019.xht
new file mode 100644
index 0000000000..61a71107b4
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-019.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: BOM with no @charset (utf-8)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="assert" content="The stylesheet is correctly interpreted as utf-8." />
+ <style type="text/css">
+ @import "support/at-charset-019.css";
+ div
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="平和">Filler Text</div>
+ <div id="div2">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-020.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-020.xht
new file mode 100644
index 0000000000..1a80f92b68
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-020.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: BOM with no @charset (utf-16LE)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="assert" content="The stylesheet is correctly interpreted as utf-16LE." />
+ <style type="text/css">
+ @import "support/at-charset-020.css";
+ div
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="平和">Filler Text</div>
+ <div id="div2">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-021.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-021.xht
new file mode 100644
index 0000000000..ef88ad13e5
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-021.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: BOM with no @charset (utf-16BE)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="assert" content="The stylesheet is correctly interpreted as utf-16BE." />
+ <style type="text/css">
+ @import "support/at-charset-021.css";
+ div
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="平和">Filler Text</div>
+ <div id="div2">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-024.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-024.xht
new file mode 100644
index 0000000000..489d4b9402
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-024.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @charset specified (windows-1252)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="assert" content="The stylesheet is correctly interpreted as windows-1252." />
+ <style type="text/css">
+ @import "support/at-charset-024.css";
+ div
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="&#241;&#221;">Filler Text</div>
+ <div id="div2">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-025.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-025.xht
new file mode 100644
index 0000000000..e49976f75c
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-025.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @charset specified (Shift-JIS)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="assert" content="The stylesheet is correctly interpreted as Shift-JIS." />
+ <style type="text/css">
+ @import "support/at-charset-025.css";
+ div
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="麓ç«æ›œæ—¥éƒ">Filler Text</div>
+ <div id="div2">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-026.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-026.xht
new file mode 100644
index 0000000000..ef4feb23ca
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-026.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @charset specified (ISO-8859-6)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="assert" content="The stylesheet is correctly interpreted as ISO-8859-6." />
+ <style type="text/css">
+ @import "support/at-charset-026.css";
+ div
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="تم">Filler Text</div>
+ <div id="div2">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-027.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-027.xht
new file mode 100644
index 0000000000..ed77f05c11
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-027.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @charset specified (Big5)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="assert" content="The stylesheet is correctly interpreted as Big5." />
+ <style type="text/css">
+ @import "support/at-charset-027.css";
+ div
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="星期六å½">Filler Text</div>
+ <div id="div2">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-028.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-028.xht
new file mode 100644
index 0000000000..01ff31631d
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-028.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @charset specified (UTF-8)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="assert" content="The stylesheet is correctly interpreted as UTF-8." />
+ <style type="text/css">
+ @import "support/at-charset-028.css";
+ div
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="星期六å½">Filler Text</div>
+ <div id="div2">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-029.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-029.xht
new file mode 100644
index 0000000000..95277f8ade
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-029.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @charset specified (UTF-16LE)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="assert" content="The stylesheet is not interpreted as UTF-16LE." />
+ <style type="text/css">
+ @import "support/at-charset-029.css";
+ div
+ {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="星期六å½">Filler Text</div>
+ <div id="div2">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-030.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-030.xht
new file mode 100644
index 0000000000..d6e34b9361
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-030.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @charset specified (UTF-16BE)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="assert" content="The stylesheet is not interpreted as UTF-16BE." />
+ <style type="text/css">
+ @import "support/at-charset-030.css";
+ div
+ {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="星期六å½">Filler Text</div>
+ <div id="div2">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-033.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-033.xht
new file mode 100644
index 0000000000..b8a4fdf940
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-033.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Non-matching BOM (windows-1252 with UTF-8 BOM)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="The stylesheet is thrown out due to the BOM not matching the actual encoding." />
+ <style type="text/css">
+ @import "support/at-charset-033.css";
+ div
+ {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div class="òÔyiÑ">Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-034.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-034.xht
new file mode 100644
index 0000000000..c11ab57c1d
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-034.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Non-matching BOM (UTF-8 with UTF-16LE BOM)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="The stylesheet is thrown out due to the BOM not matching the actual encoding." />
+ <style type="text/css">
+ @import "support/at-charset-034.css";
+ div
+ {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div class="星期五ヷ">Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-035.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-035.xht
new file mode 100644
index 0000000000..28b7c1f59d
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-035.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Non-matching BOM (UTF-16LE with UTF-8 BOM)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="The stylesheet is thrown out due to the BOM not matching the actual encoding." />
+ <style type="text/css">
+ @import "support/at-charset-035.css";
+ div
+ {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div class="星期五ョヷ">Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-036.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-036.xht
new file mode 100644
index 0000000000..40f044d0d0
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-036.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Non-matching BOM (UTF-32BE with UTF-16LE BOM)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="The stylesheet is thrown out due to the BOM not matching the actual encoding." />
+ <style type="text/css">
+ @import "support/at-charset-036.css";
+ div
+ {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div class="星期五ョヷ">Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-037.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-037.xht
new file mode 100644
index 0000000000..58f62e03be
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-037.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Non-matching @charset (Shift-JIS with 1252 @charset)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="The selector does not match due to the mismatched @charset." />
+ <style type="text/css">
+ @import "support/at-charset-037.css";
+ div
+ {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div class="ã‚®ã³ãƒ´">Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-038.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-038.xht
new file mode 100644
index 0000000000..7556ce4c9f
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-038.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Non-matching @charset (Big5 with Shift-JIS @charset)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="The selector does not match due to the mismatched @charset." />
+ <style type="text/css">
+ @import "support/at-charset-038.css";
+ div
+ {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div class="星期二价泌">Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-039-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-039-ref.xht
new file mode 100644
index 0000000000..fe07476bbe
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-039-ref.xht
@@ -0,0 +1,11 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>No red double filler text reference</title>
+ </head>
+ <body>
+ <p>Test passes if there is no red on this page.</p>
+ <div>Filler Text</div>
+ <div>Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-039.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-039.xht
new file mode 100644
index 0000000000..b9ebae743c
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-039.xht
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Matching BOM and @charset (utf-8)</title>
+ <link rel="match" href="at-charset-039-ref.xht" />
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <meta name="assert" content="The encoding is correctly interpreted from the matched BOM and @charset." />
+ <style type="text/css">
+ @import "support/at-charset-039.css";
+ </style>
+ </head>
+ <body>
+ <p>Test passes if there is no red on this page.</p>
+ <div class="平和">Filler Text</div>
+ <div id="div2">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-040.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-040.xht
new file mode 100644
index 0000000000..0847080811
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-040.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Non-matching @charset (UTF-16BE with UTF-8 @charset)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="assert" content="The stylesheet is thrown out due to the mismatched @charset." />
+ <style type="text/css">
+ @import "support/at-charset-040.css";
+ div
+ {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="星期二价泌">Filler Text</div>
+ <div id="div1">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-041.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-041.xht
new file mode 100644
index 0000000000..9a2fb8f8b4
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-041.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Non-matching @charset (UTF-32LE with UTF-16BE @charset)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="assert" content="The stylesheet is thrown out due to the mismatched @charset." />
+ <style type="text/css">
+ @import "support/at-charset-041.css";
+ div
+ {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="星期二价泌">Filler Text</div>
+ <div id="div1">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-042.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-042.xht
new file mode 100644
index 0000000000..6dcf764df0
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-042.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @charset does not match BOM (UTF8 encoding and BOM with UTF-16BE @charset)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="assert" content="The stylesheet is interpreted as UTF-8." />
+ <style type="text/css">
+ @import "support/at-charset-042.css";
+ div
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="星期二价泌">Filler Text</div>
+ <div id="div1">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-043.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-043.xht
new file mode 100644
index 0000000000..8619e855c0
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-043.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @charset does not match BOM (UTF-16LE encoding and BOM with UTF-8 @charset)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="assert" content="The stylesheet is interpreted as UTF-8." />
+ <style type="text/css">
+ @import "support/at-charset-043.css";
+ div
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="星期二价泌">Filler Text</div>
+ <div id="div1">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-044.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-044.xht
new file mode 100644
index 0000000000..f752cecbb3
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-044.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @charset does not match BOM (UTF-32BE encoding and BOM with UTF-16BE @charset)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="assert" content="UTF-32 is not supported." />
+ <style type="text/css">
+ @import "support/at-charset-044.css";
+ div
+ {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="星期二价泌">Filler Text</div>
+ <div id="div1">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-045.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-045.xht
new file mode 100644
index 0000000000..13fc471c83
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-045.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Mismatched endianness in @charset (UTF-16LE encoding and BOM with UTF-16BE @charset)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="assert" content="The stylesheet is interpreted as UTF-16LE." />
+ <style type="text/css">
+ @import "support/at-charset-045.css";
+ div
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="星期二价泌">Filler Text</div>
+ <div id="div1">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-046.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-046.xht
new file mode 100644
index 0000000000..aaa58b59cd
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-046.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Mismatched endianness in @charset (UTF-16BE encoding and BOM with UTF-16LE @charset)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="assert" content="The stylesheet is interpreted as UTF16BE." />
+ <style type="text/css">
+ @import "support/at-charset-046.css";
+ div
+ {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="星期二价泌">Filler Text</div>
+ <div id="div1">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-047.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-047.xht
new file mode 100644
index 0000000000..ec5d204276
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-047.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Endianness not specified (UTF-16LE encoding with UTF-16 @charset)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="assert" content="The stylesheet is not interpreted as UTF-16LE." />
+ <style type="text/css">
+ @import "support/at-charset-047.css";
+ div
+ {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="星期二价泌">Filler Text</div>
+ <div id="div1">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-048.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-048.xht
new file mode 100644
index 0000000000..e774180f34
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-048.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Endianness not specified (UTF-16BE encoding with UTF-16 @charset)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="assert" content="The stylesheet is not interpreted as UTF16-BE." />
+ <style type="text/css">
+ @import "support/at-charset-048.css";
+ div
+ {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="星期二价泌">Filler Text</div>
+ <div id="div1">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-049.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-049.xht
new file mode 100644
index 0000000000..d7f37af5c7
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-049.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @charset preceded by a newline</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="The selector does not match due to the @charset being ignored." />
+ <style type="text/css">
+ @import "support/at-charset-049.css";
+ div
+ {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div class="&#26143;&#26399;&#20108;&#20215;&#27852;">Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-050.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-050.xht
new file mode 100644
index 0000000000..fe21a1f9e6
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-050.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @charset preceded by a space</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="The selector does not match due to the @charset being ignored." />
+ <style type="text/css">
+ @import "support/at-charset-050.css";
+ div
+ {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div class="&#26143;&#26399;&#20108;&#20215;&#27852;">Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-051.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-051.xht
new file mode 100644
index 0000000000..a5a72198b2
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-051.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @charset preceded by a declaration</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="The selector does not match due to the @charset being ignored." />
+ <style type="text/css">
+ @import "support/at-charset-051.css";
+ div
+ {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div class="&#26143;&#26399;&#20108;&#20215;&#27852;">Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-052.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-052.xht
new file mode 100644
index 0000000000..8e4a48b7a8
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-052.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @charset preceded by another @charset</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="The selector does not match due to the second @charset being ignored." />
+ <style type="text/css">
+ @import "support/at-charset-052.css";
+ div
+ {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div class="&#26143;&#26399;&#20108;&#20215;&#27852;">Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-053.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-053.xht
new file mode 100644
index 0000000000..54865d974c
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-053.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @charset immediately followed by a declaration block</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="The declaration block is interpreted and applied correctly." />
+ <style type="text/css">
+ @import "support/at-charset-053.css";
+ div
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div class="&#26143;&#26399;&#20108;&#20215;&#27852;">Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-054.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-054.xht
new file mode 100644
index 0000000000..7532e46460
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-054.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @charset in uppercase</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="The selector does not match due to the @charset being ignored." />
+ <style type="text/css">
+ @import "support/at-charset-054.css";
+ div
+ {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div class="&#26143;&#26399;&#20108;&#20215;&#27852;">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-055.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-055.xht
new file mode 100644
index 0000000000..4349091685
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-055.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @charset without quotes</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="The selector does not match due to the @charset being ignored." />
+ <style type="text/css">
+ @import "support/at-charset-055.css";
+ div
+ {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div class="&#26143;&#26399;&#20108;&#20215;&#27852;">Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-056.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-056.xht
new file mode 100644
index 0000000000..2dd8282b8f
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-056.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @charset missing a space</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="The selector does not match due to the @charset being ignored." />
+ <style type="text/css">
+ @import "support/at-charset-056.css";
+ div
+ {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div class="&#26143;&#26399;&#20108;&#20215;&#27852;">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-057.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-057.xht
new file mode 100644
index 0000000000..5dfe915146
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-057.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @charset escaped numerically</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="The selector does not match due to the @charset being ignored." />
+ <style type="text/css">
+ @import "support/at-charset-057.css";
+ div
+ {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div class="&#26143;&#26399;&#20108;&#20215;&#27852;">Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-058.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-058.xht
new file mode 100644
index 0000000000..5eb0e38576
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-058.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @charset escaped char</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="The selector does not match due to the @charset being ignored." />
+ <style type="text/css">
+ @import "support/at-charset-058.css";
+ div
+ {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div class="&#26143;&#26399;&#20108;&#20215;&#27852;">Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-059.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-059.xht
new file mode 100644
index 0000000000..99dffe105b
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-059.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @charset missing semi-colon</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="The selector does not match due to the @charset being ignored." />
+ <style type="text/css">
+ @import "support/at-charset-059.css";
+ div
+ {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div class="&#26143;&#26399;&#20108;&#20215;&#27852;">Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-060.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-060.xht
new file mode 100644
index 0000000000..bfdaa966a0
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-060.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @charset with bogus name</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-001-ref.xht"/>
+ <meta name="assert" content="The stylesheet is interpreted as UTF-16LE based on BOM." />
+ <style type="text/css">
+ @import "support/at-charset-060.css";
+ div
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if both lines of "Filler Text" below are green.</p>
+ <div class="平和">Filler Text</div>
+ <div id="div1">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-061.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-061.xht
new file mode 100644
index 0000000000..f4d05f0e0b
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-061.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @charset within style block</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="The selector does not match due to the @charset being ignored." />
+ <style type="text/css">@charset "ISO-8859-1";
+ .\xC3\xA9
+ {
+ color: red;
+ }
+ div
+ {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div class="é">Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-071.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-071.xht
new file mode 100644
index 0000000000..5bc5ae7e81
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-071.xht
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="us-ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
+ <head>
+ <title>CSS Test: Stylesheet encodings: ISO-8859-1</title>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/parsing/encoding/001.html" type="text/html"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="../reference/ref-green-background.xht"/>
+ <meta name="flags" content="http" />
+ <style type="text/css">
+ p { background: red; color: yellow; }
+ </style>
+ <link rel="stylesheet" href="support/at-charset-071.css"/>
+ </head>
+ <body>
+ <p class="t&#xE9;st">This should have a green background.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-071.xht.headers b/testing/web-platform/tests/css/CSS2/syntax/at-charset-071.xht.headers
new file mode 100644
index 0000000000..4483f5fb71
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-071.xht.headers
@@ -0,0 +1 @@
+Content-Type: application/xhtml+xml; charset=us-ascii
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-072.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-072.xht
new file mode 100644
index 0000000000..569c95933b
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-072.xht
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="us-ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
+ <head>
+ <title>CSS Test: Stylesheet encodings: ISO-8859-11</title>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/parsing/encoding/002.html" type="text/html"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="../reference/ref-green-background.xht"/>
+ <meta name="flags" content="http" />
+ <style type="text/css">
+ p { background: red; color: yellow; }
+ </style>
+ <link rel="stylesheet" href="support/at-charset-072.css"/>
+ </head>
+ <body>
+ <p class="t&#x0E49;st">This should have a green background.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-072.xht.headers b/testing/web-platform/tests/css/CSS2/syntax/at-charset-072.xht.headers
new file mode 100644
index 0000000000..4483f5fb71
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-072.xht.headers
@@ -0,0 +1 @@
+Content-Type: application/xhtml+xml; charset=us-ascii
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-073.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-073.xht
new file mode 100644
index 0000000000..ca07642818
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-073.xht
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="us-ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
+ <head>
+ <title>CSS Test: Stylesheet encodings: ISO-8859-5</title>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/parsing/encoding/003.html" type="text/html"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="../reference/ref-green-background.xht"/>
+ <meta name="flags" content="http" />
+ <style type="text/css">
+ p { background: red; color: yellow; }
+ </style>
+ <link rel="stylesheet" href="support/at-charset-073.css"/>
+ </head>
+ <body>
+ <p class="t&#x0449;st">This should have a green background.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-073.xht.headers b/testing/web-platform/tests/css/CSS2/syntax/at-charset-073.xht.headers
new file mode 100644
index 0000000000..4483f5fb71
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-073.xht.headers
@@ -0,0 +1 @@
+Content-Type: application/xhtml+xml; charset=us-ascii
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-074.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-074.xht
new file mode 100644
index 0000000000..bc18d2fe44
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-074.xht
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="us-ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
+ <head>
+ <title>CSS Test: Stylesheet encodings: ISO-8859-6</title>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/parsing/encoding/004.html" type="text/html"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="../reference/ref-green-background.xht"/>
+ <meta name="flags" content="http" />
+ <style type="text/css">
+ p { background: red; color: yellow; }
+ </style>
+ <link rel="stylesheet" href="support/at-charset-074.css"/>
+ </head>
+ <body>
+ <p class="t&#x0649;st">This should have a green background.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-074.xht.headers b/testing/web-platform/tests/css/CSS2/syntax/at-charset-074.xht.headers
new file mode 100644
index 0000000000..4483f5fb71
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-074.xht.headers
@@ -0,0 +1 @@
+Content-Type: application/xhtml+xml; charset=us-ascii
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-075.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-075.xht
new file mode 100644
index 0000000000..0fbc3d3f6c
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-075.xht
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="us-ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
+ <head>
+ <title>CSS Test: Stylesheet encodings: ISO-8859-7</title>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/parsing/encoding/005.html" type="text/html"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="../reference/ref-green-background.xht"/>
+ <meta name="flags" content="http" />
+ <style type="text/css">
+ p { background: red; color: yellow; }
+ </style>
+ <link rel="stylesheet" href="support/at-charset-075.css"/>
+ </head>
+ <body>
+ <p class="t&#x03B9;st">This should have a green background.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-075.xht.headers b/testing/web-platform/tests/css/CSS2/syntax/at-charset-075.xht.headers
new file mode 100644
index 0000000000..4483f5fb71
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-075.xht.headers
@@ -0,0 +1 @@
+Content-Type: application/xhtml+xml; charset=us-ascii
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-076.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-076.xht
new file mode 100644
index 0000000000..ec50107b43
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-076.xht
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="us-ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
+ <head>
+ <title>CSS Test: Stylesheet encodings: ISO-8859-8</title>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/parsing/encoding/006.html" type="text/html"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="../reference/ref-green-background.xht"/>
+ <meta name="flags" content="http" />
+ <style type="text/css">
+ p { background: red; color: yellow; }
+ </style>
+ <link rel="stylesheet" href="support/at-charset-076.css"/>
+ </head>
+ <body>
+ <p class="t&#x05D9;st">This should have a green background.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-076.xht.headers b/testing/web-platform/tests/css/CSS2/syntax/at-charset-076.xht.headers
new file mode 100644
index 0000000000..4483f5fb71
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-076.xht.headers
@@ -0,0 +1 @@
+Content-Type: application/xhtml+xml; charset=us-ascii
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-077.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-077.xht
new file mode 100644
index 0000000000..0be14e1f23
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-077.xht
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="us-ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
+ <head>
+ <title>CSS Test: Stylesheet encodings: KOI8-R</title>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/parsing/encoding/007.html" type="text/html"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="../reference/ref-green-background.xht"/>
+ <meta name="flags" content="http" />
+ <style type="text/css">
+ p { background: red; color: yellow; }
+ </style>
+ <link rel="stylesheet" href="support/at-charset-077.css"/>
+ </head>
+ <body>
+ <p class="t&#x0418;st">This should have a green background.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-077.xht.headers b/testing/web-platform/tests/css/CSS2/syntax/at-charset-077.xht.headers
new file mode 100644
index 0000000000..4483f5fb71
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-077.xht.headers
@@ -0,0 +1 @@
+Content-Type: application/xhtml+xml; charset=us-ascii
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-quotes-001.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-quotes-001.xht
new file mode 100644
index 0000000000..db4ab67c3d
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-quotes-001.xht
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>
+ <title>CSS Test: @charset quotes</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-ref.xht"/>
+ <style type="text/css">
+ body { color: green; }
+ </style>
+ <link type="text/css" charset="us-ascii" rel="stylesheet" href="support/at-charset-quotes-001.css" />
+ </head>
+ <body>
+ This should be green
+
+
+
+</body></html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-ref.xht
new file mode 100644
index 0000000000..7367440b87
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-ref.xht
@@ -0,0 +1,6 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head></head><body style="color: green">
+ This should be green
+
+
+
+</body></html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-space-001.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-space-001.xht
new file mode 100644
index 0000000000..3d42fd86b4
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-space-001.xht
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>
+ <title>CSS Test: @charset leading-space</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-ref.xht"/>
+ <style type="text/css">
+ body { color: green; }
+ </style>
+ <link type="text/css" charset="us-ascii" rel="stylesheet" href="support/at-charset-space-001.css" />
+ </head>
+ <body>
+ This should be green
+
+
+
+</body></html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-space-002.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-space-002.xht
new file mode 100644
index 0000000000..64f19bc056
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-space-002.xht
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>
+ <title>CSS Test: @charset trailing-space</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-ref.xht"/>
+ <style type="text/css">
+ body { color: green; }
+ </style>
+ <link type="text/css" charset="us-ascii" rel="stylesheet" href="support/at-charset-space-002.css" />
+ </head>
+ <body>
+ This should be green
+
+
+
+</body></html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-utf16-be-001.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-utf16-be-001.xht
new file mode 100644
index 0000000000..7e47343e62
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-utf16-be-001.xht
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>
+ <title>CSS Test: @charset utf-16-be-no-bom</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-ref.xht"/>
+ <style type="text/css">
+ body { color: green; }
+ </style>
+ <link type="text/css" charset="us-ascii" rel="stylesheet" href="support/at-charset-utf16-be-001.css" />
+ </head>
+ <body>
+ This should be green
+
+
+
+</body></html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-utf16-be-002.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-utf16-be-002.xht
new file mode 100644
index 0000000000..98649a68ec
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-utf16-be-002.xht
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>
+ <title>CSS Test: @charset utf-16-be-bom</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-ref.xht"/>
+ <style type="text/css">
+ body { color: red; }
+ </style>
+ <link type="text/css" charset="us-ascii" rel="stylesheet" href="support/at-charset-utf16-be-002.css" />
+ </head>
+ <body>
+ This should be green
+
+
+
+</body></html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-utf16-be-003.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-utf16-be-003.xht
new file mode 100644
index 0000000000..33eb27aef9
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-utf16-be-003.xht
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>
+ <title>CSS Test: @charset utf-16-bom-be</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-ref.xht"/>
+ <style type="text/css">
+ body { color: red; }
+ </style>
+ <link type="text/css" charset="us-ascii" rel="stylesheet" href="support/at-charset-utf16-be-003.css" />
+ </head>
+ <body>
+ This should be green
+
+
+
+</body></html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-utf16-le-001.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-utf16-le-001.xht
new file mode 100644
index 0000000000..122c9dc63a
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-utf16-le-001.xht
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>
+ <title>CSS Test: @charset utf-16-le-no-bom</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-ref.xht"/>
+ <style type="text/css">
+ body { color: green; }
+ </style>
+ <link type="text/css" charset="us-ascii" rel="stylesheet" href="support/at-charset-utf16-le-001.css" />
+ </head>
+ <body>
+ This should be green
+
+
+
+</body></html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-utf16-le-002.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-utf16-le-002.xht
new file mode 100644
index 0000000000..abbd62fb74
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-utf16-le-002.xht
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>
+ <title>CSS Test: @charset utf-16-le-bom</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-ref.xht"/>
+ <style type="text/css">
+ body { color: red; }
+ </style>
+ <link type="text/css" charset="us-ascii" rel="stylesheet" href="support/at-charset-utf16-le-002.css" />
+ </head>
+ <body>
+ This should be green
+
+
+
+</body></html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-charset-utf16-le-003.xht b/testing/web-platform/tests/css/CSS2/syntax/at-charset-utf16-le-003.xht
new file mode 100644
index 0000000000..4b20d43772
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-charset-utf16-le-003.xht
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>
+ <title>CSS Test: @charset utf-16-bom-le</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="match" href="at-charset-ref.xht"/>
+ <style type="text/css">
+ body { color: red; }
+ </style>
+ <link type="text/css" charset="us-ascii" rel="stylesheet" href="support/at-charset-utf16-le-003.css" />
+ </head>
+ <body>
+ This should be green
+
+
+
+</body></html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-keywords-000.xht b/testing/web-platform/tests/css/CSS2/syntax/at-keywords-000.xht
new file mode 100644
index 0000000000..33dec42708
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-keywords-000.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: At-rules</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#at-rules"/>
+ <link rel="match" href="../reference/ref-this-text-should-be-green.xht"/>
+ <style type="text/css">
+
+ @import "support/import-green.css";
+
+ p { color: red; }
+
+ </style>
+ </head>
+ <body>
+
+ <p class="import">This text should be green.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-keywords-001.xht b/testing/web-platform/tests/css/CSS2/syntax/at-keywords-001.xht
new file mode 100644
index 0000000000..104fe69995
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-keywords-001.xht
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: At-rules</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#at-rules"/>
+ <link rel="match" href="../reference/ref-this-text-should-be-green.xht"/>
+ <style type="text/css">
+
+ @ import "support/import-red.css";
+
+ ignore {}
+
+ p { color: green; }
+
+ </style>
+ </head>
+ <body>
+
+ <p class="import">This text should be green.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-keywords-002.xht b/testing/web-platform/tests/css/CSS2/syntax/at-keywords-002.xht
new file mode 100644
index 0000000000..f3a83635fe
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-keywords-002.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: At-rules</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#at-rules"/>
+ <link rel="match" href="../reference/ref-this-text-should-be-green.xht"/>
+ <meta name="flags" content="invalid"/>
+ <style type="text/css">
+
+ @impor t "support/import-red.css";
+
+ p { color: green; }
+
+ </style>
+ </head>
+ <body>
+
+ <p class="import">This text should be green.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-rule-001.xht b/testing/web-platform/tests/css/CSS2/syntax/at-rule-001.xht
new file mode 100644
index 0000000000..b45449d7c1
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-rule-001.xht
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parser error handling with invalid at-rules: @ invalid selector</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="At-Rules start with an at-keyword (@ followed immediately by an identifier)." />
+ <style type="text/css">
+ @ import "support/at-rule-red.css";
+ div
+ {
+ color: red;
+ }
+ *
+ {
+ color: green;
+ }
+ p
+ {
+ color: black;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-rule-002.xht b/testing/web-platform/tests/css/CSS2/syntax/at-rule-002.xht
new file mode 100644
index 0000000000..1810d73f80
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-rule-002.xht
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing of invalid @rules</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="An at-rule consists of everything up to and including the next semi-colon or the next block." />
+ <style type="text/css">
+ @invalidimport bad at rule
+ this entire "at rule" should be ignored;
+ div
+ {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-rule-003.xht b/testing/web-platform/tests/css/CSS2/syntax/at-rule-003.xht
new file mode 100644
index 0000000000..fee6163801
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-rule-003.xht
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing of invalid @rules with blocks</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="An at-rule consists of everything up to and including the next semi-colon or the next block." />
+ <style type="text/css">
+ @invalidat-block bad at rule
+ this entire "at rule" should be ignored{declaration;{sub-block;}}
+ div
+ {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-rule-004.xht b/testing/web-platform/tests/css/CSS2/syntax/at-rule-004.xht
new file mode 100644
index 0000000000..dc8e72289f
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-rule-004.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @import inside block</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="../reference/no-red-filler-text-ref.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="@import is ignored if inside a block." />
+ <style type="text/css">
+ @media page
+ {
+ @import "support/at-rule-red.css";
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if there is no red visible on the page.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-rule-005.xht b/testing/web-platform/tests/css/CSS2/syntax/at-rule-005.xht
new file mode 100644
index 0000000000..975a7bf7fa
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-rule-005.xht
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @import following @charset</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="@import is ignored if inside a block or after any valid statement except @charset." />
+ <style type="text/css">
+ @charset foo;
+ @import "support/at-rule-green.css";
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-rule-006.xht b/testing/web-platform/tests/css/CSS2/syntax/at-rule-006.xht
new file mode 100644
index 0000000000..7864b2ef1b
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-rule-006.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @import following valid statements</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="@import is ignored if after any valid statement except @charset." />
+ <style type="text/css">
+ div
+ {
+ color: green;
+ }
+ @import "support/at-rule-red.css";
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-rule-007.xht b/testing/web-platform/tests/css/CSS2/syntax/at-rule-007.xht
new file mode 100644
index 0000000000..cc096841a8
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-rule-007.xht
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @import following an invalid statement</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="../reference/no-red-filler-text-ref.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="@import is ignored if inside a block or after any valid statement except @charset." />
+ <style type="text/css">
+ foo{}
+ @import "support/at-rule-red.css";
+ </style>
+ </head>
+ <body>
+ <p>Test passes if there is no red visible on the page.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-rule-008.xht b/testing/web-platform/tests/css/CSS2/syntax/at-rule-008.xht
new file mode 100644
index 0000000000..6bd393115a
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-rule-008.xht
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @import following a bad @rule</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="@import is ignored after invalid @rule." />
+ <style type="text/css">
+ @badat-rule foo;
+ @import "support/at-rule-green.css";
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-rule-009.xht b/testing/web-platform/tests/css/CSS2/syntax/at-rule-009.xht
new file mode 100644
index 0000000000..7e84583a41
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-rule-009.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @import after a bad selector and rule block</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="@import is not ignored if after bad selector." />
+ <style type="text/css">
+ 1badselector
+ {
+ someprop:someval;
+ }
+ @import "support/at-rule-green.css";
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-rule-010.xht b/testing/web-platform/tests/css/CSS2/syntax/at-rule-010.xht
new file mode 100644
index 0000000000..06e41bfe95
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-rule-010.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @rules and white space</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="White space does not affect the validity of @rules." />
+ <style type="text/css">
+
+
+
+
+
+ @import "support/at-rule-green.css";
+
+
+
+
+
+
+
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-rule-011.xht b/testing/web-platform/tests/css/CSS2/syntax/at-rule-011.xht
new file mode 100644
index 0000000000..694d20c9d1
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-rule-011.xht
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parser error handling with invalid at-rules: @ invalid selector with a number</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="At-Rules are ignored if they start with an at-keyword (@ followed immediately by an identifier)." />
+ <style type="text/css">
+ @1import "support/at-rule-red.css";
+ div
+ {
+ color: red;
+ }
+ *
+ {
+ color: green;
+ }
+ p
+ {
+ color: black;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-rule-012.xht b/testing/web-platform/tests/css/CSS2/syntax/at-rule-012.xht
new file mode 100644
index 0000000000..f5e47c6692
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-rule-012.xht
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parser error handling with invalid at-rules: @ invalid selector with a hyphen</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="At-Rules are ignored it they start with an at-keyword (@ followed immediately by an identifier)." />
+ <style type="text/css">
+ @-1import "support/at-rule-red.css";
+ div
+ {
+ color: red;
+ }
+ *
+ {
+ color: green;
+ }
+ p
+ {
+ color: black;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-rule-013-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/at-rule-013-ref.xht
new file mode 100644
index 0000000000..b504c6b39b
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-rule-013-ref.xht
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>CSS Reftest Reference</title>
+<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"/>
+<style type="text/css">
+p {
+ color: green;
+}
+</style>
+</head>
+<body>
+<p>This sentence must be green.</p>
+<p>This sentence must be green.</p>
+<p>This sentence must be green.</p>
+<p>This sentence must be green.</p>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-rule-013.xht b/testing/web-platform/tests/css/CSS2/syntax/at-rule-013.xht
new file mode 100644
index 0000000000..7f51f2f026
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-rule-013.xht
@@ -0,0 +1,67 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Ignoring at-rules inside @media blocks</title>
+ <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/media.html#at-media-rule"/>
+ <link rel="match" href="at-rule-013-ref.xht"/>
+ <meta name="flags" content="invalid"/>
+ <meta name="assert" content="At-rules inside @media blocks are ignored up to
+ up to the end of the block that contains the invalid at-keyword, or up
+ to and including the next semicolon (;) or up to and including the next
+ block ({...}), whichever comes first."/>
+ <style type="text/css"><![CDATA[
+ p {
+ color: red;
+ background: red;
+ }
+ @media all {
+ #semicolon { background: transparent; }
+ @foo ] & | # $ % test-token \
+ [; # { background: red; } ]
+ (; #semicolon { background: red; } } } } )
+ '; #semicolon { background: red; } } } }',
+ "; #semicolon { background: red; }' } } }"
+ ;
+ #semicolon { color: green; }
+ }
+ @media all {
+ #block { background: transparent; }
+ @foo ] & | # $ % test-token \
+ [; #block { background: red; } ]
+ (; #block { background: red; } )
+ '; #block { background: red; }',
+ "; #block { background: red; }'"
+ {; #block { background: red; }
+ #block { background: red; } }
+ #block { color: green; }
+ }
+ @media all {
+ #eob { background: transparent; }
+ @import "support/import-red.css"
+ }
+ #eob {
+ color: green;
+ }
+ @media all {
+ #eob-complex { background: transparent; }
+ @import "support/import-red.css"
+ [; #eob-complex { background: red; } ]
+ (; #eob-complex { background: red; } )
+ '; #eob-complex { background: red; }',
+ "; #eob-complex { background: red; }'"
+ }
+ #eob-complex {
+ color: green;
+ }
+ ]]></style>
+ </head>
+ <body>
+ <p id="semicolon">This sentence must be green.</p>
+ <p id="block">This sentence must be green.</p>
+ <p id="eob">This sentence must be green.</p>
+ <p id="eob-complex">This sentence must be green.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-rules-000.xht b/testing/web-platform/tests/css/CSS2/syntax/at-rules-000.xht
new file mode 100644
index 0000000000..4f23bd2254
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-rules-000.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: At-rules</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#at-rules"/>
+ <link rel="match" href="../reference/ref-this-text-should-be-green.xht"/>
+ <meta name="flags" content="invalid"/>
+ <style type="text/css">
+
+ p { color: red; }
+
+ @foo{}
+
+ p { color: green; }
+
+ </style>
+ </head>
+ <body>
+
+ <p>This text should be green.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-rules-001.xht b/testing/web-platform/tests/css/CSS2/syntax/at-rules-001.xht
new file mode 100644
index 0000000000..40a89a00c5
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-rules-001.xht
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: At-rules</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#at-rules"/>
+ <link rel="match" href="../reference/ref-this-text-should-be-green.xht"/>
+ <style type="text/css">
+
+ p { color: red; }
+
+ @foo bar {}
+
+ p { color: green; }
+
+ </style>
+ </head>
+ <body>
+
+ <p>This text should be green.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-rules-002.xht b/testing/web-platform/tests/css/CSS2/syntax/at-rules-002.xht
new file mode 100644
index 0000000000..dec4e68a80
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-rules-002.xht
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: At-rules</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#at-rules"/>
+ <link rel="match" href="../reference/ref-this-text-should-be-green.xht"/>
+ <style type="text/css">
+
+ p { color: red; }
+
+ @foo;
+
+ p { color: green; }
+
+ </style>
+ </head>
+ <body>
+
+ <p>This text should be green.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-rules-003.xht b/testing/web-platform/tests/css/CSS2/syntax/at-rules-003.xht
new file mode 100644
index 0000000000..40dbc2a8ec
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-rules-003.xht
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: At-rules</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#at-rules"/>
+ <link rel="match" href="../reference/ref-this-text-should-be-green.xht"/>
+ <style type="text/css">
+
+ p { color: red; }
+
+ @foo bar baz;
+
+ p { color: green; }
+
+ </style>
+ </head>
+ <body>
+
+ <p>This text should be green.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/at-rules-004.xht b/testing/web-platform/tests/css/CSS2/syntax/at-rules-004.xht
new file mode 100644
index 0000000000..102a7f2a65
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/at-rules-004.xht
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: At-rules</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#at-rules"/>
+ <link rel="match" href="../reference/ref-this-text-should-be-green.xht"/>
+ <style type="text/css">
+
+ p { color: green; }
+
+ @foo {};
+
+ p { color: red; }
+
+ </style>
+ </head>
+ <body>
+
+ <p>This text should be green.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/bad-selector-001.xht b/testing/web-platform/tests/css/CSS2/syntax/bad-selector-001.xht
new file mode 100644
index 0000000000..c39d309121
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/bad-selector-001.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing of bad selectors</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#rule-sets" />
+ <link rel="match" href="../reference/no-red-filler-text-ref.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Declarations with bad selectors are ignored." />
+ <style type="text/css">
+ body,,div
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if there is no red visible on the page.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/blocks-001-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/blocks-001-ref.xht
new file mode 100644
index 0000000000..5876981868
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/blocks-001-ref.xht
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>CSS Reftest Reference</title>
+<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"/>
+</head>
+<body>
+<p>Test passes if there is no red visible on the page.</p>
+<div>Filler Text</div>
+<div>Filler Text</div>
+<div>Filler Text</div>
+<div>Filler Text</div>
+<div>Filler Text</div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/blocks-001.xht b/testing/web-platform/tests/css/CSS2/syntax/blocks-001.xht
new file mode 100644
index 0000000000..9da1079f6f
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/blocks-001.xht
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing nested blocks and strings in style blocks</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#block" />
+ <link rel="match" href="blocks-001-ref.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Blocks and strings are parsed with matching terminating pairs." />
+ <style type="text/css">
+ div
+ {
+ \}
+ "string}\" }" #div1{color:red}
+ {}#div5{color: red}
+ (
+ }
+ #div2{color: red}
+ )
+ [
+ }
+ #div3{color: red}
+ ]
+ [
+ (
+ ]
+ )
+ }
+ #div4{color: red}
+ ]
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if there is no red visible on the page.</p>
+ <div id="div1">Filler Text</div>
+ <div id="div2">Filler Text</div>
+ <div id="div3">Filler Text</div>
+ <div id="div4">Filler Text</div>
+ <div id="div5">Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/blocks-002.xht b/testing/web-platform/tests/css/CSS2/syntax/blocks-002.xht
new file mode 100644
index 0000000000..bc058bb7cd
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/blocks-002.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Empty declaration block</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#block" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="Declaration blocks that are empty have no effect on later declarations." />
+ <style type="text/css">
+ div
+ {}
+ div
+ {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/blocks-003.xht b/testing/web-platform/tests/css/CSS2/syntax/blocks-003.xht
new file mode 100644
index 0000000000..6ddf899b12
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/blocks-003.xht
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Rule blocks and white space</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="White space around rule blocks do not affect the validity of the rule block." />
+ <style type="text/css">
+
+
+
+
+
+ div
+
+
+
+
+
+ {
+ color: green;
+ }
+
+
+
+
+
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/blocks-004.xht b/testing/web-platform/tests/css/CSS2/syntax/blocks-004.xht
new file mode 100644
index 0000000000..b28f5eb64a
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/blocks-004.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing square bracket blocks</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#block" />
+ <link rel="match" href="../reference/no-red-filler-text-ref.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Blocks and strings are parsed with matching terminating pairs of square brackets." />
+ <style type="text/css">
+ div
+ {
+ [color: red;]
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if there is no red visible on the page.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/blocks-005.xht b/testing/web-platform/tests/css/CSS2/syntax/blocks-005.xht
new file mode 100644
index 0000000000..aaa65a13d0
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/blocks-005.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing curly bracket blocks</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#block" />
+ <link rel="match" href="../reference/no-red-filler-text-ref.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Blocks and strings are parsed with matching terminating pairs of curly brackets." />
+ <style type="text/css">
+ div
+ {
+ {color: red;}
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if there is no red visible on the page.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/blocks-006.xht b/testing/web-platform/tests/css/CSS2/syntax/blocks-006.xht
new file mode 100644
index 0000000000..1737764602
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/blocks-006.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing parentheses blocks</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#block" />
+ <link rel="match" href="../reference/no-red-filler-text-ref.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Blocks and strings are parsed with matching terminating pairs of parentheses." />
+ <style type="text/css">
+ div
+ {
+ (color: red;)
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if there is no red visible on the page.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/blocks-and-strings-001.xht b/testing/web-platform/tests/css/CSS2/syntax/blocks-and-strings-001.xht
new file mode 100644
index 0000000000..4c91cd38ab
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/blocks-and-strings-001.xht
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing blocks and strings in style blocks</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#block" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Nested blocks and strings are parsed accordingly." />
+ <style type="text/css">
+ div
+ {
+ "this is a string]}""[{\"'"; /*should be parsed as a string but be ignored*/
+ {{}}[]''; /*should be parsed as nested blocks and a string but be ignored*/
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/case-sensitive-000.xht b/testing/web-platform/tests/css/CSS2/syntax/case-sensitive-000.xht
new file mode 100644
index 0000000000..82b53f637e
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/case-sensitive-000.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Case-sensitivity of Properties and Keywords (background)</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters"/>
+ <link rel="match" href="../reference/ref-green-background.xht"/>
+ <style type="text/css">
+
+ p { color: white; }
+ p { background: red; }
+ p { bACkGRounD: gREen; }
+
+ </style>
+ </head>
+ <body>
+
+ <p>This should have a green background.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/case-sensitive-001.xht b/testing/web-platform/tests/css/CSS2/syntax/case-sensitive-001.xht
new file mode 100644
index 0000000000..4a49758fa1
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/case-sensitive-001.xht
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Case-sensitivity of At-rules (@media)</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters"/>
+ <link rel="match" href="../reference/ref-green-background.xht"/>
+ <style type="text/css">
+
+ p { color: white; }
+ @media all {
+ p { background: url(support/swatch-red.png); }
+ }
+
+ @MeDIa aLL {
+ p { BacKgrOUNd: UrL(support/swatch-green.png); }
+ }
+
+ </style>
+ </head>
+ <body>
+
+ <p>This should have a green background.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/case-sensitive-003-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/case-sensitive-003-ref.xht
new file mode 100644
index 0000000000..ef16489888
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/case-sensitive-003-ref.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>CSS Reftest Reference</title>
+<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"/>
+<style type="text/css">
+p {
+ color: green;
+}
+</style>
+</head>
+<body>
+<p>This sentence must be green.</p>
+<p>This sentence must be green.</p>
+<p>This sentence must be green.</p>
+<p>This sentence must be green.</p>
+<p>This sentence must be green.</p>
+<p>This sentence must be green.</p>
+<p>This sentence must be green.</p>
+<p>This sentence must be green.</p>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/case-sensitive-003.xht b/testing/web-platform/tests/css/CSS2/syntax/case-sensitive-003.xht
new file mode 100644
index 0000000000..0b494379f9
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/case-sensitive-003.xht
@@ -0,0 +1,72 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Case-sensitivity of pseudo-classes and pseudo-elements</title>
+ <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters"/>
+ <link rel="match" href="case-sensitive-003-ref.xht"/>
+ <meta name="assert" content="Pseudo-class and pseudo-element names are ASCII
+ case-insensitive."/>
+ <style type="text/css">
+ * { color: red; }
+ *:before, *:after { color: red; }
+
+ p:FiRSt-cHIlD {
+ color: green;
+ }
+
+ :LinK, :viSiTed {
+ color: green;
+ text-decoration: none;
+ font: inherit;
+ }
+
+ :lAnG(en) {
+ color: green;
+ }
+
+ .flin {
+ white-space: nowrap;
+ }
+ .flin:fIrsT-LinE {
+ color: green;
+ }
+
+ .flet span {
+ color: green;
+ }
+ .flet:fIRst-LEttEr {
+ color: green;
+ }
+
+ .bef:before, .af:after {
+ content: "This sentence must be green.";
+ }
+ .bef:BeFoRe, .af:aFtEr {
+ color: green;
+ }
+
+ /* test for ASCII (not UNICODE) case-insensitivity */
+ p:fÄ°rst-child {
+ color: red;
+ }
+ p:fırst-child {
+ color: red;
+ }
+ :lin&#x212a; {
+ color: red;
+ }
+ </style>
+
+ </head>
+ <body>
+ <p>This sentence must be green.</p>
+ <p><a href="">This sentence must be green.</a></p>
+ <p><a href="unvisited:link">This sentence must be green.</a></p>
+ <p lang="en">This sentence must be green.</p>
+ <p class="flin">This sentence must be green.</p>
+ <p class="flet">T<span>his sentence must be green.</span></p>
+ <p class="bef"></p>
+ <p class="af"></p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/case-sensitive-004.xht b/testing/web-platform/tests/css/CSS2/syntax/case-sensitive-004.xht
new file mode 100644
index 0000000000..998187db59
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/case-sensitive-004.xht
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Case-sensitivity of :lang() arguments</title>
+ <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters"/>
+ <link rel="match" href="case-sensitive-003-ref.xht"/>
+ <meta name="assert" content="The argument to :lang() is ASCII case-insensitive."/>
+ <style type="text/css">
+ .test-folding { color: red; }
+
+ :lang(en) {
+ color: green;
+ }
+ :lang(FR) {
+ color: green;
+ }
+
+ /* test for ASCII (not UNICODE) case-insensitivity */
+ .test-unicode { color: green; }
+ :lang(fÄ°) {
+ color: red;
+ }
+ :lang(Fı) {
+ color: red;
+ }
+ :lang(&#x212a;l) {
+ color: red;
+ }
+ </style>
+
+ </head>
+ <body>
+ <div class="test-folding">
+ <p lang="En">This sentence must be green.</p>
+ <p xml:lang="eN">This sentence must be green.</p>
+ <p lang="fr">This sentence must be green.</p>
+ <p xml:lang="fR">This sentence must be green.</p>
+ </div>
+ <div class="test-unicode">
+ <p xml:lang="kl">This sentence must be green.</p>
+ <p lang="KL">This sentence must be green.</p>
+ <p xml:lang="fi">This sentence must be green.</p>
+ <p lang="FI">This sentence must be green.</p>
+ </div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/case-sensitive-005-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/case-sensitive-005-ref.xht
new file mode 100644
index 0000000000..38ebfd8f31
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/case-sensitive-005-ref.xht
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>CSS Reftest Reference</title>
+<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"/>
+<style type="text/css">
+span {
+ color: blue;
+ font: larger bold monospace;
+}
+</style>
+</head>
+<body>
+<p>The number 99 must appear below.</p>
+<p><span>9</span><span>9</span></p>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/case-sensitive-005.xht b/testing/web-platform/tests/css/CSS2/syntax/case-sensitive-005.xht
new file mode 100644
index 0000000000..35bbc4b62b
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/case-sensitive-005.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Case-sensitivity of counter names</title>
+ <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters"/>
+ <link rel="match" href="case-sensitive-005-ref.xht"/>
+ <meta name="assert" content="Counter names are case-sensitive."/>
+ <style type="text/css">
+ .reset { counter-reset: test 5 tEsT 9; }
+ .incr { counter-reset: TEST 0 tEsT 0; counter-increment: TEST 5 tEsT 9; }
+ span:before { content: counter(tEsT); }
+ span { color: blue; font: larger bold monospace; }
+ </style>
+
+ </head>
+ <body>
+
+ <p>The number 99 must appear below.</p>
+
+ <p><span class="reset"></span><span class="incr"></span></p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/case-sensitive-006.html b/testing/web-platform/tests/css/CSS2/syntax/case-sensitive-006.html
new file mode 100644
index 0000000000..0f140f4216
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/case-sensitive-006.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS Test: Case sensitivity with element selectors</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters">
+ <link rel="match" href="../reference/filler-text-below-green.xht">
+ <meta name="flags" content="HTMLonly">
+ <meta name="assert" content="Element selectors are case-insensitive in HTML.">
+ <style type="text/css">
+ DIV
+ {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/case-sensitive-007.xht b/testing/web-platform/tests/css/CSS2/syntax/case-sensitive-007.xht
new file mode 100644
index 0000000000..027f84ce8c
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/case-sensitive-007.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Case sensitivity with element selectors</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters" />
+ <link rel="match" href="../reference/no-red-filler-text-ref.xht"/>
+ <meta name="flags" content="nonHTML" />
+ <meta name="assert" content="Element selectors are case-sensitive in XHTML and XML." />
+ <style type="text/css">
+ DIV
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if there is no red visible on the page.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/case-sensitive-008.xht b/testing/web-platform/tests/css/CSS2/syntax/case-sensitive-008.xht
new file mode 100644
index 0000000000..6182e071ad
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/case-sensitive-008.xht
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Case sensitive attributes</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters" />
+ <meta name="assert" content="CSS style sheets parts that are not under the control of CSS are case dependant on the language being used." />
+ <style type="text/css">
+ #myid,
+ #MYID,
+ .myclass,
+ .MYCLASS,
+ [title="MYTITLE"],
+ [title="mytitle"]
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if there is no red visible on the page.</p>
+ <div title="MyTitle">Filler Text</div>
+ <div class="MyClass">Filler Text</div>
+ <div id="MyID">Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/character-encoding-031.xht b/testing/web-platform/tests/css/CSS2/syntax/character-encoding-031.xht
new file mode 100644
index 0000000000..3e8bac6a3f
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/character-encoding-031.xht
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="us-ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
+ <head>
+ <title>CSS Test: Stylesheet encodings: ISO-8859-1</title>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/parsing/encoding/001.html" type="text/html"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <meta name="flags" content="http" />
+ <style type="text/css">
+ p { background: red; color: yellow; }
+ </style>
+ <link rel="stylesheet" href="support/character-encoding-031.css"/>
+ </head>
+ <body>
+ <p class="t&#xE9;st">This line should be green.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/character-encoding-031.xht.headers b/testing/web-platform/tests/css/CSS2/syntax/character-encoding-031.xht.headers
new file mode 100644
index 0000000000..4483f5fb71
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/character-encoding-031.xht.headers
@@ -0,0 +1 @@
+Content-Type: application/xhtml+xml; charset=us-ascii
diff --git a/testing/web-platform/tests/css/CSS2/syntax/character-encoding-032.xht b/testing/web-platform/tests/css/CSS2/syntax/character-encoding-032.xht
new file mode 100644
index 0000000000..04c6cf4d1f
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/character-encoding-032.xht
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="us-ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
+ <head>
+ <title>CSS Test: Stylesheet encodings: ISO-8859-11</title>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/parsing/encoding/002.html" type="text/html"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <meta name="flags" content="http" />
+ <style type="text/css">
+ p { background: red; color: yellow; }
+ </style>
+ <link rel="stylesheet" href="support/character-encoding-032.css"/>
+ </head>
+ <body>
+ <p class="t&#x0E49;st">This line should be green.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/character-encoding-032.xht.headers b/testing/web-platform/tests/css/CSS2/syntax/character-encoding-032.xht.headers
new file mode 100644
index 0000000000..4483f5fb71
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/character-encoding-032.xht.headers
@@ -0,0 +1 @@
+Content-Type: application/xhtml+xml; charset=us-ascii
diff --git a/testing/web-platform/tests/css/CSS2/syntax/character-encoding-033.xht b/testing/web-platform/tests/css/CSS2/syntax/character-encoding-033.xht
new file mode 100644
index 0000000000..8042c899f3
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/character-encoding-033.xht
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="us-ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
+ <head>
+ <title>CSS Test: Stylesheet encodings: ISO-8859-5</title>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/parsing/encoding/003.html" type="text/html"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <meta name="flags" content="http" />
+ <style type="text/css">
+ p { background: red; color: yellow; }
+ </style>
+ <link rel="stylesheet" href="support/character-encoding-033.css"/>
+ </head>
+ <body>
+ <p class="t&#x0449;st">This line should be green.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/character-encoding-033.xht.headers b/testing/web-platform/tests/css/CSS2/syntax/character-encoding-033.xht.headers
new file mode 100644
index 0000000000..4483f5fb71
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/character-encoding-033.xht.headers
@@ -0,0 +1 @@
+Content-Type: application/xhtml+xml; charset=us-ascii
diff --git a/testing/web-platform/tests/css/CSS2/syntax/character-encoding-034.xht b/testing/web-platform/tests/css/CSS2/syntax/character-encoding-034.xht
new file mode 100644
index 0000000000..ab6ded6bd3
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/character-encoding-034.xht
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="us-ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
+ <head>
+ <title>CSS Test: Stylesheet encodings: ISO-8859-6</title>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/parsing/encoding/004.html" type="text/html"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <meta name="flags" content="http" />
+ <style type="text/css">
+ p { background: red; color: yellow; }
+ </style>
+ <link rel="stylesheet" href="support/character-encoding-034.css"/>
+ </head>
+ <body>
+ <p class="t&#x0649;st">This line should be green.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/character-encoding-034.xht.headers b/testing/web-platform/tests/css/CSS2/syntax/character-encoding-034.xht.headers
new file mode 100644
index 0000000000..4483f5fb71
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/character-encoding-034.xht.headers
@@ -0,0 +1 @@
+Content-Type: application/xhtml+xml; charset=us-ascii
diff --git a/testing/web-platform/tests/css/CSS2/syntax/character-encoding-035.xht b/testing/web-platform/tests/css/CSS2/syntax/character-encoding-035.xht
new file mode 100644
index 0000000000..12896b0f75
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/character-encoding-035.xht
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="us-ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
+ <head>
+ <title>CSS Test: Stylesheet encodings: ISO-8859-7</title>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/parsing/encoding/005.html" type="text/html"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <meta name="flags" content="http" />
+ <style type="text/css">
+ p { background: red; color: yellow; }
+ </style>
+ <link rel="stylesheet" href="support/character-encoding-035.css"/>
+ </head>
+ <body>
+ <p class="t&#x03B9;st">This line should be green.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/character-encoding-035.xht.headers b/testing/web-platform/tests/css/CSS2/syntax/character-encoding-035.xht.headers
new file mode 100644
index 0000000000..4483f5fb71
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/character-encoding-035.xht.headers
@@ -0,0 +1 @@
+Content-Type: application/xhtml+xml; charset=us-ascii
diff --git a/testing/web-platform/tests/css/CSS2/syntax/character-encoding-036.xht b/testing/web-platform/tests/css/CSS2/syntax/character-encoding-036.xht
new file mode 100644
index 0000000000..2a9ab495c2
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/character-encoding-036.xht
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="us-ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
+ <head>
+ <title>CSS Test: Stylesheet encodings: ISO-8859-8</title>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/parsing/encoding/006.html" type="text/html"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <meta name="flags" content="http" />
+ <style type="text/css">
+ p { background: red; color: yellow; }
+ </style>
+ <link rel="stylesheet" href="support/character-encoding-036.css"/>
+ </head>
+ <body>
+ <p class="t&#x05D9;st">This line should be green.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/character-encoding-036.xht.headers b/testing/web-platform/tests/css/CSS2/syntax/character-encoding-036.xht.headers
new file mode 100644
index 0000000000..4483f5fb71
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/character-encoding-036.xht.headers
@@ -0,0 +1 @@
+Content-Type: application/xhtml+xml; charset=us-ascii
diff --git a/testing/web-platform/tests/css/CSS2/syntax/character-encoding-037.xht b/testing/web-platform/tests/css/CSS2/syntax/character-encoding-037.xht
new file mode 100644
index 0000000000..02c28caf1f
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/character-encoding-037.xht
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="us-ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
+ <head>
+ <title>CSS Test: Stylesheet encodings: KOI8-R</title>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/parsing/encoding/007.html" type="text/html"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <meta name="flags" content="http" />
+ <style type="text/css">
+ p { background: red; color: yellow; }
+ </style>
+ <link rel="stylesheet" href="support/character-encoding-037.css"/>
+ </head>
+ <body>
+ <p class="t&#x0418;st">This line should be green.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/character-encoding-037.xht.headers b/testing/web-platform/tests/css/CSS2/syntax/character-encoding-037.xht.headers
new file mode 100644
index 0000000000..4483f5fb71
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/character-encoding-037.xht.headers
@@ -0,0 +1 @@
+Content-Type: application/xhtml+xml; charset=us-ascii
diff --git a/testing/web-platform/tests/css/CSS2/syntax/character-encoding-038.xht b/testing/web-platform/tests/css/CSS2/syntax/character-encoding-038.xht
new file mode 100644
index 0000000000..880ff58955
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/character-encoding-038.xht
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="us-ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
+ <head>
+ <title>CSS Test: Stylesheet encodings: malformed UTF-8</title>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/parsing/encoding/008.html" type="text/html"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <meta content="http" name="flags" />
+ <style type="text/css">
+ p { color: white; background: green; }
+ </style>
+ <link rel="stylesheet" href="support/character-encoding-038.css"/>
+ </head>
+ <body>
+ <p class="t&#xE9;st">This line should be green.</p>
+ <p class="t&#x0E49;st">This line should be green.</p>
+ <p class="t&#x0449;st">This line should be green.</p>
+ <p class="t&#x0649;st">This line should be green.</p>
+ <p class="t&#x03B9;st">This line should be green.</p>
+ <p class="t&#x05D9;st">This line should be green.</p>
+ <p class="t&#x0418;st">This line should be green.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/character-encoding-041-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/character-encoding-041-ref.xht
new file mode 100644
index 0000000000..6839a38aea
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/character-encoding-041-ref.xht
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="us-ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
+ <head>
+ <title>CSS Test: Stylesheet encodings UTF with a BOM override</title>
+ <link rel="author" title="Bert Bos" href="mailto:bert@w3.org"/>
+ <style type="text/css">
+ p { color: white; background: green; }
+ </style>
+ </head>
+ <body>
+ <p class="test">This line should be green.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/character-encoding-041.xht b/testing/web-platform/tests/css/CSS2/syntax/character-encoding-041.xht
new file mode 100644
index 0000000000..fd6ae89ead
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/character-encoding-041.xht
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="us-ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
+ <head>
+ <title>CSS Test: Stylesheet encodings UTF with a BOM override</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS22/syndata.html#charset" />
+ <link rel="help" href="http://www.w3.org/TR/CSS22/changes.html#s.4.4" />
+ <link rel="match" href="character-encoding-041-ref.xht" />
+ <meta content="http" name="flags" />
+ <meta name="assert" content='If rule 1 above (an HTTP "charset" parameter or similar) yields a character encoding and it is one of UTF-8, UTF-16 or UTF-32, then a BOM, if any, at the start of the file overrides that character encoding, as follows: [...]'/>
+ <link rel="author" title="Bert Bos" href="mailto:bert@w3.org"/>
+ <style type="text/css">
+ p { color: white; background: red; }
+ </style>
+ <link rel="stylesheet" href="support/character-encoding-041.css"/>
+ </head>
+ <body>
+ <p class="t&#xE9;st">This line should be green.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/character-representation-001.xht b/testing/web-platform/tests/css/CSS2/syntax/character-representation-001.xht
new file mode 100644
index 0000000000..8798e93feb
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/character-representation-001.xht
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Character representation in other encoding</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#escaping" />
+ <meta name="assert" content="Characters in the stylesheet that cannot be represented in the current character encoding are written as escaped references to ISO 10646 characters." />
+ <style type="text/css">
+ div:before
+ {
+ content: "\611B";
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the two characters below are identical.</p>
+ <div>&#24859;</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/characters-0080-009F-001-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/characters-0080-009F-001-ref.xht
new file mode 100644
index 0000000000..f3aeb9994d
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/characters-0080-009F-001-ref.xht
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Valid control characters in identifiers</title>
+
+ <link rel="author" title="Bert Bos" href="mailto:bert@w3.org" />
+
+ <style type="text/css">
+ div p::before {content: counter(item, lower-latin) ". "}
+ div p {counter-increment: item}
+ </style>
+ </head>
+
+ <body>
+ <p>The next items should be numbered a to f.</p>
+ <div>
+ <p>Item</p>
+ <p>Item</p>
+ <p>Item</p>
+ <p>Item</p>
+ <p>Item</p>
+ <p>Item</p>
+ </div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/characters-0080-009F-001.xht b/testing/web-platform/tests/css/CSS2/syntax/characters-0080-009F-001.xht
new file mode 100644
index 0000000000..40a7ad939c
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/characters-0080-009F-001.xht
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Valid control characters in identifiers</title>
+
+ <link rel="help" href="http://www.w3.org/TR/CSS22/syndata.html#characters" />
+ <link rel="help" href="http://www.w3.org/TR/CSS22/changes.html#s.4.1.3d" />
+ <link rel="match" href="characters-0080-009F-001-ref.xht" />
+ <meta name="assert" content="identifiers [...] can contain only the characters [a-zA-Z0-9] and ISO 10646 characters U+0080 and higher, [...]" />
+ <link rel="author" title="Bert Bos" href="mailto:bert@w3.org" />
+
+ <style type="text/css">
+ /* Warning: the next lines contain control characters \201..\237 */
+ div p::before {content: counter(item) ". "}
+ div p::before {content: counter(‚ƒÂžŸ, lower-latin) ". "}
+ div p {counter-increment: ‚ƒÂžŸ}
+ </style>
+ </head>
+
+ <body>
+ <p>The next items should be numbered a to f.</p>
+ <div>
+ <p>Item</p>
+ <p>Item</p>
+ <p>Item</p>
+ <p>Item</p>
+ <p>Item</p>
+ <p>Item</p>
+ </div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/charset-attr-001.xht b/testing/web-platform/tests/css/CSS2/syntax/charset-attr-001.xht
new file mode 100644
index 0000000000..298633eca4
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/charset-attr-001.xht
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>
+ <title>CSS Test: @charset test-attribute</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#charset" />
+ <link rel="help" href="http://www.w3.org/TR/html40/struct/links.html#adef-charset" />
+ <link rel="match" href="at-charset-ref.xht"/>
+ <style type="text/css">
+ body { color: red; }
+ </style>
+ <link type="text/css" charset="UTF-16BE" rel="stylesheet" href="support/charset-attr-001.css" />
+ </head>
+ <body>
+ This should be green
+
+
+
+</body></html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/colors-001.xht b/testing/web-platform/tests/css/CSS2/syntax/colors-001.xht
new file mode 100644
index 0000000000..b570eb7085
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/colors-001.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing rgb color values with white space</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#color-units" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="White space is allowed in the color rgb declaration." />
+ <style type="text/css">
+ div
+ {
+ color: rgb(
+ 0%
+ , 50%
+ , 0%
+ );
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/colors-002.xht b/testing/web-platform/tests/css/CSS2/syntax/colors-002.xht
new file mode 100644
index 0000000000..55cebd10c2
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/colors-002.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing invalid hexadecimal RGB units - white space in hexadecimal values</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#color-units" />
+ <link rel="match" href="../reference/no-red-filler-text-ref.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="White space is not allowed in a hexadecimal color assignment." />
+ <style type="text/css">
+ div
+ {
+ color: # ff0000;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if there is no red visible on the page.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/colors-003.xht b/testing/web-platform/tests/css/CSS2/syntax/colors-003.xht
new file mode 100644
index 0000000000..a747620f39
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/colors-003.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing invalid RGB functional notation - two values</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#color-units" />
+ <link rel="match" href="../reference/no-red-filler-text-ref.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="An RGB value is invalid if it has only two values." />
+ <style type="text/css">
+ div
+ {
+ color: rgb(255, 0);
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if there is no red visible on the page.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/colors-004.xht b/testing/web-platform/tests/css/CSS2/syntax/colors-004.xht
new file mode 100644
index 0000000000..40cd9f7ebf
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/colors-004.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing invalid RGB functional notation - Percentages and Numbers</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#color-units" />
+ <link rel="match" href="../reference/no-red-filler-text-ref.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="An RGB value is invalid if it has both percentages and number assignments." />
+ <style type="text/css">
+ div
+ {
+ color: rgb(100%, 0, 0);
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if there is no red visible on the page.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/colors-005.xht b/testing/web-platform/tests/css/CSS2/syntax/colors-005.xht
new file mode 100644
index 0000000000..a20349d316
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/colors-005.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Clipping of RGB color values</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#color-units" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="Values outside the device gamut are clipped: the red, green, and blue values are changed to fall within the range supported by the device." />
+ <style type="text/css">
+ div
+ {
+ color: rgb(-500, 128, -1);
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/colors-006-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/colors-006-ref.xht
new file mode 100644
index 0000000000..9d8985cd2a
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/colors-006-ref.xht
@@ -0,0 +1,107 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>CSS Reftest Reference</title>
+<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"/>
+<style type="text/css">
+.maroonhex {
+ background: #800000;
+}
+.redhex {
+ background: #ff0000;
+}
+.orangehex {
+ background: #ffa500;
+}
+.yellowhex {
+ background: #ffff00;
+}
+.olivehex {
+ background: #808000;
+}
+.purplehex {
+ background: #800080;
+}
+.fuchsiahex {
+ background: #ff00ff;
+}
+.whitehex {
+ background: #ffffff;
+}
+.limehex {
+ background: #00ff00;
+}
+.greenhex {
+ background: #008000;
+}
+.navyhex {
+ background: #000080;
+}
+.bluehex {
+ background: #0000ff;
+}
+.aquahex {
+ background: #00ffff;
+}
+.tealhex {
+ background: #008080;
+}
+.blackhex {
+ background: #000000;
+}
+.silverhex {
+ background: #c0c0c0;
+}
+.grayhex {
+ background: #808080;
+}
+td {
+ height: 0.5in;
+ width: 0.5in;
+}
+</style>
+</head>
+<body>
+<p>Test passes if the first row of boxes below match the second row of boxes below.</p>
+<table>
+ <tr>
+ <td class="maroonhex"/>
+ <td class="redhex"/>
+ <td class="orangehex"/>
+ <td class="yellowhex"/>
+ <td class="olivehex"/>
+ <td class="purplehex"/>
+ <td class="fuchsiahex"/>
+ <td class="whitehex"/>
+ <td class="limehex"/>
+ <td class="greenhex"/>
+ <td class="navyhex"/>
+ <td class="bluehex"/>
+ <td class="aquahex"/>
+ <td class="tealhex"/>
+ <td class="blackhex"/>
+ <td class="silverhex"/>
+ <td class="grayhex"/>
+ </tr>
+ <tr>
+ <td class="maroonhex"/>
+ <td class="redhex"/>
+ <td class="orangehex"/>
+ <td class="yellowhex"/>
+ <td class="olivehex"/>
+ <td class="purplehex"/>
+ <td class="fuchsiahex"/>
+ <td class="whitehex"/>
+ <td class="limehex"/>
+ <td class="greenhex"/>
+ <td class="navyhex"/>
+ <td class="bluehex"/>
+ <td class="aquahex"/>
+ <td class="tealhex"/>
+ <td class="blackhex"/>
+ <td class="silverhex"/>
+ <td class="grayhex"/>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/colors-006.xht b/testing/web-platform/tests/css/CSS2/syntax/colors-006.xht
new file mode 100644
index 0000000000..c518a2110c
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/colors-006.xht
@@ -0,0 +1,196 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Comparing color keywords and hex values</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#color-units" />
+ <link rel="match" href="colors-006-ref.xht" />
+ <meta name="assert" content="Color matching of keywords and hex values." />
+ <style type="text/css">
+ #maroon
+ {
+ background: maroon;
+ }
+ #maroonhex
+ {
+ background: #800000;
+ }
+ #red
+ {
+ background: red;
+ }
+ #redhex
+ {
+ background: #ff0000;
+ }
+ #orange
+ {
+ background: orange;
+ }
+ #orangehex
+ {
+ background: #ffa500;
+ }
+ #yellow
+ {
+ background: yellow;
+ }
+ #yellowhex
+ {
+ background: #ffff00;
+ }
+ #olive
+ {
+ background: olive;
+ }
+ #olivehex
+ {
+ background: #808000;
+ }
+ #purple
+ {
+ background: purple;
+ }
+ #purplehex
+ {
+ background: #800080;
+ }
+ #fuchsia
+ {
+ background: fuchsia;
+ }
+ #fuchsiahex
+ {
+ background: #ff00ff;
+ }
+ #white
+ {
+ background: white;
+ }
+ #whitehex
+ {
+ background: #ffffff;
+ }
+ #lime
+ {
+ background: lime;
+ }
+ #limehex
+ {
+ background: #00ff00;
+ }
+ #green
+ {
+ background: green;
+ }
+ #greenhex
+ {
+ background: #008000;
+ }
+ #navy
+ {
+ background: navy;
+ }
+ #navyhex
+ {
+ background: #000080;
+ }
+ #blue
+ {
+ background: blue;
+ }
+ #bluehex
+ {
+ background: #0000ff;
+ }
+ #aqua
+ {
+ background: aqua;
+ }
+ #aquahex
+ {
+ background: #00ffff;
+ }
+ #teal
+ {
+ background: teal;
+ }
+ #tealhex
+ {
+ background: #008080;
+ }
+ #black
+ {
+ background: black;
+ }
+ #blackhex
+ {
+ background: #000000;
+ }
+ #silver
+ {
+ background: silver;
+ }
+ #silverhex
+ {
+ background: #c0c0c0;
+ }
+ #gray
+ {
+ background: gray;
+ }
+ #grayhex
+ {
+ background: #808080;
+ }
+ td
+ {
+ height: 0.5in;
+ width: 0.5in;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the first row of boxes below match the second row of boxes below.</p>
+ <table>
+ <tr>
+ <td id="maroon"></td>
+ <td id="red"></td>
+ <td id="orange"></td>
+ <td id="yellow"></td>
+ <td id="olive"></td>
+ <td id="purple"></td>
+ <td id="fuchsia"></td>
+ <td id="white"></td>
+ <td id="lime"></td>
+ <td id="green"></td>
+ <td id="navy"></td>
+ <td id="blue"></td>
+ <td id="aqua"></td>
+ <td id="teal"></td>
+ <td id="black"></td>
+ <td id="silver"></td>
+ <td id="gray"></td>
+ </tr>
+ <tr>
+ <td id="maroonhex"></td>
+ <td id="redhex"></td>
+ <td id="orangehex"></td>
+ <td id="yellowhex"></td>
+ <td id="olivehex"></td>
+ <td id="purplehex"></td>
+ <td id="fuchsiahex"></td>
+ <td id="whitehex"></td>
+ <td id="limehex"></td>
+ <td id="greenhex"></td>
+ <td id="navyhex"></td>
+ <td id="bluehex"></td>
+ <td id="aquahex"></td>
+ <td id="tealhex"></td>
+ <td id="blackhex"></td>
+ <td id="silverhex"></td>
+ <td id="grayhex"></td>
+ </tr>
+ </table>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/comments-001.xht b/testing/web-platform/tests/css/CSS2/syntax/comments-001.xht
new file mode 100644
index 0000000000..97fd63798d
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/comments-001.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing comments within style tag</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#comments" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="Comments are allowed anywhere within a style tag declaration and are ignored." />
+ <style type="text/css">
+ /*Comment*/div/*Comment*/
+ {
+ /*Comment*/color/*Comment*/: /*Comment*/green/*Comment*/;
+ /*Comment*/
+ }/*Comment*/
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/comments-002.xht b/testing/web-platform/tests/css/CSS2/syntax/comments-002.xht
new file mode 100644
index 0000000000..73c765f080
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/comments-002.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Nested comments</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#comments" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Comments cannot be nested." />
+ <style type="text/css">
+ div
+ {
+ /*/**/color:green;*/
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/comments-003.xht b/testing/web-platform/tests/css/CSS2/syntax/comments-003.xht
new file mode 100644
index 0000000000..b578504c0a
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/comments-003.xht
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: HTML comments and CSS comments</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#comments" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="SGML comment delimiters do not delimit CSS comments." />
+ <style type="text/css">
+ <![CDATA[
+ div
+ {
+ color: green;
+ }
+ <!--
+ /*
+ #div1
+ {
+ color: red;
+ }
+ -->
+ #div1
+ {
+ color: red;
+ }
+ ]]>
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div id="div1">Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/comments-004.xht b/testing/web-platform/tests/css/CSS2/syntax/comments-004.xht
new file mode 100644
index 0000000000..bdeddb2764
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/comments-004.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing of invalid comments</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#comments" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Comments that are invalid are ignored." />
+ <style type="text/css">
+ div
+ {
+ /*/*/color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/comments-005.xht b/testing/web-platform/tests/css/CSS2/syntax/comments-005.xht
new file mode 100644
index 0000000000..614ef25a02
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/comments-005.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing of escaped "/" within a valid comment</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-07-27 -->
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#comments" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="A slash '/' escaped with a backslash will remove its special meaning." />
+ <style type="text/css">
+ div
+ {
+ /* *\/*/color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/comments-006.xht b/testing/web-platform/tests/css/CSS2/syntax/comments-006.xht
new file mode 100644
index 0000000000..016d90b240
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/comments-006.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing of escaped "*" within a valid comment</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#comments" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="A star '*' escaped with a backslash will not remove its special meaning." />
+ <style type="text/css">
+ *
+ {
+ color: green;
+ }
+ p
+ {
+ color: black;
+ }
+ div
+ {
+ /*\*/*/color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/comments-007.xht b/testing/web-platform/tests/css/CSS2/syntax/comments-007.xht
new file mode 100644
index 0000000000..77ea32cdec
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/comments-007.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing of valid comment that is empty</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#comments" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Empty comments do not affect parsing of rule." />
+ <style type="text/css">
+ div
+ {
+ /**/color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/comments-008.xht b/testing/web-platform/tests/css/CSS2/syntax/comments-008.xht
new file mode 100644
index 0000000000..f0bcc7e054
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/comments-008.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing of escaped opening comment</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#comments" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Escaping a slash '/' for an opening comment makes the comment invalid." />
+ <style type="text/css">
+ div
+ {
+ \/*;color: green;*/
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/comments-009.xht b/testing/web-platform/tests/css/CSS2/syntax/comments-009.xht
new file mode 100644
index 0000000000..56dbd48744
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/comments-009.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing of invalid escaped "*" in open comment</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#comments" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Escaping a star '*' for an opening comment makes the comment invalid." />
+ <style type="text/css">
+ div
+ {
+ /\*;color: green;*/
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/content-type-000-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/content-type-000-ref.xht
new file mode 100644
index 0000000000..246ea7e0db
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/content-type-000-ref.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+ <title>CSS Reftest Reference</title>
+
+ <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+ <link rel="author" title="David Hammond" href="http://www.webdevout.net/contact" />
+
+ <style type="text/css"><![CDATA[
+ div
+ {
+ background-color: lime;
+ font-size: 2em;
+ }
+ ]]></style>
+
+ </head>
+
+ <body>
+
+ <p>Test passes if the background of the text sample is bright green. There should be <strong>no red</strong>.</p>
+
+ <div>Text sample</div>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/content-type-000.xht b/testing/web-platform/tests/css/CSS2/syntax/content-type-000.xht
new file mode 100644
index 0000000000..e98809dc27
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/content-type-000.xht
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+ <title>CSS Test: text/css content type</title>
+
+ <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+ <link rel="author" title="David Hammond" href="http://www.webdevout.net/contact" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/conform.html#text-css" />
+ <link rel="match" href="content-type-000-ref.xht" />
+ <meta content="http" name="flags" />
+ <meta content="A stylesheet sent as text/plain should not be interpreted by user agents as CSS. It should instead be ignored." name="assert" />
+
+ <style type="text/css"><![CDATA[
+ div
+ {
+ background-color: lime;
+ font-size: 2em;
+ }
+ ]]></style>
+
+ <link href="support/plaintext.css" rel="stylesheet" type="text/css" />
+ <!--
+ in .htaccess
+ <Files plaintext.css>
+ ForceType text/plain
+ </Files>
+ -->
+
+ </head>
+
+ <body>
+
+ <p>Test passes if the background of the text sample is bright green. There should be <strong>no red</strong>.</p>
+
+ <div>Text sample</div>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/content-type-001.xht b/testing/web-platform/tests/css/CSS2/syntax/content-type-001.xht
new file mode 100644
index 0000000000..4ac59e4754
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/content-type-001.xht
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+ <title>CSS Test: text/css content type</title>
+
+ <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+ <link rel="author" title="Daniel Schattenkirchner" href="mailto:crazy-daniel@gmx.de" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/conform.html#text-css" />
+ <link rel="match" href="content-type-000-ref.xht" />
+ <meta content="http" name="flags" />
+ <meta content="A stylesheet sent as text/plain should not be interpreted by user agents as CSS. It should instead be ignored." name="assert" />
+
+ <style type="text/css"><![CDATA[
+ div
+ {
+ background-color: lime;
+ font-size: 2em;
+ }
+ ]]></style>
+
+ <link href="support/plaintext-css.txt" rel="stylesheet" type="text/css" />
+
+ </head>
+
+ <body>
+
+ <p>Test passes if the background of the text sample is bright green. There should be <strong>no red</strong>.</p>
+
+ <div>Text sample</div>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/core-syntax-001-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/core-syntax-001-ref.xht
new file mode 100644
index 0000000000..bb4955bfb5
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/core-syntax-001-ref.xht
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>CSS Reftest Reference</title>
+<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"/>
+<style type="text/css">
+p {
+ color: green;
+ text-decoration: underline;
+}
+</style>
+</head>
+<body>
+<p>This sentence should be green and underlined.</p>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/core-syntax-001.xht b/testing/web-platform/tests/css/CSS2/syntax/core-syntax-001.xht
new file mode 100644
index 0000000000..6d8ec7ceba
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/core-syntax-001.xht
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
+ <head>
+ <title>CSS Test: Nested blocks in unexpected places</title>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/parsing/core-syntax/001.html" type="text/html"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="core-syntax-001-ref.xht"/>
+ <meta name="flags" content="invalid" />
+ <style type="text/css">
+ .test { color: green; }
+ .test { test { :nested; color: yellow; background: red; }: not-nested; text-decoration: underline; }
+ </style>
+ </head>
+ <body>
+ <p class="test">This sentence should be green and underlined.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/core-syntax-006-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/core-syntax-006-ref.xht
new file mode 100644
index 0000000000..aadeac2300
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/core-syntax-006-ref.xht
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>CSS Reftest Reference</title>
+<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"/>
+<style type="text/css">
+body {
+ color: green;
+}
+</style>
+</head>
+<body>
+<p>This line should be green.</p>
+<div>This line should be green.</div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/core-syntax-006.xht b/testing/web-platform/tests/css/CSS2/syntax/core-syntax-006.xht
new file mode 100644
index 0000000000..eb5d380af0
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/core-syntax-006.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
+ <head>
+ <title>CSS Test: Parsing invalid '!' declarations</title>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/parsing/core-syntax/006.html" type="text/html"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="core-syntax-006-ref.xht"/>
+ <meta name="flags" content="invalid" />
+ <style type="text/css">
+ body { color: green; }
+ p { background: red ! fail; color: yellow ! fail }
+ div { background: red ! important fail; color: yellow ! important fail }
+ </style>
+ </head>
+ <body>
+ <p>This line should be green.</p>
+ <div>This line should be green.</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/core-syntax-007-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/core-syntax-007-ref.xht
new file mode 100644
index 0000000000..964fc317a6
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/core-syntax-007-ref.xht
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>CSS Reftest Reference</title>
+<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"/>
+<style type="text/css">
+body {
+ font-size: 16px;
+}
+</style>
+</head>
+<body>
+<p>Test passes if this text is not dramatically taller than the text below.</p>
+<div>Filler Text</div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/core-syntax-007.xht b/testing/web-platform/tests/css/CSS2/syntax/core-syntax-007.xht
new file mode 100644
index 0000000000..b0d99e3729
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/core-syntax-007.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
+ <head>
+ <title>CSS Test: Parsing invalid '!' declarations</title>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/parsing/core-syntax/007.html" type="text/html"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="core-syntax-007-ref.xht"/>
+ <meta name="flags" content="invalid" />
+ <style type="text/css">
+ body { font-size: 200px; }
+ p { font-size: 16px; font-size: 200!invalid; }
+ div { font-size: 16px; }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if this text is not dramatically taller than the text below.</p>
+ <div>Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/core-syntax-008.xht b/testing/web-platform/tests/css/CSS2/syntax/core-syntax-008.xht
new file mode 100644
index 0000000000..08e08c0e01
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/core-syntax-008.xht
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
+ <head>
+ <title>CSS Test: Parsing invalid 'color' declarations</title>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/parsing/core-syntax/008.html" type="text/html"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="../reference/ref-this-text-should-be-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <style type="text/css">
+ body { color: green; }
+ p { color: 1111ff; }
+ </style>
+ </head>
+ <body>
+ <p>This text should be green.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/core-syntax-009.xht b/testing/web-platform/tests/css/CSS2/syntax/core-syntax-009.xht
new file mode 100644
index 0000000000..2ffa3e4b9a
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/core-syntax-009.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Syntactic White Space</title>
+ <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"/>
+ <link rel="match" href="../reference/ref-this-text-should-be-green.xht"/>
+ <meta name="assert" content="Only the characters U+0020, U+0009, U+000A,
+ U+000D, and U+000C are considered white space."/>
+ <meta name="flags" content="invalid" />
+ <style type="text/css">
+ @import "support/core-syntax-009.css";
+ div&#x2003;p { color: red; }
+ div&#x200B;p { color: red; }
+ div&#x200F;p { color: red; }
+ div&#x3000;p { color: red; }
+ div&#x2028;p { color: red; }
+ div&#x2029;p { color: red; }
+ div&#x00A0;p { color: red; }
+ div&#xFEFF;p { color: red; }
+ </style>
+
+ </head>
+ <body>
+ <div>
+ <p>This text should be green.</p>
+ </div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/counters-001-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/counters-001-ref.xht
new file mode 100644
index 0000000000..0d1058629b
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/counters-001-ref.xht
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>CSS Reftest Reference</title>
+<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"/>
+<style type="text/css">
+div {
+ color: green;
+}
+</style>
+</head>
+<body>
+<p>Test passes if there is a number "1" below.</p>
+<div>1</div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/counters-001.xht b/testing/web-platform/tests/css/CSS2/syntax/counters-001.xht
new file mode 100644
index 0000000000..cf46887947
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/counters-001.xht
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing counter functions with just the identifier</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html" />
+ <link rel="match" href="counters-001-ref.xht"/>
+ <meta name="assert" content="Counters can be referred to using only the identifier." />
+ <style type="text/css">
+ body
+ {
+ counter-reset: chapter;
+ }
+ div:before
+ {
+ content: counter(chapter);
+ color: green;
+ counter-increment: chapter;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if there is a number "1" below.</p>
+ <div></div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/counters-002.xht b/testing/web-platform/tests/css/CSS2/syntax/counters-002.xht
new file mode 100644
index 0000000000..5966468290
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/counters-002.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing invalid counter functions - Too many arguments</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html" />
+ <link rel="match" href="../reference/no-red-filler-text-ref.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="A counter is invalid if it has too many arguments." />
+ <style type="text/css">
+ div:before
+ {
+ content: "FAIL" counter(chapter, square, bogus) ":";
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if there is no red visible on the page.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/counters-003-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/counters-003-ref.xht
new file mode 100644
index 0000000000..681a92ad7d
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/counters-003-ref.xht
@@ -0,0 +1,11 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>CSS Reftest Reference</title>
+<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"/>
+</head>
+<body>
+<p>Test passes if the equation below is true.</p>
+<p>I = I</p>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/counters-003.xht b/testing/web-platform/tests/css/CSS2/syntax/counters-003.xht
new file mode 100644
index 0000000000..5df8e1b242
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/counters-003.xht
@@ -0,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing counter() function with no white space</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="counters-003-ref.xht"/>
+ <meta name="assert" content="The counter function can be parsed with no white space separating the function values." />
+ <style type="text/css">
+ body
+ {
+ counter-reset: chapter;
+ }
+ div p:before
+ {
+ content: counter(chapter,upper-roman);
+ counter-increment: chapter;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the equation below is true.</p>
+ <div>
+ <p> = I</p>
+ </div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/counters-004-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/counters-004-ref.xht
new file mode 100644
index 0000000000..1e1ac9f310
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/counters-004-ref.xht
@@ -0,0 +1,11 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>CSS Reftest Reference</title>
+<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"/>
+</head>
+<body>
+<p>Test passes if the equation below is true.</p>
+<p>1 = 1</p>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/counters-004.xht b/testing/web-platform/tests/css/CSS2/syntax/counters-004.xht
new file mode 100644
index 0000000000..47cd08bfbc
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/counters-004.xht
@@ -0,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing counters() function with no white space and two function values</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="counters-004-ref.xht"/>
+ <meta name="assert" content="The counters function can be parsed with no white space separating the two function values." />
+ <style type="text/css">
+ body
+ {
+ counter-reset: chapter;
+ }
+ div p:before
+ {
+ content: counters(chapter,".");
+ counter-increment: chapter;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the equation below is true.</p>
+ <div>
+ <p> = 1</p>
+ </div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/counters-005.xht b/testing/web-platform/tests/css/CSS2/syntax/counters-005.xht
new file mode 100644
index 0000000000..b466c9d999
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/counters-005.xht
@@ -0,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing counters() function with no white space and three function values</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="counters-003-ref.xht"/>
+ <meta name="assert" content="The counters function can be parsed with no white space separating the three function values." />
+ <style type="text/css">
+ body
+ {
+ counter-reset: chapter;
+ }
+ div p:before
+ {
+ content: counters(chapter,".",upper-roman);
+ counter-increment: chapter;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the equation below is true.</p>
+ <div>
+ <p> = I</p>
+ </div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/counters-006.xht b/testing/web-platform/tests/css/CSS2/syntax/counters-006.xht
new file mode 100644
index 0000000000..163d1e8b02
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/counters-006.xht
@@ -0,0 +1,31 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing counter() function with white space</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="counters-004-ref.xht"/>
+ <meta name="assert" content="The counter function can be parsed with white space separating the function value." />
+ <style type="text/css">
+ body
+ {
+ counter-reset: chapter;
+ }
+ div p:before
+ {
+ content:
+ counter(
+ chapter
+ )
+ ;
+ counter-increment: chapter;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the equation below is true.</p>
+ <div>
+ <p> = 1</p>
+ </div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/counters-007.xht b/testing/web-platform/tests/css/CSS2/syntax/counters-007.xht
new file mode 100644
index 0000000000..a97452625d
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/counters-007.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing counter() function with white space and two function values</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="counters-003-ref.xht"/>
+ <meta name="assert" content="The counter function can be parsed with white space separating the two function values." />
+ <style type="text/css">
+ body
+ {
+ counter-reset: chapter;
+ }
+ div p:before
+ {
+ content:
+ counter(
+ chapter
+ ,
+ upper-roman
+ )
+ ;
+ counter-increment: chapter;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the equation below is true.</p>
+ <div>
+ <p> = I</p>
+ </div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/counters-008.xht b/testing/web-platform/tests/css/CSS2/syntax/counters-008.xht
new file mode 100644
index 0000000000..e9980948db
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/counters-008.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing counters() function with white space and two function values</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="counters-004-ref.xht"/>
+ <meta name="assert" content="The counters function can be parsed with white space separating the two function values." />
+ <style type="text/css">
+ body
+ {
+ counter-reset: chapter;
+ }
+ div p:before
+ {
+ content:
+ counters(
+ chapter
+ ,
+ "."
+ )
+ ;
+ counter-increment: chapter;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the equation below is true.</p>
+ <div>
+ <p> = 1</p>
+ </div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/counters-009.xht b/testing/web-platform/tests/css/CSS2/syntax/counters-009.xht
new file mode 100644
index 0000000000..add7032f2d
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/counters-009.xht
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing counters() function with white space and three function values</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="counters-003-ref.xht"/>
+ <meta name="assert" content="The counters function can be parsed with white space separating the three function values." />
+ <style type="text/css">
+ body
+ {
+ counter-reset: chapter;
+ }
+ div p:before
+ {
+ content:
+ counters(
+ chapter
+ ,
+ "."
+ ,
+ upper-roman
+ )
+ ;
+ counter-increment: chapter;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the equation below is true.</p>
+ <div>
+ <p> = I</p>
+ </div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/counters-010-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/counters-010-ref.xht
new file mode 100644
index 0000000000..c20c5698de
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/counters-010-ref.xht
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>CSS Reftest Reference</title>
+<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"/>
+</head>
+<body>
+<p>Test passes if the equations below are true.</p>
+<p>1 = 1</p>
+<p>1.1 = 1.1</p>
+<p>1.2 = 1.2</p>
+<p>i.iii = i.iii</p>
+<p>I.IV = I.IV</p>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/counters-010.xht b/testing/web-platform/tests/css/CSS2/syntax/counters-010.xht
new file mode 100644
index 0000000000..d5f91b2ffd
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/counters-010.xht
@@ -0,0 +1,55 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing counters() functions</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="counters-010-ref.xht"/>
+ <meta name="assert" content="To refer to a sequence of nested counters of the same name, the notation is 'counters(identifier, string)' or 'counters(identifier, string, list-style-type)'." />
+ <style type="text/css">
+ body
+ {
+ counter-reset: chapter;
+ }
+ #p1
+ {
+ counter-reset: chapter;
+ }
+ div p:before
+ {
+ content: counter(chapter);
+ counter-increment: chapter;
+ }
+ #p1:before
+ {
+ content: counters(chapter, ".");
+ counter-increment: chapter;
+ }
+ #p2:before
+ {
+ content: counters(chapter, ".");
+ counter-increment: chapter;
+ }
+ #p3:before
+ {
+ content: counters(chapter, ".", lower-roman);
+ counter-increment: chapter;
+ }
+ #p4:before
+ {
+ content: counters(chapter, ".", upper-roman);
+ counter-increment: chapter;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the equations below are true.</p>
+ <div>
+ <p> = 1</p>
+ <p id="p1"> = 1.1</p>
+ <p id="p2"> = 1.2</p>
+ <p id="p3"> = i.iii</p>
+ <p id="p4"> = I.IV</p>
+ </div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/declaration-001.xht b/testing/web-platform/tests/css/CSS2/syntax/declaration-001.xht
new file mode 100644
index 0000000000..ffc7f8d19e
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/declaration-001.xht
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: malformed declaration missing ':', value, part 1</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors"/>
+ <link rel="match" href="../reference/ref-this-text-should-be-green.xht"/>
+ <meta name="flags" content="invalid"/>
+ <style type="text/css">
+ p { color:green; color }
+ </style>
+ </head>
+ <body>
+ <p>This text should be green.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/declaration-002.xht b/testing/web-platform/tests/css/CSS2/syntax/declaration-002.xht
new file mode 100644
index 0000000000..8b905c21f1
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/declaration-002.xht
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: malformed declaration missing ':', value, part 2</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors"/>
+ <link rel="match" href="../reference/ref-this-text-should-be-green.xht"/>
+ <meta name="flags" content="invalid"/>
+ <style type="text/css">
+ p { color:red; color; color:green }
+ </style>
+ </head>
+ <body>
+ <p>This text should be green.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/declaration-003.xht b/testing/web-platform/tests/css/CSS2/syntax/declaration-003.xht
new file mode 100644
index 0000000000..9e488e41b0
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/declaration-003.xht
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: malformed declaration missing value, part 1</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors"/>
+ <link rel="match" href="../reference/ref-this-text-should-be-green.xht"/>
+ <meta name="flags" content="invalid"/>
+ <style type="text/css">
+ p { color:green; color: }
+ </style>
+ </head>
+ <body>
+ <p>This text should be green.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/declaration-004.xht b/testing/web-platform/tests/css/CSS2/syntax/declaration-004.xht
new file mode 100644
index 0000000000..cd262d02c2
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/declaration-004.xht
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: malformed declaration missing value, part 2</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors"/>
+ <link rel="match" href="../reference/ref-this-text-should-be-green.xht"/>
+ <meta name="flags" content="invalid"/>
+ <style type="text/css">
+ p { color:red; color:; color:green }
+ </style>
+ </head>
+ <body>
+ <p>This text should be green.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/declaration-005.xht b/testing/web-platform/tests/css/CSS2/syntax/declaration-005.xht
new file mode 100644
index 0000000000..406c72cb0b
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/declaration-005.xht
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: malformed declaration: unexpected tokens { }, part 1</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors"/>
+ <link rel="match" href="../reference/ref-this-text-should-be-green.xht"/>
+ <meta name="flags" content="invalid"/>
+ <style type="text/css">
+ p { color:green; color{;color:maroon} }
+ </style>
+ </head>
+ <body>
+ <p>This text should be green.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/declaration-006.xht b/testing/web-platform/tests/css/CSS2/syntax/declaration-006.xht
new file mode 100644
index 0000000000..0f37aa4b9c
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/declaration-006.xht
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: malformed declaration: unexpected tokens { }, part 2</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors"/>
+ <link rel="match" href="../reference/ref-this-text-should-be-green.xht"/>
+ <meta name="flags" content="invalid"/>
+ <style type="text/css">
+ p { color:red; color{;color:maroon}; color:green }
+ </style>
+ </head>
+ <body>
+ <p>This text should be green.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/declaration-whitespace-001.xht b/testing/web-platform/tests/css/CSS2/syntax/declaration-whitespace-001.xht
new file mode 100644
index 0000000000..c941cf716a
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/declaration-whitespace-001.xht
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing white space in style declaration</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#declaration" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="Various white space are allowed anywhere within the declaration and are ignored." />
+ <style type="text/css">
+ div
+ {
+
+
+
+ color
+ :
+
+
+
+
+ green
+
+
+
+
+ ;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/declarations-009-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/declarations-009-ref.xht
new file mode 100644
index 0000000000..ac64a7b976
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/declarations-009-ref.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>CSS Reftest Reference</title>
+<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"/>
+<style type="text/css">
+p {
+ color: green;
+}
+</style>
+</head>
+<body>
+<p>This sentence must be green</p>
+<p>This sentence must be green</p>
+<p>This sentence must be green</p>
+<p>This sentence must be green</p>
+<p>This sentence must be green</p>
+<p>This sentence must be green</p>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/declarations-009.xht b/testing/web-platform/tests/css/CSS2/syntax/declarations-009.xht
new file mode 100644
index 0000000000..33abc0a924
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/declarations-009.xht
@@ -0,0 +1,49 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Ignoring at-rules inside declaration blocks</title>
+ <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors"/>
+ <link rel="match" href="declarations-009-ref.xht"/>
+ <meta name="flags" content="invalid"/>
+ <meta name="assert" content="At-rules inside declaration blocks are parsed as malformed declarations."/>
+ <style type="text/css">
+ #a {
+ color: green;
+ @import "support/import-red.css" color: red;
+ }
+ #b {
+ color: red;
+ @import "support/import-red.css";
+ color: green;
+ }
+ #c {
+ color: green;
+ @media { #c { color: red !important } }
+ color: red;
+ }
+ #d {
+ color: red;
+ @media { #c { color: red !important } };
+ color: green;
+ }
+ #e {
+ color: green;
+ @foo [ color: red; } #e { color: red; } ]
+ }
+ #f {
+ color: green;
+ color: red @import "support/import-red.css";
+ }
+ </style>
+ </head>
+ <body>
+ <p id="a">This sentence must be green</p>
+ <p id="b">This sentence must be green</p>
+ <p id="c">This sentence must be green</p>
+ <p id="d">This sentence must be green</p>
+ <p id="e">This sentence must be green</p>
+ <p id="f">This sentence must be green</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/eof-001.xht b/testing/web-platform/tests/css/CSS2/syntax/eof-001.xht
new file mode 100644
index 0000000000..d675167528
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/eof-001.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing unexpected end of declaration block</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="The parser implicitly terminates the block and applies the styles if the declaration block is not terminated." />
+ <style type="text/css">
+ div
+ {
+ color: green
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/eof-002.xht b/testing/web-platform/tests/css/CSS2/syntax/eof-002.xht
new file mode 100644
index 0000000000..00d6559b28
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/eof-002.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing unexpected end of function</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="User agents close all open parentheses at the end of the style sheet." />
+ <style type="text/css">
+ div
+ {
+ color: rgb(0, 128, 0
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/eof-003.xht b/testing/web-platform/tests/css/CSS2/syntax/eof-003.xht
new file mode 100644
index 0000000000..f4050c9b21
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/eof-003.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing unexpected end of string</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Close all open strings at the end of the style sheet." />
+ <style type="text/css">
+ div:before
+ {
+ color: green;
+ content: "Filler Text\
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div></div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/eof-004.xht b/testing/web-platform/tests/css/CSS2/syntax/eof-004.xht
new file mode 100644
index 0000000000..60147c67ee
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/eof-004.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing unexpected end of @media block</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="User agents close all open blocks at the end of the style sheet." />
+ <style type="text/css">
+ @media screen
+ {
+ div
+ {
+ color: green
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/eof-005.xht b/testing/web-platform/tests/css/CSS2/syntax/eof-005.xht
new file mode 100644
index 0000000000..37b74bee16
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/eof-005.xht
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing unexpected end of @import</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="User agents close all open rules at the end of the style sheet." />
+ <style type="text/css">
+ @import "support/eof-green.css</style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/eof-006.xht b/testing/web-platform/tests/css/CSS2/syntax/eof-006.xht
new file mode 100644
index 0000000000..c079cffdaa
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/eof-006.xht
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing unexpected end of @import with closed quote</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="User agents close all open quotes at the end of the style sheet." />
+ <style type="text/css">
+ @import "support/eof-green.css"</style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/eof-007.xht b/testing/web-platform/tests/css/CSS2/syntax/eof-007.xht
new file mode 100644
index 0000000000..58bdc02a6d
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/eof-007.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing unexpected end of shorthand rule</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="User agents close all open rules at the end of the style sheet." />
+ <style type="text/css">
+ div
+ {
+ color: green
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-001.xht b/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-001.xht
new file mode 100644
index 0000000000..332c9c15fe
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-001.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing escaped identifiers as selectors, property and value</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="Escaped identifiers are parsed and applied." />
+ <style type="text/css">
+ \64\69\76
+ {
+ \63\6F\6C\6F\72: \67\72\65\65\6E;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-002.xht b/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-002.xht
new file mode 100644
index 0000000000..1dbf76c88b
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-002.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing escaped special CSS characters</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="Escaped special CSS characters are no longer meaningful." />
+ <style type="text/css">
+ .\31st\'Class\27 /* escaped "1st'Class'" */
+ {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div class="1st'Class'">Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-003.xht b/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-003.xht
new file mode 100644
index 0000000000..689dfedb4f
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-003.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing escaped newlines within identifiers</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters" />
+ <link rel="match" href="../reference/no-red-filler-text-ref.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Newlines cannot be escaped within identifiers." />
+ <style type="text/css">
+ #my\
+id
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if there is no red visible on the page.</p>
+ <p id="myid">Filler Text</p>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-004.xht b/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-004.xht
new file mode 100644
index 0000000000..47b839ad1a
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-004.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing escaped chars in the range of 0-9a-f</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters" />
+ <link rel="match" href="../reference/no-red-filler-text-ref.xht"/>
+ <meta name="assert" content="The {unicode} chars are not treated like {escape} chars." />
+ <style type="text/css">
+ .\a\b\c\1\2\3
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if there is no red visible on the page.</p>
+ <p class="abc123">Filler Text</p>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-char-001.xht b/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-char-001.xht
new file mode 100644
index 0000000000..d8beee4a4e
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-char-001.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing escaped characters as selector and property</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="Escaped characters are treated as normal characters." />
+ <style type="text/css">
+ di\v
+ {
+ c\o\l\o\r: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-spaces-001.xht b/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-spaces-001.xht
new file mode 100644
index 0000000000..2dbad085c5
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-spaces-001.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing escaped identifiers with spaces</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="Escaped identifiers are parsed and spaces between them are ignored." />
+ <style type="text/css">
+ \64\69\76 /*Escaped 'div{color:green}'*/
+ {
+ \63 \6F \6C \6F \72 : \67 \72 \65 \65 \6E ;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-spaces-002.xht b/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-spaces-002.xht
new file mode 100644
index 0000000000..a5012faab5
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-spaces-002.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Termination of escaped character sequences with white space</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="Escaped character sequences are terminated by white space." />
+ <style type="text/css">
+ div
+ {
+ \63 \06F \006C \0006F \72 : \067 \0072 \00065 \00065 \6E ; /* color:green */
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-spaces-003.xht b/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-spaces-003.xht
new file mode 100644
index 0000000000..6a1992b663
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-spaces-003.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Termination of escaped character sequences with six digits</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="Escaped character sequences are terminated by exactly six hex digits." />
+ <style type="text/css">
+ div
+ {
+ c\00006Fl\00006Fr:\000067r\000065e\00006E; /* color:green */
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-spaces-004.xht b/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-spaces-004.xht
new file mode 100644
index 0000000000..d09ded2f3c
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-spaces-004.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Termination of escaped character sequences with six digits and white space</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="Escaped character sequences are terminated by exactly six hex digits and white space." />
+ <style type="text/css">
+ div
+ {
+ \000063 \00006F \00006C \00006F \000072 : \000067 \000072 \000065 \000065 \00006E ; /* color:green */
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-spaces-005.xht b/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-spaces-005.xht
new file mode 100644
index 0000000000..d8c5a79c54
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-spaces-005.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Termination of escaped character sequences with less than 6 digits and white space</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="Escaped character sequences are terminated by white space." />
+ <style type="text/css">
+ div
+ {
+ \63 \06F \006C \0006F \72 : \067 \0072 \00065 \00065 \6E ; /* color:green */
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-spaces-006.xht b/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-spaces-006.xht
new file mode 100644
index 0000000000..4935ee1fdf
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-spaces-006.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Termination of escaped character sequences with two digits terminated by white space</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="Escaped character sequences (two hex digits) are terminated by white space." />
+ <style type="text/css">
+ div
+ {
+ \63 \6F \6C \6F \72 : \67 \72 ee\6E ; /* color:green */
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-spaces-007.xht b/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-spaces-007.xht
new file mode 100644
index 0000000000..0feac95ef5
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escaped-ident-spaces-007.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Termination of escaped character sequences with less than six digits terminated by linefeeds and tabs</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="Escaped character sequences (less than six hex digits) are terminated by white space, tabs and linefeeds." />
+ <style type="text/css">
+ div /* 'color : green' terminated with tabs and linefeeds */
+ {
+ \63
+\06F
+l\0006F
+r : g\0072 \00065
+e\6E ;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escaped-newline-001-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/escaped-newline-001-ref.xht
new file mode 100644
index 0000000000..80e85ab8b0
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escaped-newline-001-ref.xht
@@ -0,0 +1,11 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>CSS Reftest Reference</title>
+<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"/>
+</head>
+<body>
+<p>Test passes if the words "Filler Text" below are all on the same line.</p>
+<div>Filler Text Filler Text</div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escaped-newline-001.xht b/testing/web-platform/tests/css/CSS2/syntax/escaped-newline-001.xht
new file mode 100644
index 0000000000..e576eb371e
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escaped-newline-001.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing strings with escaped newlines</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#strings" />
+ <link rel="match" href="escaped-newline-001-ref.xht"/>
+ <meta name="assert" content="Strings with escaped newlines are treated as a single whole string." />
+ <style type="text/css">
+ div:before
+ {
+ content: "Filler\
+ Text\00000a
+ Filler Text";
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the words "Filler Text" below are all on the same line.</p>
+ <div></div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escaped-url-001-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/escaped-url-001-ref.xht
new file mode 100644
index 0000000000..2df64b591a
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escaped-url-001-ref.xht
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Escapes in a URI token</title>
+
+ <link rel="author" title="Bert Bos" href="mailto:bert@w3.org" />
+
+ <style type="text/css">
+ div {width: 5em; height: 1em; background: url(support/1x1-green.png)}
+ </style>
+ </head>
+
+ <body>
+ <p>There should be no red.</p>
+ <div id="div0"></div>
+ <div id="div1"></div>
+ <div id="div2"></div>
+ <div id="div3"></div>
+ <div id="div4"></div>
+ <div id="div5"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escaped-url-001.xht b/testing/web-platform/tests/css/CSS2/syntax/escaped-url-001.xht
new file mode 100644
index 0000000000..caaa644a95
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escaped-url-001.xht
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Escapes in a URI token</title>
+
+ <link rel="help" href="http://www.w3.org/TR/CSS22/syndata.html#tokenization" />
+ <link rel="help" href="http://www.w3.org/TR/CSS22/changes.html#s.4.1.1a" />
+ <link rel="match" href="escaped-url-001-ref.xht" />
+ <meta name="assert" content="URI {U}{R}{L}\({w}{string}{w}\)|
+ {U}{R}{L}\({w}([!#$%&amp;*-\[\]-~]|{nonascii}|{escape})*{w}\)" />
+ <link rel="author" title="Bert Bos" href="mailto:bert@w3.org" />
+
+ <style type="text/css">
+ div {background: red; width: 5em; height: 1em}
+ #div0 {background: url(support/1x1-green.png)}
+ #div1 {background: \url(support/1x1-green.png)}
+ #div2 {background: U\Rl(support/1x1-green.png)}
+ #div3 {background: U\R\l(support/1x1-green.png)}
+ #div4 {background: \55Rl(support/1x1-green.png)}
+ #div5 {background: \000075 rl(support/1x1-green.png)}
+ </style>
+ </head>
+
+ <body>
+ <p>There should be no red.</p>
+ <div id="div0"></div>
+ <div id="div1"></div>
+ <div id="div2"></div>
+ <div id="div3"></div>
+ <div id="div4"></div>
+ <div id="div5"></div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escapes-000-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/escapes-000-ref.xht
new file mode 100644
index 0000000000..f2358a636e
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escapes-000-ref.xht
@@ -0,0 +1,13 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>CSS Reftest Reference</title>
+<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"/>
+</head>
+<body>
+<p>The following three paragraphs should look identical:</p>
+<p>This is a test paragraph.</p>
+<p>This is a test paragraph.</p>
+<p>This is a test paragraph.</p>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escapes-000.xht b/testing/web-platform/tests/css/CSS2/syntax/escapes-000.xht
new file mode 100644
index 0000000000..0937229a54
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escapes-000.xht
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Escaped Newline in String</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters"/>
+ <link rel="match" href="escapes-000-ref.xht"/>
+ <style type="text/css">
+
+ p.one:before { content: "This "; }
+ p.two:before { content: "Th\
+is "; }
+
+ </style>
+ </head>
+ <body>
+
+ <p>The following three paragraphs should look identical:</p>
+
+ <p>This is a test paragraph.</p>
+ <p class="one">is a test paragraph.</p>
+ <p class="two">is a test paragraph.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escapes-001.xht b/testing/web-platform/tests/css/CSS2/syntax/escapes-001.xht
new file mode 100644
index 0000000000..0018bd9361
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escapes-001.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Escaped Quote Marks in String</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters"/>
+ <link rel="match" href="../reference/ref-green-background.xht"/>
+ <style type="text/css">
+
+ p { background: red; color: white; }
+ p { font-family: "\"", '\'', serif; background: green; }
+
+ </style>
+ </head>
+ <body>
+
+ <p>This should have a green background.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escapes-002.xht b/testing/web-platform/tests/css/CSS2/syntax/escapes-002.xht
new file mode 100644
index 0000000000..1ab1f62131
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escapes-002.xht
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Invalid Punctuation Escapes</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters"/>
+ <link rel="match" href="../reference/ref-green-background.xht"/>
+ <style type="text/css">
+
+ p.class#id { background: green; color: white; }
+
+ p\.class#id { background: red; }
+
+ p.class\#id { background: red; }
+
+ p.class#id { background\: red; }
+
+ p.class#id { background: red\; }
+
+ p.class#id \{ background: red; \}
+ p.class#id { background: red; }
+
+ </style>
+ </head>
+ <body>
+
+ <p class="class" id="id">This should have a green background.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escapes-003.xht b/testing/web-platform/tests/css/CSS2/syntax/escapes-003.xht
new file mode 100644
index 0000000000..38f735df74
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escapes-003.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Class and Keyword Letter Escapes</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters"/>
+ <link rel="match" href="../reference/ref-green-background.xht"/>
+ <style type="text/css">
+
+ p.class { background: red; color: white; }
+ p.c\lass { bac\kground: g\reen; }
+
+ </style>
+ </head>
+ <body>
+
+ <p class="class">This should have a green background.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escapes-004.xht b/testing/web-platform/tests/css/CSS2/syntax/escapes-004.xht
new file mode 100644
index 0000000000..080016d11c
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escapes-004.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Unicode Escapes</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters"/>
+ <link rel="match" href="../reference/ref-green-background.xht"/>
+ <style type="text/css">
+
+ p.class { background: red; color: white; }
+ p.c\00006Cas\000073 { back\000067round: gr\000065en; }
+
+ </style>
+ </head>
+ <body>
+
+ <p class="class">This should have a green background.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escapes-005.xht b/testing/web-platform/tests/css/CSS2/syntax/escapes-005.xht
new file mode 100644
index 0000000000..78e5533f58
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escapes-005.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Unicode Escapes and Case Insensitivity</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters"/>
+ <link rel="match" href="../reference/ref-green-background.xht"/>
+ <style type="text/css">
+
+ p.class { background: red; color: white; }
+ p.c\00006Cas\000073 { back\000047round: gr\000045en; }
+
+ </style>
+ </head>
+ <body>
+
+ <p class="class">This should have a green background.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escapes-006.xht b/testing/web-platform/tests/css/CSS2/syntax/escapes-006.xht
new file mode 100644
index 0000000000..ad5173419d
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escapes-006.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Incorrect Letter Escape (Class Selector)</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters"/>
+ <link rel="match" href="../reference/ref-green-background.xht"/>
+ <style type="text/css">
+
+ p.class { background: green; color: white; }
+ p.cl\ass { background: red; }
+
+ </style>
+ </head>
+ <body>
+
+ <p class="class">This should have a green background.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escapes-007.xht b/testing/web-platform/tests/css/CSS2/syntax/escapes-007.xht
new file mode 100644
index 0000000000..62e4129840
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escapes-007.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Space-terminated Unicode Escapes</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters"/>
+ <link rel="match" href="../reference/ref-green-background.xht"/>
+ <style type="text/css">
+
+ p.class { background: red; color: white; }
+ p.c\06C ass { back\67 round: gr\000065 en; }
+
+ </style>
+ </head>
+ <body>
+
+ <p class="class">This should have a green background.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escapes-008.xht b/testing/web-platform/tests/css/CSS2/syntax/escapes-008.xht
new file mode 100644
index 0000000000..92fec1ceef
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escapes-008.xht
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Invalid Space-terminated Character Escapes</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters"/>
+ <link rel="match" href="../reference/ref-green-background.xht"/>
+ <meta name="flags" content="invalid"/>
+ <style type="text/css">
+
+ p.class { background: green; color: white; }
+ p.c\06C ass { back\67round: r\000065 ed; }
+ p.c\06Cass { back\67
+ round: r\000065ed; }
+ p.c\06Cass { back\67round: r\000065
+ed; }
+
+ </style>
+ </head>
+ <body>
+
+ <p class="class">This should have a green background.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escapes-009.xht b/testing/web-platform/tests/css/CSS2/syntax/escapes-009.xht
new file mode 100644
index 0000000000..11ad3c14a9
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escapes-009.xht
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Characters and case: Escaping a character inside a keyword</title>
+ <link rel="author" title="Gabriele Romanato" href="mailto:gabriele.romanato@gmail.com" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters" />
+ <link rel="match" href="../reference/ref-this-text-should-be-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Browsers should be able to ignore the keyword"/>
+<style type="text/css">
+p {color: green}
+p {color: r\ed}
+</style>
+ </head>
+ <body>
+<p>This text should be green.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escapes-010.xht b/testing/web-platform/tests/css/CSS2/syntax/escapes-010.xht
new file mode 100644
index 0000000000..564ff1bb77
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escapes-010.xht
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Unicode-escaped Braces</title>
+ <link rel="author" title="Gabriele Romanato" href="mailto:gabriele.romanato@gmail.com" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters" />
+ <link rel="match" href="../reference/ref-this-text-should-be-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Unicode escapes cannot substitute for '{' or '}' in CSS syntax."/>
+<style type="text/css">
+
+p { color: green }
+
+p \7B color: red \7D
+</style>
+ </head>
+ <body>
+<p>This text should be green.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escapes-011.xht b/testing/web-platform/tests/css/CSS2/syntax/escapes-011.xht
new file mode 100644
index 0000000000..850f5ae13e
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escapes-011.xht
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: CSS Parsing: Escaped keywords</title>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/quotes/001.xml" type="application/xhtml+xml"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#rule-sets" />
+ <link rel="match" href="../reference/ref-this-text-should-be-green.xht"/>
+ <style type="text/css">
+ p { color: green; color: \r\e\d; } /* '\r\e\d' is 'r^N^M', which isn't valid */
+ </style>
+ </head>
+ <body>
+ <p>This text should be green.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escapes-012.xht b/testing/web-platform/tests/css/CSS2/syntax/escapes-012.xht
new file mode 100644
index 0000000000..5ff2542b3f
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escapes-012.xht
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: CSS Parsing: Escaped keywords</title>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/quotes/002.xml" type="application/xhtml+xml"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters" />
+ <link rel="match" href="../reference/ref-this-text-should-be-green.xht"/>
+ <style type="text/css">
+ p { color: red; color: \g\r\45\65\n; } /* 'grEen' */
+ </style>
+ </head>
+ <body>
+ <p>This text should be green.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escapes-013-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/escapes-013-ref.xht
new file mode 100644
index 0000000000..9b5b290f62
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escapes-013-ref.xht
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>CSS Reftest Reference</title>
+<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"/>
+<style type="text/css">
+.green {
+ color: white;
+ background: green;
+}
+</style>
+</head>
+<body>
+<p>This line should be unstyled.</p>
+<p class="green">This should have a green background.</p>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escapes-013.xht b/testing/web-platform/tests/css/CSS2/syntax/escapes-013.xht
new file mode 100644
index 0000000000..abfd3275b4
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escapes-013.xht
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
+ <head>
+ <title>CSS Test: Escaping and spaces with classes</title>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/parsing/escaping/003.html" type="text/html"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#rule-sets" />
+ <link rel="match" href="escapes-013-ref.xht"/>
+ <style type="text/css">
+ .css\0031 p { color: yellow; background: red; }
+ .css\0032 p { color: white; background: green; }
+ </style>
+ </head>
+ <body>
+ <div class="css1"><p>This line should be unstyled.</p></div>
+ <p class="css2p">This should have a green background.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escapes-014.xht b/testing/web-platform/tests/css/CSS2/syntax/escapes-014.xht
new file mode 100644
index 0000000000..4b1cc49adc
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escapes-014.xht
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
+ <head>
+ <title>CSS Test: Escaping and spaces with declarations</title>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/parsing/escaping/004.html" type="text/html"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#rule-sets" />
+ <link rel="match" href="../reference/ref-green-background.xht"/>
+ <style type="text/css">
+ .test { color: white; background: green; }
+ .test { color:\0020yellow; background:\0020red; }
+ </style>
+ </head>
+ <body>
+ <p class="test">This should have a green background.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escapes-015.xht b/testing/web-platform/tests/css/CSS2/syntax/escapes-015.xht
new file mode 100644
index 0000000000..be2ff6b242
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escapes-015.xht
@@ -0,0 +1,151 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+ <title>CSS Test: Escape of non-printable characters within declarations, applying to property values</title>
+
+ <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#rule-sets" title="4.1.7 Rule sets, declaration blocks, and selectors" />
+ <link rel="match" href="../reference/ref-if-there-is-no-red.xht" />
+
+ <meta content="invalid" name="flags" />
+ <meta content="red is a reserved (color name) keyword while red\9 is not a reserved keyword. red\9 is made of red with an escaped horizontal tab. That is why the parsing of the declaration should fail. Same thing with the other 23 tests (see test escapes-016)." name="assert" />
+
+ <!--
+ This test is a much more elaborated version of the test
+ http://test.csswg.org/suites/css2.1/nightly-unstable/html4/escapes-002.htm
+ and
+ http://test.csswg.org/suites/css2.1/nightly-unstable/html4/escapes-014.htm
+ -->
+
+ <style type="text/css"><![CDATA[
+ div
+ {
+ color: white;
+ font-size: 1.25em;
+ line-height: 1.2;
+ }
+
+ /*
+ U+0009 is an horizontal tab
+ U+000A is a line feed
+ U+000B is a vertical tab
+ U+000C is a form feed
+ U+000D is a carriage return
+ U+0020 is a blank white space
+ */
+
+ div#first
+ {
+ color: red \9;
+ }
+
+ div#second
+ {
+ color: red\9;
+ }
+
+ div#third
+ {
+ color: red \A;
+ }
+
+ div#fourth
+ {
+ color: red\A;
+ }
+
+ div#fifth
+ {
+ color: red \B;
+ }
+
+ div#sixth
+ {
+ color: red\B;
+ }
+
+ /*
+ U+0009 is an horizontal tab
+ U+000A is a line feed
+ U+000B is a vertical tab
+ U+000C is a form feed
+ U+000D is a carriage return
+ U+0020 is a blank white space
+ */
+
+ div#seventh
+ {
+ color: red \C;
+ }
+
+ div#eighth
+ {
+ color: red\C;
+ }
+
+ div#ninth
+ {
+ color: red \D;
+ }
+
+ div#tenth
+ {
+ color: red\D;
+ }
+
+ div#eleventh
+ {
+ color: red \20;
+ }
+
+ div#twelfth
+ {
+ color: red\20;
+ }
+
+ /*
+ U+0009 is an horizontal tab
+ U+000A is a line feed
+ U+000B is a vertical tab
+ U+000C is a form feed
+ U+000D is a carriage return
+ U+0020 is a blank white space
+ */
+
+ ]]></style>
+
+ </head>
+
+ <body>
+
+ <p>Test passes if there is <strong>no red</strong>.</p>
+
+ <div id="first">1st test FAILED</div>
+
+ <div id="second">2nd test FAILED</div>
+
+ <div id="third">3rd test FAILED</div>
+
+ <div id="fourth">4th test FAILED</div>
+
+ <div id="fifth">5th test FAILED</div>
+
+ <div id="sixth">6th test FAILED</div>
+
+ <div id="seventh">7th test FAILED</div>
+
+ <div id="eighth">8th test FAILED</div>
+
+ <div id="ninth">9th test FAILED</div>
+
+ <div id="tenth">10th test FAILED</div>
+
+ <div id="eleventh">11th test FAILED</div>
+
+ <div id="twelfth">12th test FAILED</div>
+
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/escapes-016.xht b/testing/web-platform/tests/css/CSS2/syntax/escapes-016.xht
new file mode 100644
index 0000000000..128c74a1d1
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/escapes-016.xht
@@ -0,0 +1,151 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+ <title>CSS Test: Escape of non-printable characters within declarations, applying to property values</title>
+
+ <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#rule-sets" title="4.1.7 Rule sets, declaration blocks, and selectors" />
+ <link rel="match" href="../reference/ref-if-there-is-no-red.xht" />
+
+ <meta content="invalid" name="flags" />
+ <meta content="red is a reserved (color name) keyword while red\9 is not a reserved keyword. red\9 is made of red with an escaped horizontal tab. That is why the parsing of the declaration should fail. Same thing with the other 23 tests (see test escapes-015)." name="assert" />
+
+ <!--
+ This test is a much more elaborated version of the test
+ http://test.csswg.org/suites/css2.1/nightly-unstable/html4/escapes-002.htm
+ and
+ http://test.csswg.org/suites/css2.1/nightly-unstable/html4/escapes-014.htm
+ -->
+
+ <style type="text/css"><![CDATA[
+ div
+ {
+ color: white;
+ font-size: 1.25em;
+ line-height: 1.2;
+ }
+
+ /*
+ U+0009 is an horizontal tab
+ U+000A is a line feed
+ U+000B is a vertical tab
+ U+000C is a form feed
+ U+000D is a carriage return
+ U+0020 is a blank white space
+ */
+
+ div#thirteenth
+ {
+ color: \9 red;
+ }
+
+ div#fourteenth
+ {
+ color: \9red;
+ }
+
+ div#fifteenth
+ {
+ color: \A red;
+ }
+
+ div#sixteenth
+ {
+ color: \Ared;
+ }
+
+ div#seventeenth
+ {
+ color: \B red;
+ }
+
+ div#eighteenth
+ {
+ color: \Bred;
+ }
+
+ /*
+ U+0009 is an horizontal tab
+ U+000A is a line feed
+ U+000B is a vertical tab
+ U+000C is a form feed
+ U+000D is a carriage return
+ U+0020 is a blank white space
+ */
+
+ div#nineteenth
+ {
+ color: \C red;
+ }
+
+ div#twentieth
+ {
+ color: \Cred;
+ }
+
+ div#twenty-first
+ {
+ color: \D red;
+ }
+
+ div#twenty-second
+ {
+ color: \Dred;
+ }
+
+ div#twenty-third
+ {
+ color: \20 red;
+ }
+
+ div#twenty-fourth
+ {
+ color: \20red;
+ }
+
+ /*
+ U+0009 is an horizontal tab
+ U+000A is a line feed
+ U+000B is a vertical tab
+ U+000C is a form feed
+ U+000D is a carriage return
+ U+0020 is a blank white space
+ */
+
+ ]]></style>
+
+ </head>
+
+ <body>
+
+ <p>Test passes if there is <strong>no red</strong>.</p>
+
+ <div id="thirteenth">13th test FAILED</div>
+
+ <div id="fourteenth">14th test FAILED</div>
+
+ <div id="fifteenth">15th test FAILED</div>
+
+ <div id="sixteenth">16th test FAILED</div>
+
+ <div id="seventeenth">17th test FAILED</div>
+
+ <div id="eighteenth">18th test FAILED</div>
+
+ <div id="nineteenth">19th test FAILED</div>
+
+ <div id="twentieth">20th test FAILED</div>
+
+ <div id="twenty-first">21st test FAILED</div>
+
+ <div id="twenty-second">22nd test FAILED</div>
+
+ <div id="twenty-third">23rd test FAILED</div>
+
+ <div id="twenty-fourth">24th test FAILED</div>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/ident-000-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/ident-000-ref.xht
new file mode 100644
index 0000000000..56f90ae64b
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/ident-000-ref.xht
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>CSS Reftest Reference</title>
+<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"/>
+<style type="text/css">
+p {
+ color: green;
+}
+</style>
+</head>
+<body>
+<p>This should be green.</p>
+<p>This should be green.</p>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/ident-000.xht b/testing/web-platform/tests/css/CSS2/syntax/ident-000.xht
new file mode 100644
index 0000000000..0cb3051a14
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/ident-000.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Valid Identifiers (a-z) as Classes and IDs</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters"/>
+ <link rel="match" href="ident-000-ref.xht"/>
+ <style type="text/css">
+
+ .one { color: red; background: white; }
+ .ident, .one { color: green; }
+
+ .two { color: red; background: white; }
+ #ident, .two { color: green; }
+
+ </style>
+ </head>
+ <body>
+
+ <p class="one">This should be green.</p>
+ <p class="two">This should be green.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/ident-001.xht b/testing/web-platform/tests/css/CSS2/syntax/ident-001.xht
new file mode 100644
index 0000000000..ec79def258
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/ident-001.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Valid Identifiers (-_a-zA-Z0-9) as Classes and IDs</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters"/>
+ <link rel="match" href="ident-000-ref.xht"/>
+ <style type="text/css">
+
+ .one { color: red; background: white; }
+ .IdE6n-3t0_6, .one { color: green; }
+
+ .two { color: red; background: white; }
+ #IdE6n-3t0_6, .two { color: green; }
+
+ </style>
+ </head>
+ <body>
+
+ <p class="one">This should be green.</p>
+ <p class="two">This should be green.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/ident-002.xht b/testing/web-platform/tests/css/CSS2/syntax/ident-002.xht
new file mode 100644
index 0000000000..8de86433e7
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/ident-002.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Valid Identifiers (starting with _) as Classes and IDs</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters"/>
+ <link rel="match" href="ident-000-ref.xht"/>
+ <style type="text/css">
+
+ .one { color: red; background: white; }
+ ._ident, .one { color: green; }
+
+ .two { color: red; background: white; }
+ #_ident, .two { color: green; }
+
+ </style>
+ </head>
+ <body>
+
+ <p class="one">This should be green.</p>
+ <p class="two">This should be green.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/ident-003-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/ident-003-ref.xht
new file mode 100644
index 0000000000..1588dc1975
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/ident-003-ref.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>CSS Reftest Reference</title>
+<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"/>
+<style type="text/css">
+p {
+ color: green;
+}
+</style>
+</head>
+<body>
+<p>This should be green.</p>
+<p>This should be green.</p>
+<p>This should be green.</p>
+<p>This should be green.</p>
+<p>This should be green.</p>
+<p>This should be green.</p>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/ident-003.xht b/testing/web-platform/tests/css/CSS2/syntax/ident-003.xht
new file mode 100644
index 0000000000..e09d970069
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/ident-003.xht
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Valid Identifiers (starting with -) as Classes and IDs</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="author" title="Ray Kiddy" href="mailto:ray@ganymede.org"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters"/>
+ <link rel="match" href="ident-003-ref.xht"/>
+ <meta name="flags" content="invalid"/>
+ <style type="text/css">
+
+ .one { color: red; background: white; }
+ .-ident, .one { color: green; }
+
+ .two { color: red; background: white; }
+ #-ident, .two { color: green; }
+
+ .three { color: green; background: white; }
+ .-1ident, .three { color: red; }
+
+ .four { color: green; background: white; }
+ #-1ident, .four { color: red; }
+
+ .five { color: red; background: white; }
+ .-\31ident, .five { color: green; }
+
+ .six { color: red; background: white; }
+ #-\31ident, .six { color: green; }
+
+ </style>
+ </head>
+ <body>
+
+ <p class="one">This should be green.</p>
+ <p class="two">This should be green.</p>
+ <p class="three">This should be green.</p>
+ <p class="four">This should be green.</p>
+ <p class="five">This should be green.</p>
+ <p class="six">This should be green.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/ident-004.xht b/testing/web-platform/tests/css/CSS2/syntax/ident-004.xht
new file mode 100644
index 0000000000..ff079e5ffb
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/ident-004.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Valid Identifiers (starting with ideographic) as Classes and IDs</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters"/>
+ <link rel="match" href="ident-000-ref.xht"/>
+ <style type="text/css">
+
+ .one { color: red; background: white; }
+ .怀ident, .one { color: green; }
+
+ .two { color: red; background: white; }
+ #怀ident, .two { color: green; }
+
+ </style>
+ </head>
+ <body>
+
+ <p class="one">This should be green.</p>
+ <p class="two">This should be green.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/ident-005.xht b/testing/web-platform/tests/css/CSS2/syntax/ident-005.xht
new file mode 100644
index 0000000000..346e3e3662
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/ident-005.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Valid Identifiers (including ideographic) as Classes and IDs</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters"/>
+ <link rel="match" href="ident-000-ref.xht"/>
+ <style type="text/css">
+
+ .one { color: red; background: white; }
+ .iden怀t怀, .one { color: green; }
+
+ .two { color: red; background: white; }
+ #iden怀t怀, .two { color: green; }
+
+ </style>
+ </head>
+ <body>
+
+ <p class="one">This should be green.</p>
+ <p class="two">This should be green.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/ident-006.xht b/testing/web-platform/tests/css/CSS2/syntax/ident-006.xht
new file mode 100644
index 0000000000..a4fcf1884a
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/ident-006.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Valid Identifiers (starting with escape) as Classes and IDs</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters"/>
+ <link rel="match" href="ident-000-ref.xht"/>
+ <style type="text/css">
+
+ .one { color: red; background: white; }
+ .\6000ident, .one { color: green; }
+
+ .two { color: red; background: white; }
+ #\6000ident, .two { color: green; }
+
+ </style>
+ </head>
+ <body>
+
+ <p class="one">This should be green.</p>
+ <p class="two">This should be green.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/ident-007.xht b/testing/web-platform/tests/css/CSS2/syntax/ident-007.xht
new file mode 100644
index 0000000000..c91e35e698
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/ident-007.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Valid Identifiers (including escape) as Classes and IDs</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters"/>
+ <link rel="match" href="ident-000-ref.xht"/>
+ <style type="text/css">
+
+ .one { color: red; background: white; }
+ .iden\6000t\6000, .one { color: green; }
+
+ .two { color: red; background: white; }
+ #iden\6000t\6000, .two { color: green; }
+
+ </style>
+ </head>
+ <body>
+
+ <p class="one">This should be green.</p>
+ <p class="two">This should be green.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/ident-008.xht b/testing/web-platform/tests/css/CSS2/syntax/ident-008.xht
new file mode 100644
index 0000000000..7e80153fff
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/ident-008.xht
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Invalid Identifiers (starting with digit) as Classes and IDs</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters"/>
+ <link rel="match" href="ident-000-ref.xht"/>
+ <meta name="flags" content="invalid"/>
+ <style type="text/css">
+
+ .one { color: green; background: white; }
+ .6ident, .one { color: red; }
+
+ .two { color: green; background: white; }
+ #6ident, .two { color: red; }
+
+ </style>
+ </head>
+ <body>
+
+ <p class="one">This should be green.</p>
+ <p class="two">This should be green.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/ident-009.xht b/testing/web-platform/tests/css/CSS2/syntax/ident-009.xht
new file mode 100644
index 0000000000..1dceb48e2f
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/ident-009.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Valid Identifiers (including digits) as Classes and IDs</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters"/>
+ <link rel="match" href="ident-000-ref.xht"/>
+ <style type="text/css">
+
+ .one { color: red; background: white; }
+ .id4ent6, .one { color: green; }
+
+ .two { color: red; background: white; }
+ #id4ent6, .two { color: green; }
+
+ </style>
+ </head>
+ <body>
+
+ <p class="one">This should be green.</p>
+ <p class="two">This should be green.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/ident-010.xht b/testing/web-platform/tests/css/CSS2/syntax/ident-010.xht
new file mode 100644
index 0000000000..00130844f6
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/ident-010.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Valid Identifiers (starting with escape) as Classes and IDs</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters"/>
+ <link rel="match" href="ident-000-ref.xht"/>
+ <style type="text/css">
+
+ .one { color: red; background: white; }
+ .\ident, .one { color: green; }
+
+ .two { color: red; background: white; }
+ #\ident, .two { color: green; }
+
+ </style>
+ </head>
+ <body>
+
+ <p class="one">This should be green.</p>
+ <p class="two">This should be green.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/ident-011.xht b/testing/web-platform/tests/css/CSS2/syntax/ident-011.xht
new file mode 100644
index 0000000000..228b873b0d
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/ident-011.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Valid Identifiers (including escapes) as Classes and IDs</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters"/>
+ <link rel="match" href="ident-000-ref.xht"/>
+ <style type="text/css">
+
+ .one { color: red; background: white; }
+ .ide\n\t, .one { color: green; }
+
+ .two { color: red; background: white; }
+ #ide\n\t, .two { color: green; }
+
+ </style>
+ </head>
+ <body>
+
+ <p class="one">This should be green.</p>
+ <p class="two">This should be green.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/ident-012-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/ident-012-ref.xht
new file mode 100644
index 0000000000..0e0ff2e2e8
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/ident-012-ref.xht
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>CSS Reftest Reference</title>
+<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"/>
+<style type="text/css">
+p {
+ color: green;
+}
+</style>
+</head>
+<body>
+<p>This should be green.</p>
+<p>This should be green.</p>
+<p>This should be green.</p>
+<p>This should be green.</p>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/ident-012.xht b/testing/web-platform/tests/css/CSS2/syntax/ident-012.xht
new file mode 100644
index 0000000000..8dc09bc154
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/ident-012.xht
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Valid Identifiers (starting with escaped digits, control codes) as Classes and IDs</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters"/>
+ <link rel="match" href="ident-012-ref.xht"/>
+ <style type="text/css">
+
+ .one { color: red; background: white; }
+ .\6ident, .one { color: green; }
+
+ .two { color: red; background: white; }
+ #\6ident, .two { color: green; }
+
+ .three { color: red; background: white; }
+ .\36ident, .three { color: green; }
+
+ .four { color: red; background: white; }
+ #\36ident, .four { color: green; }
+
+ </style>
+ </head>
+ <body>
+
+ <p class="one">This should be green.</p>
+ <p class="two">This should be green.</p>
+ <p class="three">This should be green.</p>
+ <p class="four">This should be green.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/ident-013.xht b/testing/web-platform/tests/css/CSS2/syntax/ident-013.xht
new file mode 100644
index 0000000000..2dc65a35d7
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/ident-013.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Valid Identifiers (starting with escaped -) as Classes and IDs</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters"/>
+ <link rel="match" href="ident-000-ref.xht"/>
+ <style type="text/css">
+
+ .one { color: red; background: white; }
+ .\-ident, .one { color: green; }
+
+ .two { color: red; background: white; }
+ #\-ident, .two { color: green; }
+
+ </style>
+ </head>
+ <body>
+
+ <p class="one">This should be green.</p>
+ <p class="two">This should be green.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/ident-014.xht b/testing/web-platform/tests/css/CSS2/syntax/ident-014.xht
new file mode 100644
index 0000000000..44a53c7f7f
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/ident-014.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Selector attributes and hyphens</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="Attribute selectors can begin with hyphens." />
+ <style type="text/css">
+ [-hyphen="true"], div
+ {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/ident-015.xht b/testing/web-platform/tests/css/CSS2/syntax/ident-015.xht
new file mode 100644
index 0000000000..65349fc0dd
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/ident-015.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Attribute selectors and underscores</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="Attribute selectors can begin with underscores." />
+ <style type="text/css">
+ [_underscore="true"], div
+ {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/ident-016.xht b/testing/web-platform/tests/css/CSS2/syntax/ident-016.xht
new file mode 100644
index 0000000000..cedc7fb659
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/ident-016.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Attribute selectors with hyphens and underscores</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="Attribute selectors are valid if they begin with hyphens and then underscores." />
+ <style type="text/css">
+ [-_hyphenunderscore="true"], div
+ {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/ident-017.xht b/testing/web-platform/tests/css/CSS2/syntax/ident-017.xht
new file mode 100644
index 0000000000..355fb4a423
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/ident-017.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Attribute selection with digits</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html" />
+ <link rel="match" href="../reference/no-red-filler-text-ref.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Attribute selectors cannot begin with digits." />
+ <style type="text/css">
+ [1digit="true"], div
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if there is no red visible on the page.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/ident-018.xht b/testing/web-platform/tests/css/CSS2/syntax/ident-018.xht
new file mode 100644
index 0000000000..c4457cde39
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/ident-018.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Attribute selectors starting with hyphens and digits</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html" />
+ <link rel="match" href="../reference/no-red-filler-text-ref.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Attribute selectors cannot begin with hyphens then digits." />
+ <style type="text/css">
+ [-1hyphendigit="true"], div
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if there is no red visible on the page.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/ident-019.xht b/testing/web-platform/tests/css/CSS2/syntax/ident-019.xht
new file mode 100644
index 0000000000..ce0d5d473c
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/ident-019.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Attribute selectors starting with underscore and digits</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="Attribute selectors can begin with underscore then digits." />
+ <style type="text/css">
+ [_1underscoredigit="true"], div
+ {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/ignored-rules-001.xht b/testing/web-platform/tests/css/CSS2/syntax/ignored-rules-001.xht
new file mode 100644
index 0000000000..2317baa5bb
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/ignored-rules-001.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing invalid rules that precede good rules</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#declaration" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Bad rules are ignored while following good rules are applied." />
+ <style type="text/css">
+ div
+ {
+ badrule: value;
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/ignored-rules-002.xht b/testing/web-platform/tests/css/CSS2/syntax/ignored-rules-002.xht
new file mode 100644
index 0000000000..c7b1dcbb8c
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/ignored-rules-002.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing invalid rules that follow good rules</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#declaration" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Good rules are applied while following bad rules are ignored." />
+ <style type="text/css">
+ div
+ {
+ color: green;
+ badrule: value;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/ignored-rules-003.xht b/testing/web-platform/tests/css/CSS2/syntax/ignored-rules-003.xht
new file mode 100644
index 0000000000..5d0cf7d0bc
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/ignored-rules-003.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing invalid values</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#declaration" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Invalid values are ignored while valid properties are applied." />
+ <style type="text/css">
+ div
+ {
+ color: green;
+ color: rainbow;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/ignored-rules-004.xht b/testing/web-platform/tests/css/CSS2/syntax/ignored-rules-004.xht
new file mode 100644
index 0000000000..3987b7fbd9
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/ignored-rules-004.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing invalid values with spaces</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#declaration" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Invalid values with spaces are ignored while valid properties are applied." />
+ <style type="text/css">
+ div
+ {
+ color: green;
+ color: red and white;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/ignored-rules-005.xht b/testing/web-platform/tests/css/CSS2/syntax/ignored-rules-005.xht
new file mode 100644
index 0000000000..d740829c80
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/ignored-rules-005.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing invalid values that start with a valid value name</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#declaration" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Invalid values that begin with a valid keyword are ignored while valid properties are applied." />
+ <style type="text/css">
+ div
+ {
+ color: green;
+ color: redish;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/ignored-rules-006.xht b/testing/web-platform/tests/css/CSS2/syntax/ignored-rules-006.xht
new file mode 100644
index 0000000000..54ab39efa4
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/ignored-rules-006.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing invalid values with slashes</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#declaration" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Invalid values with slashes are ignored while valid properties are applied." />
+ <style type="text/css">
+ div
+ {
+ color: green;
+ color: /red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/ignored-rules-007.xht b/testing/web-platform/tests/css/CSS2/syntax/ignored-rules-007.xht
new file mode 100644
index 0000000000..c816e8ea5b
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/ignored-rules-007.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing invalid values that are functions</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#declaration" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Invalid values that are functions are ignored while valid properties are applied." />
+ <style type="text/css">
+ div
+ {
+ color: green;
+ color: expression('red');
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/import-000.xht b/testing/web-platform/tests/css/CSS2/syntax/import-000.xht
new file mode 100644
index 0000000000..1ede841af4
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/import-000.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: At-rules</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#at-rules"/>
+ <link rel="match" href="../reference/ref-this-text-should-be-green.xht"/>
+
+ <meta name="flags" content="invalid" />
+ <style type="text/css">
+
+ p { color: green; }
+ @import "support/import-red.css";
+
+ </style>
+ </head>
+ <body>
+
+ <p class="import">This text should be green.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/import-001.xht b/testing/web-platform/tests/css/CSS2/syntax/import-001.xht
new file mode 100644
index 0000000000..95f1319748
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/import-001.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: At-rules</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#at-rules"/>
+ <link rel="match" href="../reference/ref-this-text-should-be-green.xht"/>
+
+ <meta name="flags" content="invalid" />
+ <style type="text/css">
+
+ @media all {
+ @import "support/import-red.css";
+ p { color: green; }
+ }
+
+ </style>
+ </head>
+ <body>
+
+ <p class="import">This text should be green.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/invalid-at-rule-001.xht b/testing/web-platform/tests/css/CSS2/syntax/invalid-at-rule-001.xht
new file mode 100644
index 0000000000..6062e3dda4
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/invalid-at-rule-001.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parser error handling with invalid at-rules: @ invalid selector invalidates entire block</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="../reference/no-red-filler-text-ref.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="The entire block of an invalid at-rule is ignored." />
+ <style type="text/css">
+ @badAtRule screen
+ {
+ div
+ {
+ color: red;
+ }
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if there is no red visible on the page.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/invalid-decl-at-rule-001.xht b/testing/web-platform/tests/css/CSS2/syntax/invalid-decl-at-rule-001.xht
new file mode 100644
index 0000000000..a1aa604240
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/invalid-decl-at-rule-001.xht
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing invalid declarations in at-rules where valid declaration precedes an invalid rule</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Invalid declarations at the end of at-rules are ignored while the remaining preceding valid declarations are applied." />
+ <style type="text/css">
+ /*<![CDATA[*/
+ @media screen
+ {
+ div
+ {
+ color: green;
+ }
+ div&p
+ {
+ red: isbad;
+ }
+ }
+ /*]]>*/
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/invalid-decl-at-rule-002.xht b/testing/web-platform/tests/css/CSS2/syntax/invalid-decl-at-rule-002.xht
new file mode 100644
index 0000000000..80f8c18b09
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/invalid-decl-at-rule-002.xht
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing invalid declarations in at-rules where valid declaration follows invalid rule</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Invalid declarations at the beginning of at-rules are ignored while the remaining following valid declarations are applied." />
+ <style type="text/css">
+ /*<![CDATA[*/
+ @media screen
+ {
+ div&p
+ {
+ red: isbad;
+ }
+ div
+ {
+ color: green;
+ }
+ }
+ /*]]>*/
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/keywords-000.xht b/testing/web-platform/tests/css/CSS2/syntax/keywords-000.xht
new file mode 100644
index 0000000000..3ffa554f60
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/keywords-000.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Keywords v. Strings (background)</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#keywords"/>
+ <link rel="match" href="../reference/ref-green-background.xht"/>
+ <style type="text/css">
+
+ p { background: green; }
+ p { background: "red"; }
+ p { color: white; }
+
+ </style>
+ </head>
+ <body>
+
+ <p>This should have a green background.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/keywords-001-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/keywords-001-ref.xht
new file mode 100644
index 0000000000..db3b4bd92c
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/keywords-001-ref.xht
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>CSS Reftest Reference</title>
+<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"/>
+<style type="text/css">
+p.test {
+ width: 10em;
+ border: medium solid;
+}
+</style>
+</head>
+<body>
+<p>The next two paragraphs should look identical:</p>
+<p class="test">Test.</p>
+<p class="test">Test.</p>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/keywords-001.xht b/testing/web-platform/tests/css/CSS2/syntax/keywords-001.xht
new file mode 100644
index 0000000000..07b0807636
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/keywords-001.xht
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Keywords v. Strings (width)</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#keywords"/>
+ <link rel="match" href="keywords-001-ref.xht"/>
+ <style type="text/css">
+
+ p.one, p.two { width: 10em; border: medium solid; }
+ p.two { width: "auto"; }
+
+ </style>
+ </head>
+ <body>
+
+ <p>The next two paragraphs should look identical:</p>
+
+ <p class="one">Test.</p>
+ <p class="two">Test.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/malformed-decl-001.xht b/testing/web-platform/tests/css/CSS2/syntax/malformed-decl-001.xht
new file mode 100644
index 0000000000..0362f172f5
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/malformed-decl-001.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing malformed rules: Property with no value and no ending semicolon</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Malformed rules (property with no value and no ending semicolon) are ignored while valid rules are applied." />
+ <style type="text/css">
+ div
+ {
+ color: green;
+ color
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/malformed-decl-002.xht b/testing/web-platform/tests/css/CSS2/syntax/malformed-decl-002.xht
new file mode 100644
index 0000000000..417c7d61a3
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/malformed-decl-002.xht
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing malformed rules: Property with no value assigned</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Malformed rules (property with no value) are ignored while valid ones are applied." />
+ <style type="text/css">
+ div
+ {
+ color: red;
+ color;
+ color: green
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/malformed-decl-003.xht b/testing/web-platform/tests/css/CSS2/syntax/malformed-decl-003.xht
new file mode 100644
index 0000000000..f35192c5be
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/malformed-decl-003.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing malformed rules: No value and no semi-colon</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Malformed rules with no value or semi-colon are ignored while valid rules are applied." />
+ <style type="text/css">
+ div
+ {
+ color: green;
+ color:
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/malformed-decl-004.xht b/testing/web-platform/tests/css/CSS2/syntax/malformed-decl-004.xht
new file mode 100644
index 0000000000..f803ed5baf
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/malformed-decl-004.xht
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing malformed rules: No value with property</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Malformed rules with no value are ignored while valid rules are applied." />
+ <style type="text/css">
+ div
+ {
+ color: red;
+ color: ;
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/malformed-decl-005.xht b/testing/web-platform/tests/css/CSS2/syntax/malformed-decl-005.xht
new file mode 100644
index 0000000000..01591b61ce
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/malformed-decl-005.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing malformed rules: Semi-colon before property</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Malformed rules with semi-colon before property are ignored while valid rules are applied." />
+ <style type="text/css">
+ div
+ {
+ color: green;
+ color{;color: red;}
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/malformed-decl-006.xht b/testing/web-platform/tests/css/CSS2/syntax/malformed-decl-006.xht
new file mode 100644
index 0000000000..79adb28e01
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/malformed-decl-006.xht
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing malformed rules: Valid rule after malformed rule</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Malformed rules are ignored while valid rules are applied." />
+ <style type="text/css">
+ div
+ {
+ color: red;
+ color{;color: red};
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/malformed-decl-007.xht b/testing/web-platform/tests/css/CSS2/syntax/malformed-decl-007.xht
new file mode 100644
index 0000000000..c79416d978
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/malformed-decl-007.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing malformed rules: Double colon separating property and value</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Malformed rules with double colons between property and value are ignored while valid rules are applied." />
+ <style type="text/css">
+ div
+ {
+ color:green;
+ color::red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/malformed-decl-008.xht b/testing/web-platform/tests/css/CSS2/syntax/malformed-decl-008.xht
new file mode 100644
index 0000000000..b68ab7f046
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/malformed-decl-008.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing malformed rules: Missing property</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Malformed rules with missing property names are ignored while valid rules are applied." />
+ <style type="text/css">
+ div
+ {
+ :red;
+ color:green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/malformed-decl-block-001-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/malformed-decl-block-001-ref.xht
new file mode 100644
index 0000000000..15d069c411
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/malformed-decl-block-001-ref.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Reference File</title>
+ <link rel="author" title="Bert Bos" href="mailto:bert@w3.org" />
+
+ <style type="text/css">
+ body {background: white; color: green}
+ </style>
+ </head>
+
+ <body>
+ <p id="p1">This text must be green.</p>
+ <p id="p2">This text must be green.</p>
+ <p id="p3">This text must be green.</p>
+ <p id="p4">This text must be green.</p>
+ <p id="p5">This text must be green.</p>
+ <p id="p6">This text must be green.</p>
+ <p id="p7">This text must be green.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/malformed-decl-block-001.xht b/testing/web-platform/tests/css/CSS2/syntax/malformed-decl-block-001.xht
new file mode 100644
index 0000000000..8e389615ce
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/malformed-decl-block-001.xht
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing malformed declaration blocks</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS22/syndata.html#parsing-errors" />
+ <link rel="help" href="http://www.w3.org/TR/CSS22/changes.html#s.4.1.1e" />
+ <link rel="match" href="malformed-decl-block-001-ref.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="When the UA expects the start of a declaration or at-rule (i.e., an IDENT token or an ATKEYWORD token) but finds an unexpected token instead, that token is considered to be the first token of a malformed declaration. I.e., the rule for malformed declarations, rather than malformed statements is used to determine which tokens to ignore in that case." />
+ <link rel="author" title="Bert Bos" href="mailto:bert@w3.org" />
+
+ <style type="text/css">
+ body {background: white; color: red}
+ #p1 {color: green}
+ #p2 {@charset utf-8; color: green}
+ #p3 {@foo {color: red} color: green}
+ #p4 {12; color: green}
+ #p5 {color: green; 12 color: red}
+ #p6 {color: orange; 12 @page {color: red} color: green}
+ #p7 {@foo {color: red}; color: green}
+ </style>
+ </head>
+
+ <body>
+ <p id="p1">This text must be green.</p>
+ <p id="p2">This text must be green.</p>
+ <p id="p3">This text must be green.</p>
+ <p id="p4">This text must be green.</p>
+ <p id="p5">This text must be green.</p>
+ <p id="p6">This text must be green.</p>
+ <p id="p7">This text must be green.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/matching-brackets-001-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/matching-brackets-001-ref.xht
new file mode 100644
index 0000000000..13de25fa14
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/matching-brackets-001-ref.xht
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>CSS Reftest Reference</title>
+<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"/>
+<style type="text/css">
+p {
+ color: green;
+}
+</style>
+</head>
+<body>
+<p>This sentence must be green.</p>
+<p>This sentence must be green.</p>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/matching-brackets-001.xht b/testing/web-platform/tests/css/CSS2/syntax/matching-brackets-001.xht
new file mode 100644
index 0000000000..e1520ddd6f
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/matching-brackets-001.xht
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Matching brackets and quotes for @rules</title>
+ <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/media.html#at-media-rule"/>
+ <link rel="match" href="matching-brackets-001-ref.xht"/>
+ <meta name="flags" content="invalid"/>
+ <meta name="assert" content="User agents must handle unexpected tokens
+ encountered while parsing an at-rule by reading until the end of the
+ statement, while observing the rules for matching pairs of brackets
+ and quotes, and correctly handling escapes. "/>
+ <style type="text/css"><![CDATA[
+ p {
+ color: red;
+ background: red;
+ }
+ #semicolon { background: transparent; }
+ @foo ] } ) test-token \
+ ~ ` ! @ # $ % ^ & * - _ + = | : > < ? / , .
+ [\]\5D ']' "]"; # { background: red; } ]
+ (\)\29 ')' ")"; #semicolon { background: red; } } } } )
+ '; #semicolon { background: red; } } } }',
+ "; #semicolon { background: red; }' } } }"
+ ;
+ #semicolon { color: green; }
+ #block { background: transparent; }
+ @foo ] } ) test-token \
+ ~ ` ! @ # $ % ^ & * - _ + = | : > < ? / , .
+ [\]\5D ']' "]"; #block { background: red; } ]
+ (\)\29 ')' ")"; #block { background: red; } )
+ '\'; #block { background: red; }',
+ "\"; #block { background: red; }'"
+ {\}\79 '}' "}"; #block { background: red; }
+ #block { background: red; } }
+ #block { color: green; }
+ ]]></style>
+ </head>
+ <body>
+ <p id="semicolon">This sentence must be green.</p>
+ <p id="block">This sentence must be green.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/matching-brackets-002-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/matching-brackets-002-ref.xht
new file mode 100644
index 0000000000..43133ba618
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/matching-brackets-002-ref.xht
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>CSS Reftest Reference</title>
+<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"/>
+<style type="text/css">
+p {
+ color: green;
+}
+</style>
+</head>
+<body>
+<p>This sentence must be green.</p>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/matching-brackets-002.xht b/testing/web-platform/tests/css/CSS2/syntax/matching-brackets-002.xht
new file mode 100644
index 0000000000..1812984e9a
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/matching-brackets-002.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Matching brackets and quotes for declarations</title>
+ <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/media.html#at-media-rule"/>
+ <link rel="match" href="matching-brackets-002-ref.xht"/>
+ <meta name="flags" content="invalid"/>
+ <meta name="assert" content="User agents must handle unexpected tokens
+ encountered while parsing a declaration by reading until the end of the
+ statement, while observing the rules for matching pairs of brackets
+ and quotes, and correctly handling escapes. "/>
+ <style type="text/css"><![CDATA[
+ p {
+ background: red;
+ color: green;
+ color: red ] ) test-token \
+ ~ ` ! @ # $ % ^ & * - _ + = | : > < ? / , .
+ [\]\5D ']' "]"; background: red; } p { color: red; } ]
+ (\)\29 ')' ")"; background: red; } p { color: red; } )
+ '\'; background: red; } p { color: red; }',
+ "\"; background: red; } p { color: red; }' p { color: red; } "
+ ;
+ background: white;
+ }
+ ]]></style>
+ </head>
+ <body>
+ <p>This sentence must be green.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/matching-brackets-003.xht b/testing/web-platform/tests/css/CSS2/syntax/matching-brackets-003.xht
new file mode 100644
index 0000000000..4ed40b34f4
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/matching-brackets-003.xht
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Matching brackets and quotes for selectors</title>
+ <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/media.html#at-media-rule"/>
+ <link rel="match" href="matching-brackets-001-ref.xht"/>
+ <meta name="flags" content="invalid"/>
+ <meta name="assert" content="User agents must handle unexpected tokens
+ encountered while parsing a declaration by reading until the end of the
+ statement, while observing the rules for matching pairs of brackets
+ and quotes, and correctly handling escapes. "/>
+ <!-- simple -->
+ <style type="text/css"><![CDATA[
+ p { color: green; }
+ p ( { border: solid red; } p { background: red; } )
+ p { color: red; }
+ ]]></style>
+ <!-- complex -->
+ <style type="text/css"><![CDATA[
+ div {
+ background: red;
+ color: green;
+ }
+ ] ) test-token \
+ ~ ` ! @ # $ % ^ & * - _ + = | : > < ? / , .
+ [\]\5D ']' "]"; background: red; } div { color: red; } ]
+ (\)\29 ')' ")"; background: red; } div { color: red; } )
+ '\'; background: red; } div { color: red; }',
+ "\"; background: red; } div { color: red; }' div { color: red; } "
+ div { color: red; }
+ div { background: white; }
+ ]]></style>
+ </head>
+ <body>
+ <p>This sentence must be green.</p>
+ <div>This sentence must be green.</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/quoted-keywords-001.xht b/testing/web-platform/tests/css/CSS2/syntax/quoted-keywords-001.xht
new file mode 100644
index 0000000000..a34b1a31ea
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/quoted-keywords-001.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing single quoted property keywords</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#keywords" />
+ <link rel="match" href="../reference/no-red-filler-text-ref.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Rules with property keywords which are surrounded by single quotes are ignored." />
+ <style type="text/css">
+ div
+ {
+ 'color': red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if there is no red visible on the page.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/quoted-keywords-002.xht b/testing/web-platform/tests/css/CSS2/syntax/quoted-keywords-002.xht
new file mode 100644
index 0000000000..0fc31abc3d
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/quoted-keywords-002.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing double quoted value keywords</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#keywords" />
+ <link rel="match" href="../reference/no-red-filler-text-ref.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="Rules with value keywords which are surrounded by double quotes are ignored." />
+ <style type="text/css">
+ div
+ {
+ color: "red";
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if there is no red visible on the page.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/quoted-string-001-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/quoted-string-001-ref.xht
new file mode 100644
index 0000000000..16bde273ca
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/quoted-string-001-ref.xht
@@ -0,0 +1,11 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>CSS Reftest Reference</title>
+<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"/>
+</head>
+<body>
+<p>Test passes if the words "Filler Text" below are single quoted (').</p>
+<div>'Filler Text'</div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/quoted-string-001.xht b/testing/web-platform/tests/css/CSS2/syntax/quoted-string-001.xht
new file mode 100644
index 0000000000..4aeffd92e8
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/quoted-string-001.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing of single quotes inside double quotes</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#strings" />
+ <link rel="match" href="quoted-string-001-ref.xht"/>
+ <meta name="assert" content="Single quotes are allowed in strings that are double quoted." />
+ <style type="text/css">
+ div:before
+ {
+ content: "'Filler Text'";
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the words "Filler Text" below are single quoted (').</p>
+ <div></div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/quoted-string-002-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/quoted-string-002-ref.xht
new file mode 100644
index 0000000000..2345b8b687
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/quoted-string-002-ref.xht
@@ -0,0 +1,11 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>CSS Reftest Reference</title>
+<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"/>
+</head>
+<body>
+<p>Test passes if the words "Filler Text" below are double quoted (").</p>
+<div>"Filler Text"</div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/quoted-string-002.xht b/testing/web-platform/tests/css/CSS2/syntax/quoted-string-002.xht
new file mode 100644
index 0000000000..fdaaff8443
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/quoted-string-002.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing of double quotes inside single quotes</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#strings" />
+ <link rel="match" href="quoted-string-002-ref.xht"/>
+ <meta name="assert" content="Double quotes are allowed in strings that are single quoted." />
+ <style type="text/css">
+ div:before
+ {
+ content: '"Filler Text"';
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the words "Filler Text" below are double quoted (").</p>
+ <div></div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/quoted-string-003.xht b/testing/web-platform/tests/css/CSS2/syntax/quoted-string-003.xht
new file mode 100644
index 0000000000..07e1a3e58a
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/quoted-string-003.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing of escaped quotes (single within single)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#strings" />
+ <link rel="match" href="quoted-string-001-ref.xht"/>
+ <meta name="assert" content="Single quotes cannot occur inside single quotes unless escaped." />
+ <style type="text/css">
+ div:before
+ {
+ content: '\'Filler Text\'';
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the words "Filler Text" below are single quoted (').</p>
+ <div></div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/quoted-string-004.xht b/testing/web-platform/tests/css/CSS2/syntax/quoted-string-004.xht
new file mode 100644
index 0000000000..059a15f833
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/quoted-string-004.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing of escaped double quotes</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#strings" />
+ <link rel="match" href="quoted-string-002-ref.xht"/>
+ <meta name="assert" content="Double quotes cannot occur inside double quotes unless escaped." />
+ <style type="text/css">
+ div:before
+ {
+ content: "\"Filler Text\"";
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the words "Filler Text" below are double quoted (").</p>
+ <div></div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/scientific-notation-001-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/scientific-notation-001-ref.xht
new file mode 100644
index 0000000000..a5712ffb9d
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/scientific-notation-001-ref.xht
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Reference File</title>
+ <link rel="author" title="Bert Bos" href="mailto:bert@w3.org" />
+
+ <style type="text/css">
+ #container {height: 2em; background: red}
+ #child1 {height: 1em; background: green}
+ #child2 {height: 1em; background: green}
+ </style>
+ </head>
+
+ <body>
+ <p>There should be no red.</p>
+
+ <div id="container">
+ <div id="child1"></div>
+ <div id="child2"></div>
+ </div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/scientific-notation-001.xht b/testing/web-platform/tests/css/CSS2/syntax/scientific-notation-001.xht
new file mode 100644
index 0000000000..d6aafc87f8
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/scientific-notation-001.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS test: scientific notation</title>
+
+ <link rel="help" href="http://www.w3.org/TR/CSS22/syndata.html#tokenization" title="4.1.1 Tokenization" />
+ <link rel="help" href="http://www.w3.org/TR/CSS22/changes.html#s.4.1.1d" title="C.1 Changes since the Recommendation of 7 June 2011" />
+ <meta name="assert" content="num [+-]?([0-9]+|[0-9]*\.[0-9]+)(e[+-]?[0-9]+)?" />
+ <link rel="match" href="scientific-notation-001-ref.xht" />
+ <link rel="author" title="Bert Bos" href="mailto:bert@w3.org" />
+
+
+ <style type="text/css">
+ #container {height: 2em; background: red}
+ #child1 {height: 1e0em; background: green}
+ #child2 {height: 0.1e1em; background: green}
+ </style>
+ </head>
+
+ <body>
+ <p>There should be no red.</p>
+
+ <div id="container">
+ <div id="child1"></div>
+ <div id="child2"></div>
+ </div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/sgml-comments-000.xht b/testing/web-platform/tests/css/CSS2/syntax/sgml-comments-000.xht
new file mode 100644
index 0000000000..6cdf5a11c3
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/sgml-comments-000.xht
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: SGML comments</title>
+ <link rel="author" title="Gabriele Romanato" href="mailto:gabriele.romanato@gmail.com" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#comments" />
+ <link rel="match" href="../reference/ref-this-text-should-be-green.xht"/>
+ <meta name="assert" content="UAs must ignore SGML comment delimiters between statements."/>
+<style type="text/css"><![CDATA[
+p {color: red}
+<!--
+p {color: green}
+-->
+]]></style>
+ </head>
+ <body>
+
+<p>This text should be green.</p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/sgml-comments-001.xht b/testing/web-platform/tests/css/CSS2/syntax/sgml-comments-001.xht
new file mode 100644
index 0000000000..e59c8e861a
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/sgml-comments-001.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing SGML comments</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#comments" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="SGML comment tokens are parsed and ignored." />
+ <style type="text/css">
+ <![CDATA[
+ <!--
+ div
+ {
+ color: green;
+ }
+ -->
+ ]]>
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/sgml-comments-002-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/sgml-comments-002-ref.xht
new file mode 100644
index 0000000000..eedd2a9ff8
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/sgml-comments-002-ref.xht
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>CSS Reftest Reference</title>
+<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"/>
+<style type="text/css">
+p {
+ color: green;
+}
+</style>
+</head>
+<body>
+<p>This text should be green.</p>
+<p>This text should be green.</p>
+<p>This text should be green.</p>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/sgml-comments-002.xht b/testing/web-platform/tests/css/CSS2/syntax/sgml-comments-002.xht
new file mode 100644
index 0000000000..c26e310226
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/sgml-comments-002.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
+ <head>
+ <title>CSS Test: Parsing of CDO/CDC in stylesheets</title>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/parsing/core-syntax/cdocdc/001.html" type="text/html"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#comments" />
+ <link rel="match" href="sgml-comments-002-ref.xht"/>
+ <style type="text/css"><![CDATA[
+ <!--
+ .a { color: green; } -->
+ <!-- .b { color: green; }
+ --> --> --> .c { color: green; }
+ <!--
+ ]]></style>
+ </head>
+ <body>
+ <p class="a">This text should be green.</p>
+ <p class="b">This text should be green.</p>
+ <p class="c">This text should be green.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/signed-numbers-001-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/signed-numbers-001-ref.xht
new file mode 100644
index 0000000000..7b97855435
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/signed-numbers-001-ref.xht
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>CSS syntax: signed numbers</title>
+<link rel="author" title="Bert Bos" href="mailto:bert@w3.org" />
+<style type="text/css">
+ div {background: green; width: 20px; height: 100px}
+</style>
+</head>
+<body>
+ <p>This should show a tall green bar, and no red.</p>
+ <div></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/signed-numbers-001.xht b/testing/web-platform/tests/css/CSS2/syntax/signed-numbers-001.xht
new file mode 100644
index 0000000000..6c3c54779f
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/signed-numbers-001.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>CSS syntax: signed numbers</title>
+<link rel="author" title="Bert Bos" href="mailto:bert@w3.org" />
+<link rel="help" href="http://www.w3.org/TR/CSS22/syndata.html#numbers" />
+<link rel="help" href="http://www.w3.org/TR/CSS22/changes.html#s.4.3.1" />
+<link rel="match" href="signed-numbers-001-ref.xht" />
+<meta name="assert" content='Both integers and real numbers may immediately be preceded by a "-" or "+" to indicate the sign.' />
+<style type="text/css">
+ div {background: red; width: 20px; height: 100px}
+ .s1 {background: green; height: 20px}
+ .s2 {background: green; height: 10px; height: +20px}
+ .s3 {background: green; height: 20px; height: 1 0px}
+ .s4 {background: green; height: 20px; height: 1/*comment*/0px}
+ .s5 {background: green; height: 20px; height: + 10px}
+</style>
+</head>
+<body>
+ <p>This should show a tall green bar, and no red.</p>
+ <div>
+ <div class="s1"></div>
+ <div class="s2"></div>
+ <div class="s3"></div>
+ <div class="s4"></div>
+ <div class="s5"></div>
+ </div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/signed-numbers-002.xht b/testing/web-platform/tests/css/CSS2/syntax/signed-numbers-002.xht
new file mode 100644
index 0000000000..cf38d7aed6
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/signed-numbers-002.xht
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>CSS syntax: signed numbers</title>
+<link rel="author" title="Bert Bos" href="mailto:bert@w3.org" />
+<link rel="help" href="http://www.w3.org/TR/CSS22/syndata.html#numbers" />
+<link rel="help" href="http://www.w3.org/TR/CSS22/changes.html#s.4.3.1" />
+<link rel="match" href="signed-numbers-001-ref.xht" />
+<meta name="assert" content='Both integers and real numbers may immediately be preceded by a "-" or "+" to indicate the sign.' />
+<style type="text/css">
+ div {background: red; width: 20px; height: 100px}
+ div div {background: green; height: 20px}
+ .s1 {margin-left: + 30px} /* Invalid */
+ .s2 {margin-left: - 10px} /* Invalid */
+ .s3 {margin-left: -/**/10px} /* Invalid */
+ .s4 {margin-left: 30px; margin-left: +00px} /* Valid */
+ .s5 {margin-left: 30px; margin-left: -0.00px} /* Valid */
+</style>
+</head>
+<body>
+ <p>This should show a tall green bar, and no red.</p>
+ <div>
+ <div class="s1"></div>
+ <div class="s2"></div>
+ <div class="s3"></div>
+ <div class="s4"></div>
+ <div class="s5"></div>
+ </div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/square-brackets-001.xht b/testing/web-platform/tests/css/CSS2/syntax/square-brackets-001.xht
new file mode 100644
index 0000000000..fd3bed7f48
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/square-brackets-001.xht
@@ -0,0 +1,216 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parser recovery after invalid '['</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu"/>
+ <link rel="reviewer" title="Ms2ger" href="mailto:Ms2ger@gmail.com"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors"/>
+ <link rel="help" href="https://drafts.csswg.org/css-syntax-3/#css-stylesheets"/>
+ <link rel="match" href="../reference/ref-this-text-should-be-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="When an invalid '[' is encountered where a
+ selector is expected, the CSS parser skips to
+ the matching ']' and then ignores the following
+ ruleset."/>
+ <style type="text/css"><![CDATA[
+ p { color: red; }
+ [
+ p { color: red !important; }
+ p { color: red !important; }
+ ] p { color: red !important; }
+ p { color: green; }
+ ]]></style>
+ </head>
+ <body>
+ <p>This text should be green.</p>
+ </body>
+</html>
+<!--
+<https://drafts.csswg.org/css-syntax/#tokenization>:
+line 1
+ <whitespace-token>
+ <ident-token> p
+ <whitespace-token>
+ <{-token>
+ <whitespace-token>
+ <ident-token> color
+ <colon-token>
+ <whitespace-token>
+ <ident-token> red
+ <semicolon-token>
+ <whitespace-token>
+ <}-token>
+line 2
+ <whitespace-token>
+ <[-token>
+line 3
+ <whitespace-token>
+ <ident-token> p
+ <whitespace-token>
+ <{-token>
+ <whitespace-token>
+ <ident-token> color
+ <colon-token>
+ <whitespace-token>
+ <ident-token> red
+ <whitespace-token>
+ <delim-token> !
+ <ident-token> important
+ <semicolon-token>
+ <whitespace-token>
+ <}-token>
+line 4
+ <whitespace-token>
+ <ident-token> p
+ <whitespace-token>
+ <{-token>
+ <whitespace-token>
+ <ident-token> color
+ <colon-token>
+ <whitespace-token>
+ <ident-token> red
+ <whitespace-token>
+ <delim-token> !
+ <ident-token> important
+ <semicolon-token>
+ <whitespace-token>
+ <}-token>
+line 5
+ <whitespace-token>
+ <]-token>
+ <ident-token> p
+ <whitespace-token>
+ <{-token>
+ <whitespace-token>
+ <ident-token> color
+ <colon-token>
+ <whitespace-token>
+ <ident-token> red
+ <whitespace-token>
+ <delim-token> !
+ <ident-token> important
+ <semicolon-token>
+ <whitespace-token>
+ <}-token>
+line 6
+ <whitespace-token>
+ <ident-token> p
+ <whitespace-token>
+ <{-token>
+ <whitespace-token>
+ <ident-token> color
+ <colon-token>
+ <whitespace-token>
+ <ident-token> green
+ <semicolon-token>
+ <whitespace-token>
+ <}-token>
+line 7
+ <whitespace-token>
+
+<https://drafts.csswg.org/css-syntax/#consume-a-list-of-rules>:
+[
+ qualified rule {
+ prelude: [
+ <ident-token> p
+ <whitespace-token>
+ ]
+ block:
+ simple block {
+ associated token: <{-token>
+ value: [
+ <whitespace-token>
+ <ident-token> color
+ <colon-token>
+ <whitespace-token>
+ <ident-token> red
+ <semicolon-token>
+ <whitespace-token>
+ ]
+ }
+ }
+ qualified rule {
+ prelude: [
+ simple block {
+ associated token: <[-token>
+ value: [
+ <whitespace-token>
+ <ident-token> p
+ <whitespace-token>
+ simple block {
+ associated token: <{-token>
+ value: [
+ <whitespace-token>
+ <ident-token> color
+ <colon-token>
+ <whitespace-token>
+ <ident-token> red
+ <whitespace-token>
+ <delim-token> !
+ <ident-token> important
+ <semicolon-token>
+ <whitespace-token>
+ ]
+ }
+ <whitespace-token>
+ <ident-token> p
+ <whitespace-token>
+ simple block {
+ associated token: <{-token>
+ value: [
+ <whitespace-token>
+ <ident-token> color
+ <colon-token>
+ <whitespace-token>
+ <ident-token> red
+ <whitespace-token>
+ <delim-token> !
+ <ident-token> important
+ <semicolon-token>
+ <whitespace-token>
+ ]
+ }
+ <whitespace-token>
+ ]
+ }
+ <ident-token> p
+ <whitespace-token>
+ ]
+ block:
+ simple block {
+ associated token: <{-token>
+ value: [
+ <whitespace-token>
+ <ident-token> color
+ <colon-token>
+ <whitespace-token>
+ <ident-token> red
+ <whitespace-token>
+ <delim-token> !
+ <ident-token> important
+ <semicolon-token>
+ <whitespace-token>
+ ]
+ }
+ }
+ qualified rule {
+ prelude: [
+ <ident-token> p
+ <whitespace-token>
+ ]
+ block:
+ simple block {
+ associated token: <{-token>
+ value: [
+ <whitespace-token>
+ <ident-token> color
+ <colon-token>
+ <whitespace-token>
+ <ident-token> green
+ <semicolon-token>
+ <whitespace-token>
+ ]
+ }
+ }
+]
+-->
diff --git a/testing/web-platform/tests/css/CSS2/syntax/strings-000.xht b/testing/web-platform/tests/css/CSS2/syntax/strings-000.xht
new file mode 100644
index 0000000000..185941c492
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/strings-000.xht
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Newlines in strings</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#strings"/>
+ <link rel="match" href="../reference/ref-this-text-should-be-green.xht"/>
+ <style type="text/css">
+ p { color: red }
+ p[title="this is\
+ a test"] { color: green }
+ </style>
+ </head>
+ <body>
+ <p title="this is a test">This text should be green.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/'green block.png b/testing/web-platform/tests/css/CSS2/syntax/support/'green block.png
new file mode 100644
index 0000000000..6ed4aa506e
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/'green block.png
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/,uri-014.png b/testing/web-platform/tests/css/CSS2/syntax/support/,uri-014.png
new file mode 100644
index 0000000000..0aa79b0c86
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/,uri-014.png
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/1x1-green.png b/testing/web-platform/tests/css/CSS2/syntax/support/1x1-green.png
new file mode 100644
index 0000000000..b98ca0ba0a
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/1x1-green.png
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/1x1-lime.png b/testing/web-platform/tests/css/CSS2/syntax/support/1x1-lime.png
new file mode 100644
index 0000000000..cb397fb090
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/1x1-lime.png
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/1x1-maroon.png b/testing/web-platform/tests/css/CSS2/syntax/support/1x1-maroon.png
new file mode 100644
index 0000000000..3f86b07219
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/1x1-maroon.png
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/1x1-navy.png b/testing/web-platform/tests/css/CSS2/syntax/support/1x1-navy.png
new file mode 100644
index 0000000000..9b9a03955b
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/1x1-navy.png
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/1x1-red.png b/testing/web-platform/tests/css/CSS2/syntax/support/1x1-red.png
new file mode 100644
index 0000000000..6bd73ac101
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/1x1-red.png
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/1x1-white.png b/testing/web-platform/tests/css/CSS2/syntax/support/1x1-white.png
new file mode 100644
index 0000000000..dd43faec54
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/1x1-white.png
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/60x60-gg-rr.png b/testing/web-platform/tests/css/CSS2/syntax/support/60x60-gg-rr.png
new file mode 100644
index 0000000000..84f5b2a4f1
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/60x60-gg-rr.png
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/60x60-green.png b/testing/web-platform/tests/css/CSS2/syntax/support/60x60-green.png
new file mode 100644
index 0000000000..b3c8cf3eb4
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/60x60-green.png
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/a-green.css b/testing/web-platform/tests/css/CSS2/syntax/support/a-green.css
new file mode 100644
index 0000000000..b0dbb071d5
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/a-green.css
@@ -0,0 +1 @@
+.a { color: green; }
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-001.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-001.css
new file mode 100644
index 0000000000..2096ad5b89
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-001.css
@@ -0,0 +1,9 @@
+#div2
+{
+ color: green;
+}
+
+.•½˜a
+{
+ color: red;
+}
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-001.css.headers b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-001.css.headers
new file mode 100644
index 0000000000..b2d94d0699
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-001.css.headers
@@ -0,0 +1 @@
+Content-Type: text/css; charset=Shift_JIS
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-002.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-002.css
new file mode 100644
index 0000000000..f56dc888c0
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-002.css
@@ -0,0 +1,5 @@
+@charset "windows-1252";
+.•½˜a, #div2
+{
+ color: green;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-002.css.headers b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-002.css.headers
new file mode 100644
index 0000000000..b2d94d0699
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-002.css.headers
@@ -0,0 +1 @@
+Content-Type: text/css; charset=Shift_JIS
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-003.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-003.css
new file mode 100644
index 0000000000..a9b14d8dfb
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-003.css
@@ -0,0 +1,4 @@
+.•½˜a, #div2
+{
+ color: green;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-003.css.headers b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-003.css.headers
new file mode 100644
index 0000000000..b2d94d0699
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-003.css.headers
@@ -0,0 +1 @@
+Content-Type: text/css; charset=Shift_JIS
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-007.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-007.css
new file mode 100644
index 0000000000..abb7b12957
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-007.css
@@ -0,0 +1,5 @@
+@charset "shift-JIS";
+.•½˜a, #div2
+{
+ color: green;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-008.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-008.css
new file mode 100644
index 0000000000..abb7b12957
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-008.css
@@ -0,0 +1,5 @@
+@charset "shift-JIS";
+.•½˜a, #div2
+{
+ color: green;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-009.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-009.css
new file mode 100644
index 0000000000..abb7b12957
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-009.css
@@ -0,0 +1,5 @@
+@charset "shift-JIS";
+.•½˜a, #div2
+{
+ color: green;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-010.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-010.css
new file mode 100644
index 0000000000..a9b14d8dfb
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-010.css
@@ -0,0 +1,4 @@
+.•½˜a, #div2
+{
+ color: green;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-011.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-011.css
new file mode 100644
index 0000000000..a9b14d8dfb
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-011.css
@@ -0,0 +1,4 @@
+.•½˜a, #div2
+{
+ color: green;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-012.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-012.css
new file mode 100644
index 0000000000..a9b14d8dfb
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-012.css
@@ -0,0 +1,4 @@
+.•½˜a, #div2
+{
+ color: green;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-013.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-013.css
new file mode 100644
index 0000000000..a9b14d8dfb
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-013.css
@@ -0,0 +1,4 @@
+.•½˜a, #div2
+{
+ color: green;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-014.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-014.css
new file mode 100644
index 0000000000..a6245a45bf
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-014.css
@@ -0,0 +1,5 @@
+@charset "UTF-8";
+.平和, #div2
+{
+ color: green;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-015.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-015.css
new file mode 100644
index 0000000000..dc392ba35f
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-015.css
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-016.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-016.css
new file mode 100644
index 0000000000..9674b166dc
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-016.css
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-017.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-017.css
new file mode 100644
index 0000000000..c01f8e7aa2
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-017.css
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-018.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-018.css
new file mode 100644
index 0000000000..88cb55f68a
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-018.css
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-019.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-019.css
new file mode 100644
index 0000000000..5a4894313a
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-019.css
@@ -0,0 +1,4 @@
+.平和, #div2
+{
+ color: green;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-020.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-020.css
new file mode 100644
index 0000000000..46455a888f
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-020.css
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-021.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-021.css
new file mode 100644
index 0000000000..4d50dd8267
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-021.css
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-022.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-022.css
new file mode 100644
index 0000000000..1173872338
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-022.css
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-023.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-023.css
new file mode 100644
index 0000000000..3bf3bc989f
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-023.css
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-024.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-024.css
new file mode 100644
index 0000000000..e9bedb85b0
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-024.css
@@ -0,0 +1,5 @@
+@charset "windows-1252";
+.ñÝ, #div2
+{
+ color: green;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-025.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-025.css
new file mode 100644
index 0000000000..946c6c85fc
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-025.css
@@ -0,0 +1,5 @@
+@charset "shift-JIS";
+.˜[‰Î—j“úûï, #div2
+{
+ color: green;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-026.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-026.css
new file mode 100644
index 0000000000..dc129d7662
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-026.css
@@ -0,0 +1,5 @@
+@charset "ISO-8859-6";
+.Êå, #div2
+{
+ color: green;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-027.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-027.css
new file mode 100644
index 0000000000..f4d596d2fe
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-027.css
@@ -0,0 +1,5 @@
+@charset "Big5";
+.¬P´Á¤»Ê¡, #div2
+{
+ color: green;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-028.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-028.css
new file mode 100644
index 0000000000..efdfd4d42a
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-028.css
@@ -0,0 +1,5 @@
+@charset "UTF-8";
+.星期六å½, #div2
+{
+ color: green;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-029.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-029.css
new file mode 100644
index 0000000000..d62e544619
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-029.css
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-030.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-030.css
new file mode 100644
index 0000000000..0e813e9173
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-030.css
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-031.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-031.css
new file mode 100644
index 0000000000..d339da38bb
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-031.css
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-032.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-032.css
new file mode 100644
index 0000000000..a7c8c29e10
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-032.css
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-033.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-033.css
new file mode 100644
index 0000000000..0027fd9562
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-033.css
@@ -0,0 +1,4 @@
+ÿî.òÔyiÑ
+{
+ color: red;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-034.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-034.css
new file mode 100644
index 0000000000..cf7222b31c
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-034.css
@@ -0,0 +1,4 @@
+þÿ.星期五ヷ
+{
+ color: red;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-035.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-035.css
new file mode 100644
index 0000000000..4b56873b6f
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-035.css
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-036.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-036.css
new file mode 100644
index 0000000000..dd8e07d98e
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-036.css
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-037.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-037.css
new file mode 100644
index 0000000000..e6993d5840
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-037.css
@@ -0,0 +1,5 @@
+@charset "windows-1252";
+.ƒM‚у”
+{
+ color: red;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-038.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-038.css
new file mode 100644
index 0000000000..e785138021
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-038.css
@@ -0,0 +1,5 @@
+@charset "Shift-JIS";
+.¬P´Á¤Gɲªc
+{
+ color: red;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-039.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-039.css
new file mode 100644
index 0000000000..b0193946cf
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-039.css
@@ -0,0 +1,6 @@
+test;
+@charset "UTF-8";
+.平和, #div2
+{
+ color: red;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-040.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-040.css
new file mode 100644
index 0000000000..752bd9afd6
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-040.css
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-041.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-041.css
new file mode 100644
index 0000000000..cc27bffd3b
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-041.css
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-042.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-042.css
new file mode 100644
index 0000000000..4c20e1c9b5
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-042.css
@@ -0,0 +1,5 @@
+@charset "UTF-16BE";
+.星期二价泌, #div1
+{
+ color: green;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-043.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-043.css
new file mode 100644
index 0000000000..11d1d82fe9
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-043.css
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-044.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-044.css
new file mode 100644
index 0000000000..98aae3e1d0
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-044.css
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-045.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-045.css
new file mode 100644
index 0000000000..ebcfc4b2d7
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-045.css
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-046.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-046.css
new file mode 100644
index 0000000000..296a3f28df
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-046.css
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-047.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-047.css
new file mode 100644
index 0000000000..df4f6c909e
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-047.css
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-048.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-048.css
new file mode 100644
index 0000000000..e926b444c0
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-048.css
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-049.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-049.css
new file mode 100644
index 0000000000..08c40cfbf0
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-049.css
@@ -0,0 +1,6 @@
+
+@charset "Shift-JIS";
+.¯Šú“ñ˜Á”å
+{
+ color: red;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-050.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-050.css
new file mode 100644
index 0000000000..70b3329176
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-050.css
@@ -0,0 +1,5 @@
+ @charset "Shift-JIS";
+.¯Šú“ñ˜Á”å
+{
+ color: red;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-051.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-051.css
new file mode 100644
index 0000000000..8bc0ee7342
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-051.css
@@ -0,0 +1,8 @@
+div
+{
+ color: red;
+}@charset "Shift-JIS";
+.¯Šú“ñ˜Á”å
+{
+ color: red;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-052.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-052.css
new file mode 100644
index 0000000000..ec420e1cfc
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-052.css
@@ -0,0 +1,5 @@
+@charset "windows-1252";@charset "Shift-JIS";
+.¯Šú“ñ˜Á”å
+{
+ color: red;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-053.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-053.css
new file mode 100644
index 0000000000..e40d66b503
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-053.css
@@ -0,0 +1 @@
+@charset "Shift-JIS";.¯Šú“ñ˜Á”å{color: green;} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-054.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-054.css
new file mode 100644
index 0000000000..1d3ceed76c
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-054.css
@@ -0,0 +1,5 @@
+@CHARSET "Shift-JIS";
+.¯Šú“ñ˜Á”å
+{
+ color: red;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-055.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-055.css
new file mode 100644
index 0000000000..a007ba1612
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-055.css
@@ -0,0 +1,5 @@
+@charset Shift-JIS;
+.¯Šú“ñ˜Á”å
+{
+ color: red;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-056.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-056.css
new file mode 100644
index 0000000000..46c0df07e5
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-056.css
@@ -0,0 +1,5 @@
+@charset"Shift-JIS";
+.¯Šú“ñ˜Á”å
+{
+ color: red;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-057.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-057.css
new file mode 100644
index 0000000000..26db82edc7
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-057.css
@@ -0,0 +1,5 @@
+@\63\68\61\72\73\65\74 "Shift-JIS"; /* escaped "charset" */
+.¯Šú“ñ˜Á”å
+{
+ color: red;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-058.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-058.css
new file mode 100644
index 0000000000..26db82edc7
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-058.css
@@ -0,0 +1,5 @@
+@\63\68\61\72\73\65\74 "Shift-JIS"; /* escaped "charset" */
+.¯Šú“ñ˜Á”å
+{
+ color: red;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-059.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-059.css
new file mode 100644
index 0000000000..852f23c339
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-059.css
@@ -0,0 +1,5 @@
+@charset "Shift-JIS"
+.¯Šú“ñ˜Á”å
+{
+ color: red;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-060.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-060.css
new file mode 100644
index 0000000000..c84969de3f
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-060.css
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-071.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-071.css
new file mode 100644
index 0000000000..c06645b7eb
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-071.css
@@ -0,0 +1,2 @@
+@charset "iso-8859-1";
+.tést { color: white; background: green; } \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-071.css.headers b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-071.css.headers
new file mode 100644
index 0000000000..74e07a14e7
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-071.css.headers
@@ -0,0 +1 @@
+Content-Type: text/css
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-072.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-072.css
new file mode 100644
index 0000000000..3e49dee2bf
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-072.css
@@ -0,0 +1,2 @@
+@charset "iso-8859-11";
+.tést { color: white; background: green; } \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-072.css.headers b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-072.css.headers
new file mode 100644
index 0000000000..74e07a14e7
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-072.css.headers
@@ -0,0 +1 @@
+Content-Type: text/css
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-073.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-073.css
new file mode 100644
index 0000000000..87b716b6cd
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-073.css
@@ -0,0 +1,2 @@
+@charset "iso-8859-5";
+.tést { color: white; background: green; } \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-073.css.headers b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-073.css.headers
new file mode 100644
index 0000000000..74e07a14e7
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-073.css.headers
@@ -0,0 +1 @@
+Content-Type: text/css
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-074.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-074.css
new file mode 100644
index 0000000000..3729378566
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-074.css
@@ -0,0 +1,2 @@
+@charset "iso-8859-6";
+.tést { color: white; background: green; } \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-074.css.headers b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-074.css.headers
new file mode 100644
index 0000000000..74e07a14e7
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-074.css.headers
@@ -0,0 +1 @@
+Content-Type: text/css
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-075.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-075.css
new file mode 100644
index 0000000000..d632a46f99
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-075.css
@@ -0,0 +1,2 @@
+@charset "iso-8859-7";
+.tést { color: white; background: green; } \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-075.css.headers b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-075.css.headers
new file mode 100644
index 0000000000..74e07a14e7
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-075.css.headers
@@ -0,0 +1 @@
+Content-Type: text/css
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-076.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-076.css
new file mode 100644
index 0000000000..9ab994c5ce
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-076.css
@@ -0,0 +1,2 @@
+@charset "iso-8859-8";
+.tést { color: white; background: green; } \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-076.css.headers b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-076.css.headers
new file mode 100644
index 0000000000..74e07a14e7
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-076.css.headers
@@ -0,0 +1 @@
+Content-Type: text/css
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-077.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-077.css
new file mode 100644
index 0000000000..9a978061ca
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-077.css
@@ -0,0 +1,2 @@
+@charset "koi8-r";
+.tést { color: white; background: green; } \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-077.css.headers b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-077.css.headers
new file mode 100644
index 0000000000..74e07a14e7
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-077.css.headers
@@ -0,0 +1 @@
+Content-Type: text/css
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-quotes-001.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-quotes-001.css
new file mode 100644
index 0000000000..67f9f21f45
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-quotes-001.css
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-space-001.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-space-001.css
new file mode 100644
index 0000000000..69b4324aaf
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-space-001.css
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-space-002.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-space-002.css
new file mode 100644
index 0000000000..c1f9d451e2
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-space-002.css
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-utf16-be-001.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-utf16-be-001.css
new file mode 100644
index 0000000000..f877df030c
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-utf16-be-001.css
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-utf16-be-002.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-utf16-be-002.css
new file mode 100644
index 0000000000..8fac5d47f4
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-utf16-be-002.css
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-utf16-be-003.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-utf16-be-003.css
new file mode 100644
index 0000000000..21e4206f72
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-utf16-be-003.css
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-utf16-le-001.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-utf16-le-001.css
new file mode 100644
index 0000000000..b2a1129c04
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-utf16-le-001.css
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-utf16-le-002.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-utf16-le-002.css
new file mode 100644
index 0000000000..8fffadd4e5
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-utf16-le-002.css
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-utf16-le-003.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-utf16-le-003.css
new file mode 100644
index 0000000000..ddf7fd00ae
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-charset-utf16-le-003.css
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-rule-green.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-rule-green.css
new file mode 100644
index 0000000000..d08dd8ce64
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-rule-green.css
@@ -0,0 +1,5 @@
+/* at-rule-green.css */
+div
+{
+ color: green;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/at-rule-red.css b/testing/web-platform/tests/css/CSS2/syntax/support/at-rule-red.css
new file mode 100644
index 0000000000..a906e9dab7
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/at-rule-red.css
@@ -0,0 +1,5 @@
+/* at-rule-red.css */
+div
+{
+ color: red;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/b-green.css b/testing/web-platform/tests/css/CSS2/syntax/support/b-green.css
new file mode 100644
index 0000000000..a0473f5ca2
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/b-green.css
@@ -0,0 +1 @@
+.b { color: green; } \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/c-red.css b/testing/web-platform/tests/css/CSS2/syntax/support/c-red.css
new file mode 100644
index 0000000000..d4ba5c64e9
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/c-red.css
@@ -0,0 +1 @@
+.c { color: red; } \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/cat.png b/testing/web-platform/tests/css/CSS2/syntax/support/cat.png
new file mode 100644
index 0000000000..85dd732481
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/cat.png
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-031.css b/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-031.css
new file mode 100644
index 0000000000..9c9d8d1684
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-031.css
@@ -0,0 +1 @@
+.tést { color: white; background: green; } \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-031.css.headers b/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-031.css.headers
new file mode 100644
index 0000000000..8a52752d9b
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-031.css.headers
@@ -0,0 +1 @@
+Content-Type: text/css; charset=iso-8859-1
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-032.css b/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-032.css
new file mode 100644
index 0000000000..9c9d8d1684
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-032.css
@@ -0,0 +1 @@
+.tést { color: white; background: green; } \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-032.css.headers b/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-032.css.headers
new file mode 100644
index 0000000000..6a8f2ab0aa
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-032.css.headers
@@ -0,0 +1 @@
+Content-Type: text/css; charset=iso-8859-11
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-033.css b/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-033.css
new file mode 100644
index 0000000000..9c9d8d1684
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-033.css
@@ -0,0 +1 @@
+.tést { color: white; background: green; } \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-033.css.headers b/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-033.css.headers
new file mode 100644
index 0000000000..f102eeec9a
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-033.css.headers
@@ -0,0 +1 @@
+Content-Type: text/css; charset=iso-8859-5
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-034.css b/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-034.css
new file mode 100644
index 0000000000..9c9d8d1684
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-034.css
@@ -0,0 +1 @@
+.tést { color: white; background: green; } \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-034.css.headers b/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-034.css.headers
new file mode 100644
index 0000000000..6e38041543
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-034.css.headers
@@ -0,0 +1 @@
+Content-Type: text/css; charset=iso-8859-6
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-035.css b/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-035.css
new file mode 100644
index 0000000000..9c9d8d1684
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-035.css
@@ -0,0 +1 @@
+.tést { color: white; background: green; } \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-035.css.headers b/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-035.css.headers
new file mode 100644
index 0000000000..0f43e9e302
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-035.css.headers
@@ -0,0 +1 @@
+Content-Type: text/css; charset=iso-8859-7
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-036.css b/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-036.css
new file mode 100644
index 0000000000..9c9d8d1684
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-036.css
@@ -0,0 +1 @@
+.tést { color: white; background: green; } \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-036.css.headers b/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-036.css.headers
new file mode 100644
index 0000000000..d866aa5224
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-036.css.headers
@@ -0,0 +1 @@
+Content-Type: text/css; charset=iso-8859-8
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-037.css b/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-037.css
new file mode 100644
index 0000000000..9c9d8d1684
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-037.css
@@ -0,0 +1 @@
+.tést { color: white; background: green; } \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-037.css.headers b/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-037.css.headers
new file mode 100644
index 0000000000..40cd2c7b68
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-037.css.headers
@@ -0,0 +1 @@
+Content-Type: text/css; charset=koi8-r
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-038.css b/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-038.css
new file mode 100644
index 0000000000..9c9d8d1684
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-038.css
@@ -0,0 +1 @@
+.tést { color: white; background: green; } \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-041.css b/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-041.css
new file mode 100644
index 0000000000..6205636485
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-041.css
@@ -0,0 +1,3 @@
+
+/* Warning: the line above starts with a BOM */
+.tést { color: white; background: green; } \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-041.css.headers b/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-041.css.headers
new file mode 100644
index 0000000000..1108b9a65b
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/character-encoding-041.css.headers
@@ -0,0 +1 @@
+Content-Type: text/css; charset=utf-16be
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/charset-attr-001.css b/testing/web-platform/tests/css/CSS2/syntax/support/charset-attr-001.css
new file mode 100644
index 0000000000..8fcd96f5d4
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/charset-attr-001.css
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/core-syntax-009.css b/testing/web-platform/tests/css/CSS2/syntax/support/core-syntax-009.css
new file mode 100644
index 0000000000..7fe2fe1b4d
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/core-syntax-009.css
@@ -0,0 +1,12 @@
+/* This file contains significant white space below this line. Edit carefully. */
+* { color: red; }
+ div
+ p
+ {
+ color
+ :
+ green
+ ;
+ }
+
+div p { color: red; }
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/diamond.png b/testing/web-platform/tests/css/CSS2/syntax/support/diamond.png
new file mode 100644
index 0000000000..51112efc7c
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/diamond.png
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/eof-green.css b/testing/web-platform/tests/css/CSS2/syntax/support/eof-green.css
new file mode 100644
index 0000000000..5ac13b555b
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/eof-green.css
@@ -0,0 +1,5 @@
+/* eof-green.css */
+div
+{
+ color: green;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/green15x15.png b/testing/web-platform/tests/css/CSS2/syntax/support/green15x15.png
new file mode 100644
index 0000000000..51741584a0
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/green15x15.png
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/import-green.css b/testing/web-platform/tests/css/CSS2/syntax/support/import-green.css
new file mode 100644
index 0000000000..537104e663
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/import-green.css
@@ -0,0 +1 @@
+.import { color: green; }
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/import-red.css b/testing/web-platform/tests/css/CSS2/syntax/support/import-red.css
new file mode 100644
index 0000000000..9945ef4711
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/import-red.css
@@ -0,0 +1 @@
+.import { color: red; }
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/pattern-grg-rgr-grg.png b/testing/web-platform/tests/css/CSS2/syntax/support/pattern-grg-rgr-grg.png
new file mode 100644
index 0000000000..9b88fbd811
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/pattern-grg-rgr-grg.png
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/pattern-grg-rrg-rgg.png b/testing/web-platform/tests/css/CSS2/syntax/support/pattern-grg-rrg-rgg.png
new file mode 100644
index 0000000000..fcf4f3fd7d
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/pattern-grg-rrg-rgg.png
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/pattern-rgr-grg-rgr.png b/testing/web-platform/tests/css/CSS2/syntax/support/pattern-rgr-grg-rgr.png
new file mode 100644
index 0000000000..d454e3a630
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/pattern-rgr-grg-rgr.png
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/pattern-tr.png b/testing/web-platform/tests/css/CSS2/syntax/support/pattern-tr.png
new file mode 100644
index 0000000000..8b4b25364e
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/pattern-tr.png
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/plaintext-css.txt b/testing/web-platform/tests/css/CSS2/syntax/support/plaintext-css.txt
new file mode 100644
index 0000000000..06283232e7
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/plaintext-css.txt
@@ -0,0 +1,5 @@
+div
+{
+background-color: red !important;
+font-size: 2em;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/plaintext.css b/testing/web-platform/tests/css/CSS2/syntax/support/plaintext.css
new file mode 100644
index 0000000000..06283232e7
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/plaintext.css
@@ -0,0 +1,5 @@
+div
+{
+background-color: red !important;
+font-size: 2em;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/plaintext.css.headers b/testing/web-platform/tests/css/CSS2/syntax/support/plaintext.css.headers
new file mode 100644
index 0000000000..a1f9e38d90
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/plaintext.css.headers
@@ -0,0 +1 @@
+Content-Type: text/plain
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/ring.png b/testing/web-platform/tests/css/CSS2/syntax/support/ring.png
new file mode 100644
index 0000000000..061bb94eba
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/ring.png
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/square-purple.png b/testing/web-platform/tests/css/CSS2/syntax/support/square-purple.png
new file mode 100644
index 0000000000..0f522d7872
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/square-purple.png
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/square-teal.png b/testing/web-platform/tests/css/CSS2/syntax/support/square-teal.png
new file mode 100644
index 0000000000..e567f51b91
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/square-teal.png
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/square-white.png b/testing/web-platform/tests/css/CSS2/syntax/support/square-white.png
new file mode 100644
index 0000000000..5853cbb238
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/square-white.png
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/swatch-blue.png b/testing/web-platform/tests/css/CSS2/syntax/support/swatch-blue.png
new file mode 100644
index 0000000000..bf2759634d
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/swatch-blue.png
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/swatch-green.png b/testing/web-platform/tests/css/CSS2/syntax/support/swatch-green.png
new file mode 100644
index 0000000000..0aa79b0c86
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/swatch-green.png
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/swatch-lime.png b/testing/web-platform/tests/css/CSS2/syntax/support/swatch-lime.png
new file mode 100644
index 0000000000..55fd7fdaed
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/swatch-lime.png
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/swatch-orange.png b/testing/web-platform/tests/css/CSS2/syntax/support/swatch-orange.png
new file mode 100644
index 0000000000..d3cd498b52
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/swatch-orange.png
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/swatch-red.png b/testing/web-platform/tests/css/CSS2/syntax/support/swatch-red.png
new file mode 100644
index 0000000000..1caf25c992
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/swatch-red.png
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/swatch-white.png b/testing/web-platform/tests/css/CSS2/syntax/support/swatch-white.png
new file mode 100644
index 0000000000..1a7d4323d7
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/swatch-white.png
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/swatch-yellow.png b/testing/web-platform/tests/css/CSS2/syntax/support/swatch-yellow.png
new file mode 100644
index 0000000000..1591aa0e2e
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/swatch-yellow.png
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/test-bl.png b/testing/web-platform/tests/css/CSS2/syntax/support/test-bl.png
new file mode 100644
index 0000000000..904e24e996
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/test-bl.png
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/test-br.png b/testing/web-platform/tests/css/CSS2/syntax/support/test-br.png
new file mode 100644
index 0000000000..f413ff5c1a
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/test-br.png
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/test-outer.png b/testing/web-platform/tests/css/CSS2/syntax/support/test-outer.png
new file mode 100644
index 0000000000..82eeace7fc
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/test-outer.png
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/test-tl.png b/testing/web-platform/tests/css/CSS2/syntax/support/test-tl.png
new file mode 100644
index 0000000000..f6ac0ef7e8
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/test-tl.png
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/test-tr.png b/testing/web-platform/tests/css/CSS2/syntax/support/test-tr.png
new file mode 100644
index 0000000000..59843ae54b
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/test-tr.png
Binary files differ
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/uri-001.css b/testing/web-platform/tests/css/CSS2/syntax/support/uri-001.css
new file mode 100644
index 0000000000..19e0f83c0b
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/uri-001.css
@@ -0,0 +1,4 @@
+#p1
+{
+ color: green;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/support/uri-002.css b/testing/web-platform/tests/css/CSS2/syntax/support/uri-002.css
new file mode 100644
index 0000000000..d19071939d
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/support/uri-002.css
@@ -0,0 +1,5 @@
+/* bad.css */
+div
+{
+ color: red;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/unterminated-string-001.xht b/testing/web-platform/tests/css/CSS2/syntax/unterminated-string-001.xht
new file mode 100644
index 0000000000..276d88f345
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/unterminated-string-001.xht
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Error handling of unterminated strings</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="When the parser encounters an unterminated string, the parser drops everything up to the next ';'." />
+ <style type="text/css">
+ div
+ {
+ color: green;
+ font-family: 'Courier;
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/uri-001.xht b/testing/web-platform/tests/css/CSS2/syntax/uri-001.xht
new file mode 100644
index 0000000000..55e389bf86
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/uri-001.xht
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing valid URIs with white space and no quotes</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#uri" />
+ <link rel="match" href="../reference/filler-text-below-green.xht"/>
+ <meta name="assert" content="A url function is valid if it is 'url(', followed by the URI, followed by ')', even with white space between." />
+ <style type="text/css">
+ @import url(
+ support/uri-001.css
+ );
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the "Filler Text" below is green.</p>
+ <p id="p1">Filler Text</p>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/uri-002.xht b/testing/web-platform/tests/css/CSS2/syntax/uri-002.xht
new file mode 100644
index 0000000000..c58748593e
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/uri-002.xht
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Parsing URL with an invalid space</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#uri" />
+ <link rel="match" href="../reference/no-red-filler-text-ref.xht"/>
+ <meta name="flags" content="invalid" />
+ <meta name="assert" content="URL functions with invalid spaces are ignored." />
+ <style type="text/css">
+ @import url ("support/uri-002.css");
+ </style>
+ </head>
+ <body>
+ <p>Test passes if there is no red visible on the page.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/uri-003.xht b/testing/web-platform/tests/css/CSS2/syntax/uri-003.xht
new file mode 100644
index 0000000000..b0520fa689
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/uri-003.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: URL with missing closing parenthesis</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#uri" />
+ <link rel="match" href="../reference/no-red-filler-text-ref.xht"/>
+ <meta name="flags" content="image invalid" />
+ <meta name="assert" content="Url functions with missing closing parenthesis are ignored." />
+ <style type="text/css">
+ div
+ {
+ background: url("support/red_box.png";
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if there is no red visible on the page.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/uri-004.xht b/testing/web-platform/tests/css/CSS2/syntax/uri-004.xht
new file mode 100644
index 0000000000..2b46909e96
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/uri-004.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: URL function with URI that has escaped special chars</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#uri" />
+ <link rel="match" href="../reference/ref-green-background.xht"/>
+ <meta name="flags" content="image" />
+ <meta name="assert" content="URI escapes are allowed in URL functions." />
+ <style type="text/css">
+ p
+ {
+ color: white;
+ background: red url(support/%27green%20block.png);
+ }
+ </style>
+ </head>
+ <body>
+ <p>This should have a green background.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/uri-005.xht b/testing/web-platform/tests/css/CSS2/syntax/uri-005.xht
new file mode 100644
index 0000000000..0f69207e4c
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/uri-005.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: URL function with escaped special chars - single quote</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#uri" />
+ <link rel="match" href="../reference/ref-green-background.xht"/>
+ <meta name="flags" content="image" />
+ <meta name="assert" content="Single quote characters appearing in an unquoted URI need to be escaped with a backslash so that the resulting URI value is a URI token." />
+ <style type="text/css">
+ p
+ {
+ color: white;
+ background: red url(support/\'green\ block.png);
+ }
+ </style>
+ </head>
+ <body>
+ <p>This should have a green background.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/uri-006.xht b/testing/web-platform/tests/css/CSS2/syntax/uri-006.xht
new file mode 100644
index 0000000000..2895d23010
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/uri-006.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Invalid character (*) after URL function values</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#uri" />
+ <link rel="match" href="../reference/no-red-filler-text-ref.xht"/>
+ <meta name="flags" content="image invalid" />
+ <meta name="assert" content="Special CSS characters following URL strings invalidate the entire url assignment." />
+ <style type="text/css">
+ div
+ {
+ background: url("support/red_box.png"*);
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if there is no red visible on the page.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/uri-007.xht b/testing/web-platform/tests/css/CSS2/syntax/uri-007.xht
new file mode 100644
index 0000000000..62259e1452
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/uri-007.xht
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Invalid character (&amp;) after URL functions values</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#uri" />
+ <link rel="match" href="../reference/no-red-filler-text-ref.xht"/>
+ <meta name="flags" content="image invalid" />
+ <meta name="assert" content="Invalid characters following URL strings invalidate the entire url assignment." />
+ <style type="text/css">
+ /*<![CDATA[*/
+ div
+ {
+ background: url("support/red_box.png"&);
+ }
+ /*]]>*/
+ </style>
+ </head>
+ <body>
+ <p>Test passes if there is no red visible on the page.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/uri-008.xht b/testing/web-platform/tests/css/CSS2/syntax/uri-008.xht
new file mode 100644
index 0000000000..14804b4423
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/uri-008.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Invalid characters (alpha) before URL function values</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#uri" />
+ <link rel="match" href="../reference/no-red-filler-text-ref.xht"/>
+ <meta name="flags" content="image invalid" />
+ <meta name="assert" content="Alpha characters preceding URL strings invalidate the entire url assignment." />
+ <style type="text/css">
+ div
+ {
+ background: url(abc"support/red_box.png");
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if there is no red visible on the page.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/uri-009.xht b/testing/web-platform/tests/css/CSS2/syntax/uri-009.xht
new file mode 100644
index 0000000000..036c9c2b4e
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/uri-009.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Invalid character (/) before URL functions</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#uri" />
+ <link rel="match" href="../reference/no-red-filler-text-ref.xht"/>
+ <meta name="flags" content="image invalid" />
+ <meta name="assert" content="A slash character preceding URL string invalidates the entire url assignment." />
+ <style type="text/css">
+ div
+ {
+ background: url(/"support/red_box.png");
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if there is no red visible on the page.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/uri-010.xht b/testing/web-platform/tests/css/CSS2/syntax/uri-010.xht
new file mode 100644
index 0000000000..d88d5d3449
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/uri-010.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Invalid character (_) before URL functions</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#uri" />
+ <link rel="match" href="../reference/no-red-filler-text-ref.xht"/>
+ <meta name="flags" content="image invalid" />
+ <meta name="assert" content="An underscore character preceding URL string invalidates the entire url assignment." />
+ <style type="text/css">
+ div
+ {
+ background: url(_"support/red_box.png");
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if there is no red visible on the page.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/uri-011.xht b/testing/web-platform/tests/css/CSS2/syntax/uri-011.xht
new file mode 100644
index 0000000000..87b1ebc044
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/uri-011.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Invalid character (=) before URL functions</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#uri" />
+ <link rel="match" href="../reference/no-red-filler-text-ref.xht"/>
+ <meta name="flags" content="image invalid" />
+ <meta name="assert" content="An equal sign character preceding URL string invalidates the entire url assignment." />
+ <style type="text/css">
+ div
+ {
+ background: url(="support/red_box.png");
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if there is no red visible on the page.</p>
+ <div>Filler Text</div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/uri-012-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/uri-012-ref.xht
new file mode 100644
index 0000000000..6cd52001f2
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/uri-012-ref.xht
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>CSS Reftest Reference</title>
+<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"/>
+<style type="text/css">
+p {
+ color: green;
+ border: solid green;
+}
+</style>
+</head>
+<body>
+<p>This sentence should be green with a green border.</p>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/uri-012.xht b/testing/web-platform/tests/css/CSS2/syntax/uri-012.xht
new file mode 100644
index 0000000000..e53030135b
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/uri-012.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Error handling of broken url() - balancing braces</title>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+ <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/parsing/uri/010.html" type="text/html"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#uri" />
+ <link rel="match" href="uri-012-ref.xht"/>
+ <meta name="flags" content="invalid"/>
+ <style>
+ .control {
+ color: white;
+ border: none;
+ }
+ p {
+ color: red;
+ border: solid red;
+ background: red url( { test ); border: solid green; }
+ p {
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <p>This sentence should be green with a green border.</p>
+ <p class="control">FAIL if there is any red on this page.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/uri-013-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/uri-013-ref.xht
new file mode 100644
index 0000000000..650138349e
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/uri-013-ref.xht
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: handling of invalid url() functions (reference)</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <style type="text/css">
+ div { background-color: green }
+ </style>
+ </head>
+ <body>
+ <div id="one">This should have a green background</div>
+ <div id="two">This should have a green background</div>
+ <div id="three">This should have a green background</div>
+ <div id="four">This should have a green background</div>
+ <div id="five">This should have a green background</div>
+ <div id="six">This should have a green background</div>
+ <div id="seven">This should have a green background</div>
+ <div id="eight">This should have a green background</div>
+ <div id="nine">This should have a green background</div>
+ <div id="ten">This should have a green background</div>
+ <div id="eleven">This should have a green background</div>
+ <div id="twelve">This should have a green background</div>
+ <div id="thirteen">This should have a green background</div>
+ <div id="fourteen">This should have a green background</div>
+ <div id="fifteen">This should have a green background</div>
+ <div id="sixteen">This should have a green background</div>
+ <div id="seventeen">This should have a green background</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/uri-013.xht b/testing/web-platform/tests/css/CSS2/syntax/uri-013.xht
new file mode 100644
index 0000000000..24bd73f61d
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/uri-013.xht
@@ -0,0 +1,118 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: handling of invalid url() functions</title>
+ <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#tokenization" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+ <link rel="match" href="uri-013-ref.xht"/>
+ <meta name="flags" content="invalid" />
+ <style type="text/css">
+ div { background-color: red }
+ </style>
+ <style type="text/css">
+ /* not a URI token, but handled according to rules for parsing errors */
+ #one { background: url(foo"bar") }
+ #one { background-color: green; }
+ </style>
+ <style type="text/css">
+ /* not a URI token, but handled according to rules for parsing errors */
+ #foo { background: url(foo"bar
+ ) }
+ #two { background-color: green; }
+ </style>
+ <style type="text/css">
+ /* not a URI token; the unterminated string ends at end of line, so
+ the brace never matches */
+ #three { background-color: green; }
+ #foo { background: url(foo"bar) }
+ #three { background-color: red; }
+ </style>
+ <style type="text/css">
+ /* not a URI token; the unterminated string ends at end of line */
+ #foo { background: url(foo"bar) }
+ ) }
+ #four { background-color: green; }
+ </style>
+ <style type="text/css">
+ /* not a URI token; the unterminated string ends at end of line, so
+ the brace never matches */
+ #five { background-color: green; }
+ #foo { background: url("bar) }
+ #five { background-color: red; }
+ </style>
+ <style type="text/css">
+ /* not a URI token; the unterminated string ends at end of line */
+ #foo { background: url("bar) }
+ ) }
+ #six { background-color: green; }
+ </style>
+ <style type="text/css">
+ /* not a URI token, but brace matching should work */
+ #seven { background: url(()); background-color: green; }
+ </style>
+ <style type="text/css">
+ /* not a URI token, but brace matching should work */
+ #eight { background: url([{}]); background-color: green; }
+ </style>
+ <style type="text/css">
+ /* not a URI token, but brace matching should work */
+ #nine { background: url([)]); background-color: green; }
+ </style>
+ <style type="text/css">
+ /* perfectly good URI token (image is a 404, though) */
+ #ten { background: url({) green; }
+ </style>
+ <style type="text/css">
+ /* perfectly good URI token (image is a 404, though) */
+ #eleven { background: url([) green; }
+ </style>
+ <style type="text/css">
+ /* not a URI token; brace matching should work only after invalid URI token */
+ #twelve { background: url(}{""{)}); background-color: green; }
+ </style>
+ <style type="text/css">
+ /* invalid URI token absorbs the [ */
+ #thirteen { background: url([""); background-color: green; }
+ </style>
+ <style type="text/css">
+ /* not a URI token; the opening ( is never matched */
+ #fourteen { background-color: green; }
+ #foo { background: url(() }
+ #fourteen { background-color: red; }
+ </style>
+ <!-- The next three tests test that invalid URI tokens absorb [ and { -->
+ <style type="text/css">
+ #foo { background: url(a()); }
+ #fifteen { background-color: green }
+ </style>
+ <style type="text/css">
+ #foo { background: url([()); }
+ #sixteen { background-color: green }
+ </style>
+ <style type="text/css">
+ #foo { background: url({()); }
+ #seventeen { background-color: green }
+ </style>
+ </head>
+ <body>
+ <div id="one">This should have a green background</div>
+ <div id="two">This should have a green background</div>
+ <div id="three">This should have a green background</div>
+ <div id="four">This should have a green background</div>
+ <div id="five">This should have a green background</div>
+ <div id="six">This should have a green background</div>
+ <div id="seven">This should have a green background</div>
+ <div id="eight">This should have a green background</div>
+ <div id="nine">This should have a green background</div>
+ <div id="ten">This should have a green background</div>
+ <div id="eleven">This should have a green background</div>
+ <div id="twelve">This should have a green background</div>
+ <div id="thirteen">This should have a green background</div>
+ <div id="fourteen">This should have a green background</div>
+ <div id="fifteen">This should have a green background</div>
+ <div id="sixteen">This should have a green background</div>
+ <div id="seventeen">This should have a green background</div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/uri-014.xht b/testing/web-platform/tests/css/CSS2/syntax/uri-014.xht
new file mode 100644
index 0000000000..a854c075cf
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/uri-014.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Unquoted commas in url()</title>
+ <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#uri"/>
+ <link rel="match" href="../reference/ref-green-background.xht"/>
+ <meta name="assert" content="Unquoted commas inside url() are valid."/>
+ <style type="text/css"><![CDATA[
+ p {
+ background: red;
+ background: red url(support/,uri-014.png);
+ color: white;
+ }
+ ]]></style>
+ </head>
+ <body>
+ <p>This should have a green background.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/uri-015.xht b/testing/web-platform/tests/css/CSS2/syntax/uri-015.xht
new file mode 100644
index 0000000000..ed247f279c
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/uri-015.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Escaped url() functional notation</title>
+ <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#uri"/>
+ <link rel="match" href="../reference/ref-green-background.xht"/>
+ <meta name="assert" content="url() notation is case-insensitive and can be escaped."/>
+ <style type="text/css"><![CDATA[
+ p {
+ color: white;
+ background: red;
+ background: red U\r\4c ("support/swatch-green.png");
+ }
+ ]]></style>
+ </head>
+ <body>
+ <p>This should have a green background.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/uri-016-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/uri-016-ref.xht
new file mode 100644
index 0000000000..064daf5781
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/uri-016-ref.xht
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>CSS Reftest Reference</title>
+<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"/>
+<style type="text/css">
+p.green {
+ color: green;
+}
+p.white {
+ color: white;
+}
+</style>
+</head>
+<body>
+<p class="green">This sentence must be green and there must be no red.</p>
+<p class="white">There must be no red on this page.</p>
+<p class="white">There must be no red on this page.</p>
+<p class="green">This sentence must be green and there must be no red.</p>
+<p class="white">There must be no red on this page.</p>
+<p class="white">There must be no red on this page.</p>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/uri-016.xht b/testing/web-platform/tests/css/CSS2/syntax/uri-016.xht
new file mode 100644
index 0000000000..0be5565c4a
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/uri-016.xht
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Error handling of broken url() with open /*</title>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+ <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/parsing/uri/007.html"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#uri" />
+ <link rel="match" href="uri-016-ref.xht"/>
+ <meta name="assert" content="Comments are just regular tokens inside
+ unquoted URLs."/>
+ <style type="text/css">
+ * { color: red; }
+ .one { background: red url(test/* test); color: green; }
+ .two { background: red; background: white url( test/*test ); color: white; }
+ .three { background: xtest url( test/*test ); color: white; }
+
+ .four { background: red url(/* test); color: green; }
+ .five { background: red; background: white url( /*test ); color: white; }
+ .six { background: xtest url( /*test ); color: white; }
+ </style>
+ </head>
+ <body>
+ <p class="one">This sentence must be green and there must be no red.</p>
+ <p class="two">There must be no red on this page.</p>
+ <p class="three">There must be no red on this page.</p>
+ <p class="four">This sentence must be green and there must be no red.</p>
+ <p class="five">There must be no red on this page.</p>
+ <p class="six">There must be no red on this page.</p>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/uri-017-ref.xht b/testing/web-platform/tests/css/CSS2/syntax/uri-017-ref.xht
new file mode 100644
index 0000000000..7bd499a755
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/uri-017-ref.xht
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>CSS Reftest Reference</title>
+<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"/>
+<style type="text/css">
+p {
+ color: white;
+ background: green;
+}
+</style>
+</head>
+<body>
+<p>This sentence must have a green background.</p>
+<p>This sentence must have a green background.</p>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/uri-017.xht b/testing/web-platform/tests/css/CSS2/syntax/uri-017.xht
new file mode 100644
index 0000000000..c3989a1ee6
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/uri-017.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Unclosed URI Token at EOF (in declaration)</title>
+ <link rel="author" title="Bert Bos" href="mailto:bert@w3.org"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors"/>
+ <link rel="match" href="uri-017-ref.xht"/>
+ <meta name="flags" content="invalid image" />
+ <meta name="assert" content="User agents must close open URI constructs and style rules at the end of the style sheet." />
+ <style type="text/css">
+ .import { color: red; }
+ .one { background: url("support/swatch-red.png"); color: white;
+ background: url("support/swatch-green.png</style>
+ <style type="text/css">
+ .two { background: url(support/swatch-red.png); color: white;
+ background: url(support/swatch-green.png</style>
+ </head>
+ <body>
+ <p class="one">This sentence must have a green background.</p>
+ <p class="two">This sentence must have a green background.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/uri-018.xht b/testing/web-platform/tests/css/CSS2/syntax/uri-018.xht
new file mode 100644
index 0000000000..040828b163
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/uri-018.xht
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Unclosed URI Token at EOF (in @import)</title>
+ <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors"/>
+ <link rel="match" href="../reference/ref-this-text-should-be-green.xht"/>
+ <meta name="flags" content="invalid image" />
+ <meta name="assert" content="User agents must close open URI constructs and statements at the end of the style sheet." />
+ <style type="text/css">
+ @import url(support/import-green.css</style>
+ p { color: red; }
+ </head>
+ <body>
+ <p class="import">This text should be green.</p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/syntax/whitespace-001.xht b/testing/web-platform/tests/css/CSS2/syntax/whitespace-001.xht
new file mode 100644
index 0000000000..cde16d1a14
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/whitespace-001.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: White space - em-space (U+2003)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#tokenization" />
+ <link rel="match" href="../reference/no-red-filler-text-ref.xht"/>
+ <meta name="assert" content="Em-space is not treated as white space." />
+ <style type="text/css">
+ div\2003p
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if there is no red visible on the page.</p>
+ <div>
+ <p>Filler Text</p>
+ </div>
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/syntax/whitespace-002.xht b/testing/web-platform/tests/css/CSS2/syntax/whitespace-002.xht
new file mode 100644
index 0000000000..ef0062c815
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/syntax/whitespace-002.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: White space - ideographic space (U+3000)</title>
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#tokenization" />
+ <link rel="match" href="../reference/no-red-filler-text-ref.xht"/>
+ <meta name="assert" content="Ideographic space is not treated as white space." />
+ <style type="text/css">
+ div\3000p
+ {
+ color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if there is no red visible on the page.</p>
+ <div>
+ <p>Filler Text</p>
+ </div>
+ </body>
+</html> \ No newline at end of file