Skip to content

Commit 106239c

Browse files
committed
Tests: Import some font-parsing tests
1 parent 531b92d commit 106239c

File tree

165 files changed

+5758
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

165 files changed

+5758
-0
lines changed

Tests/LibWeb/Text/expected/wpt-import/css/css-fonts/parsing/font-computed.txt

Lines changed: 321 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Harness status: OK
2+
3+
Found 6 tests
4+
5+
6 Fail
6+
Fail Check that size-adjust: 100% is valid
7+
Fail Check that size-adjust: 0% is valid
8+
Fail Check that size-adjust: 110% is valid
9+
Fail Check that size-adjust: 100000000000% is valid
10+
Fail Check that size-adjust: -100% is invalid
11+
Fail Check that size-adjust: -1% is invalid
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
Harness status: OK
2+
3+
Found 35 tests
4+
5+
35 Fail
6+
Fail Check that src: url("foo.ttf") is valid
7+
Fail Check that src: url("foo.ttf"), url("bar.ttf") is valid
8+
Fail Check that src: url("foo.ttf") format() is invalid
9+
Fail Check that src: url("foo.ttf") dummy() is invalid
10+
Fail Check that src: url("foo.ttf") format("woff") dummy() is invalid
11+
Fail Check that src: url("foo.ttf") dummy() format("woff") is invalid
12+
Fail Check that src: url("foo.ttf") format("collection") is valid
13+
Fail Check that src: url("foo.ttf") format("opentype") is valid
14+
Fail Check that src: url("foo.ttf") format("truetype") is valid
15+
Fail Check that src: url("foo.ttf") format("woff") is valid
16+
Fail Check that src: url("foo.ttf") format("woff2") is valid
17+
Fail Check that src: url("foo.ttf") format("opentype", "truetype") is invalid
18+
Fail Check that src: url("foo.ttf") format(collection) is valid
19+
Fail Check that src: url("foo.ttf") format(opentype) is valid
20+
Fail Check that src: url("foo.ttf") format(truetype) is valid
21+
Fail Check that src: url("foo.ttf") format(woff) is valid
22+
Fail Check that src: url("foo.ttf") format(woff2) is valid
23+
Fail Check that src: url("foo.ttf") format(opentype, truetype) is invalid
24+
Fail Check that src: url("foo.ttf") format(opentype truetype) is invalid
25+
Fail Check that src: url("foo.ttf") format(auto) is invalid
26+
Fail Check that src: url("foo.ttf") format(default) is invalid
27+
Fail Check that src: url("foo.ttf") format(inherit) is invalid
28+
Fail Check that src: url("foo.ttf") format(initial) is invalid
29+
Fail Check that src: url("foo.ttf") format(none) is invalid
30+
Fail Check that src: url("foo.ttf") format(normal) is invalid
31+
Fail Check that src: url("foo.ttf") format(xyzzy) is invalid
32+
Fail Check that src: url("foo.ttf") format("embedded-opentype"), url("bar.html") is valid
33+
Fail Check that src: url("foo.ttf") format(embedded-opentype), url("bar.html") is valid
34+
Fail Check that src: url("foo.ttf") format("svg"), url("bar.html") is valid
35+
Fail Check that src: url("foo.ttf") format(svg), url("bar.html") is valid
36+
Fail Check that src: url("foo.ttf") format(xyzz 200px), url("bar.html") is valid
37+
Fail Check that src: url("foo.ttf") format(xyzz), url("bar.html") is valid
38+
Fail Check that src: url("foo.ttf") dummy(xyzzy), url("bar.html") is valid
39+
Fail Check that src: url("foo.ttf") format(), url("bar.html") is valid
40+
Fail Check that src: url("foo.ttf") format(none), url("bar.html") is valid
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Harness status: OK
2+
3+
Found 17 tests
4+
5+
17 Fail
6+
Fail Check that src: local(inherit), url(foo.ttf) is valid
7+
Fail Check that src: local("myfont"), local(unset) is valid
8+
Fail Check that src: local(), url(foo.ttf) is valid
9+
Fail Check that src: local(12px monospace), url(foo.ttf) is valid
10+
Fail Check that src: local("myfont") format(opentype), url(foo.ttf) is valid
11+
Fail Check that src: url(not a valid url/bar.ttf), url(foo.ttf) is valid
12+
Fail Check that src: url(foo.ttf) format(bad), url(foo.ttf) is valid
13+
Fail Check that src: url(foo.ttf) tech(unknown), url(foo.ttf) is valid
14+
Fail Check that src: url(foo.ttf) tech(color-COLRv0) otherfunc(othervalue), url(foo.ttf) is valid
15+
Fail Check that src: url(foo.ttf), url(something.ttf) format(broken) is valid
16+
Fail Check that src: /* an empty component */, url(foo.ttf) is valid
17+
Fail Check that src: local(""), url(foo.ttf), unparseable-garbage, local("another font name") is valid
18+
Fail Check that src: local(), local(initial) is invalid
19+
Fail Check that src: local("textfont") format(opentype), local("emoji") tech(color-COLRv0) is invalid
20+
Fail Check that src: local(), /*empty*/, url(should be quoted.ttf), junk is invalid
21+
Fail Check that src: url(foo.ttf) format(unknown), url(bar.ttf) tech(broken) is invalid
22+
Fail Check that src: url(foo.ttf) tech(color-COLRv0) otherfunc(othervalue), junk is invalid
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Harness status: OK
2+
3+
Found 18 tests
4+
5+
18 Fail
6+
Fail Check that src: local(A) dummy() is invalid
7+
Fail Check that src: dummy() local(A) is invalid
8+
Fail Check that src: local( A ) is valid
9+
Fail Check that src: local(A B) is valid
10+
Fail Check that src: local(A B) is valid
11+
Fail Check that src: local( A B ) is valid
12+
Fail Check that src: local(default) is invalid
13+
Fail Check that src: local(inherit) is invalid
14+
Fail Check that src: local(revert) is invalid
15+
Fail Check that src: local(unset) is invalid
16+
Fail Check that src: local(default A) is valid
17+
Fail Check that src: local(inherit A) is valid
18+
Fail Check that src: local(revert A) is valid
19+
Fail Check that src: local(unset A) is valid
20+
Fail Check that src: local("default") is valid
21+
Fail Check that src: local("inherit") is valid
22+
Fail Check that src: local("revert") is valid
23+
Fail Check that src: local("unset") is valid
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
Harness status: OK
2+
3+
Found 39 tests
4+
5+
39 Fail
6+
Fail Check that src: url("foo.ttf") is valid
7+
Fail Check that src: url("foo.ttf") tech() is invalid
8+
Fail Check that src: url("foo.ttf") tech(features-opentype) is valid
9+
Fail Check that src: url("foo.ttf") tech(features-aat) is valid
10+
Fail Check that src: url("foo.ttf") tech(color-COLRv0) is valid
11+
Fail Check that src: url("foo.ttf") tech(color-COLRv1) is valid
12+
Fail Check that src: url("foo.ttf") tech(color-sbix) is valid
13+
Fail Check that src: url("foo.ttf") tech(color-CBDT) is valid
14+
Fail Check that src: url("foo.ttf") tech(variations) is valid
15+
Fail Check that src: url("foo.ttf") tech(palettes) is valid
16+
Fail Check that src: url("foo.ttf") tech("features-opentype") is invalid
17+
Fail Check that src: url("foo.ttf") tech("color-COLRv0") is invalid
18+
Fail Check that src: url("foo.ttf") tech("variations") is invalid
19+
Fail Check that src: url("foo.ttf") tech(features-opentype, color-COLRv0, variations, palettes) is valid
20+
Fail Check that src: url("foo.ttf") tech(features-opentype color-COLRv0 variations palettes) is invalid
21+
Fail Check that src: url("foo.ttf") tech(feature-opentype) is invalid
22+
Fail Check that src: url("foo.ttf") tech(feature-aat) is invalid
23+
Fail Check that src: url("foo.ttf") tech(feature-graphite) is invalid
24+
Fail Check that src: url("foo.ttf") tech(auto) is invalid
25+
Fail Check that src: url("foo.ttf") tech(default) is invalid
26+
Fail Check that src: url("foo.ttf") tech(inherit) is invalid
27+
Fail Check that src: url("foo.ttf") tech(initial) is invalid
28+
Fail Check that src: url("foo.ttf") tech(none) is invalid
29+
Fail Check that src: url("foo.ttf") tech(normal) is invalid
30+
Fail Check that src: url("foo.ttf") tech(xyzzy) is invalid
31+
Fail Check that src: url("foo.ttf") tech(xyzzy, features-opentype) is invalid
32+
Fail Check that src: url("foo.ttf") tech(features-opentype, xyzzy) is invalid
33+
Fail Check that src: url("foo.ttf") format(opentype) tech(features-opentype) is valid
34+
Fail Check that src: url("foo.ttf") tech(features-opentype) format(opentype) is invalid
35+
Fail Check that src: url("foo.ttf") tech(incremental), url("bar.html") is valid
36+
Fail Check that src: url("foo.ttf") tech(incremental, color-SVG, features-graphite, features-aat), url("bar.html") is valid
37+
Fail Check that src: url("foo.ttf") tech(color-SVG, features-graphite), url("bar.html") is valid
38+
Fail Check that src: url("foo.ttf") tech(color-SVG), url("bar.html") is valid
39+
Fail Check that src: url("foo.ttf") tech(features-graphite), url("bar.html") is valid
40+
Fail Check that src: url("foo.ttf") dummy("opentype") tech(variations) is invalid
41+
Fail Check that src: url("foo.ttf") dummy("opentype") dummy(variations) is invalid
42+
Fail Check that src: url("foo.ttf") format(opentype) tech(features-opentype) dummy(something) is invalid
43+
Fail Check that src: url("foo.ttf") format(dummy), url("foo.ttf") tech(variations) is valid
44+
Fail Check that src: url("foo.ttf") tech(color), url("bar.html") is valid
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Harness status: OK
2+
3+
Found 10 tests
4+
5+
10 Pass
6+
Pass Property font-family value 'serif'
7+
Pass Property font-family value 'sans-serif'
8+
Pass Property font-family value 'cursive'
9+
Pass Property font-family value 'fantasy'
10+
Pass Property font-family value 'monospace'
11+
Pass Property font-family value 'serif, sans-serif, cursive, fantasy, monospace'
12+
Pass Property font-family value 'Helvetica, Verdana, sans-serif'
13+
Pass Property font-family value '"New Century Schoolbook", serif'
14+
Pass Property font-family value '"21st Century", fantasy'
15+
Pass Property font-family value '"inherit", "serif"'
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Harness status: OK
2+
3+
Found 7 tests
4+
5+
7 Pass
6+
Pass e.style['font-family'] = "cursive serif" should not set the property value
7+
Pass e.style['font-family'] = "Red/Black, sans-serif" should not set the property value
8+
Pass e.style['font-family'] = "\"Lucida\" Grande, sans-serif" should not set the property value
9+
Pass e.style['font-family'] = "Ahem!, sans-serif" should not set the property value
10+
Pass e.style['font-family'] = "test@foo, sans-serif" should not set the property value
11+
Pass e.style['font-family'] = "#POUND, sans-serif" should not set the property value
12+
Pass e.style['font-family'] = "Hawaii 5-0, sans-serif" should not set the property value
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Harness status: OK
2+
3+
Found 11 tests
4+
5+
10 Pass
6+
1 Fail
7+
Pass e.style['font-family'] = "Serif" should set the property value
8+
Pass e.style['font-family'] = "Sans-Serif" should set the property value
9+
Pass e.style['font-family'] = "Cursive" should set the property value
10+
Pass e.style['font-family'] = "Fantasy" should set the property value
11+
Pass e.style['font-family'] = "Monospace" should set the property value
12+
Fail e.style['font-family'] = "System-UI" should set the property value
13+
Pass e.style['font-family'] = "serif, sans-serif, cursive, fantasy, monospace, system-ui" should set the property value
14+
Pass e.style['font-family'] = "Helvetica, Verdana, sans-serif" should set the property value
15+
Pass e.style['font-family'] = "\"New Century Schoolbook\", serif" should set the property value
16+
Pass e.style['font-family'] = "'21st Century', fantasy" should set the property value
17+
Pass e.style['font-family'] = "\"inherit\", \"serif\"" should set the property value
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Harness status: OK
2+
3+
Found 10 tests
4+
5+
2 Pass
6+
8 Fail
7+
Pass Property font-feature-settings value 'normal'
8+
Fail Property font-feature-settings value '"dlig"'
9+
Fail Property font-feature-settings value '"smcp"'
10+
Fail Property font-feature-settings value '"c2sc"'
11+
Pass Property font-feature-settings value '"liga" 0'
12+
Fail Property font-feature-settings value '"tnum", "hist"'
13+
Fail Property font-feature-settings value '"PKRN"'
14+
Fail Property font-feature-settings value '"dlig", "smcp", "dlig" 0'
15+
Fail Property font-feature-settings value '"liga" calc(10 + (sign(2cqw - 10px) * 5))'
16+
Fail Property font-feature-settings value '"liga" calc(10 + (sign(2cqw - 10px) * 5)), "dlig" calc(20 + (sign(2cqw - 10px) * 5))'

0 commit comments

Comments
 (0)