-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[css-anchor-position-1] Import Web Platform Tests
https://bugs.webkit.org/show_bug.cgi?id=274926 rdar://129025250 Reviewed by Ryan Reno, Matthieu Dubet and Sammy Gill. Import CSS anchor positioning WPT. Upstream commit: web-platform-tests/wpt@c426a43 * LayoutTests/TestExpectations: * LayoutTests/imported/w3c/resources/import-expectations.json: * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/ Canonical link: https://commits.webkit.org/279590@main
- Loading branch information
1 parent
b91c02d
commit 452498e
Showing
527 changed files
with
31,491 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/WEB_FEATURES.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
features: | ||
- name: anchor-positioning | ||
files: "**" |
10 changes: 10 additions & 0 deletions
10
...ts/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-center-001-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
FAIL e.style['align-self'] = "anchor-center" should set the property value assert_not_equals: property should be set got disallowed value "" | ||
FAIL e.style['align-items'] = "anchor-center" should set the property value assert_not_equals: property should be set got disallowed value "" | ||
FAIL e.style['justify-self'] = "anchor-center" should set the property value assert_not_equals: property should be set got disallowed value "" | ||
FAIL e.style['justify-items'] = "anchor-center" should set the property value assert_not_equals: property should be set got disallowed value "" | ||
FAIL Property align-self value 'anchor-center' assert_true: 'anchor-center' is a supported value for align-self. expected true got false | ||
FAIL Property align-items value 'anchor-center' assert_true: 'anchor-center' is a supported value for align-items. expected true got false | ||
FAIL Property justify-self value 'anchor-center' assert_true: 'anchor-center' is a supported value for justify-self. expected true got false | ||
FAIL Property justify-items value 'anchor-center' assert_true: 'anchor-center' is a supported value for justify-items. expected true got false | ||
|
24 changes: 24 additions & 0 deletions
24
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-center-001.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!DOCTYPE html> | ||
<title>Tests the anchor-center keyword is parsed and computed as specified</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/#anchor-center"> | ||
<link rel="author" href="mailto:xiaochengh@chromium.org"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/css/support/parsing-testcommon.js"></script> | ||
<script src="/css/support/computed-testcommon.js"></script> | ||
|
||
<div id="container"> | ||
<div id="target"></div> | ||
</div> | ||
|
||
<script> | ||
test_valid_value('align-self', 'anchor-center'); | ||
test_valid_value('align-items', 'anchor-center'); | ||
test_valid_value('justify-self', 'anchor-center'); | ||
test_valid_value('justify-items', 'anchor-center'); | ||
|
||
test_computed_value('align-self', 'anchor-center'); | ||
test_computed_value('align-items', 'anchor-center'); | ||
test_computed_value('justify-self', 'anchor-center'); | ||
test_computed_value('justify-items', 'anchor-center'); | ||
</script> |
49 changes: 49 additions & 0 deletions
49
...s/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-center-002-expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<!DOCTYPE html> | ||
<title>Tests that 'anchor-center' behaves as 'center' in non-OOF layout modes</title> | ||
|
||
<style> | ||
.container { | ||
width: 100px; | ||
height: 100px; | ||
background: orange; | ||
margin-block: 5px; | ||
} | ||
|
||
.item { | ||
width: 40px; | ||
height: 40px; | ||
background: lime; | ||
} | ||
|
||
.flex { | ||
display: flex; | ||
} | ||
|
||
.grid { | ||
display: grid; | ||
grid-template-columns: repeat(8, 1fr); | ||
grid-auto-rows: 50px; | ||
grid-template-areas: | ||
"a a a a b b b b" | ||
"a a a a b b b b"; | ||
} | ||
</style> | ||
|
||
<div class="flex container" style="align-items: center"> | ||
<div class="item"></div> | ||
</div> | ||
|
||
<div class="flex container"> | ||
<div class="item" style="align-self: center"></div> | ||
</div> | ||
|
||
<div class="grid container" | ||
style="align-items: center; justify-items: center"> | ||
<div class="item" style="grid-area: a"></div> | ||
<div class="item" style="grid-area: b"></div> | ||
</div> | ||
|
||
<div class="grid container"> | ||
<div class="item" style="grid-area: a; align-self: center"></div> | ||
<div class="item" style="grid-area: b; justify-self: center"></div> | ||
</div> |
49 changes: 49 additions & 0 deletions
49
...tTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-center-002-ref.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<!DOCTYPE html> | ||
<title>Tests that 'anchor-center' behaves as 'center' in non-OOF layout modes</title> | ||
|
||
<style> | ||
.container { | ||
width: 100px; | ||
height: 100px; | ||
background: orange; | ||
margin-block: 5px; | ||
} | ||
|
||
.item { | ||
width: 40px; | ||
height: 40px; | ||
background: lime; | ||
} | ||
|
||
.flex { | ||
display: flex; | ||
} | ||
|
||
.grid { | ||
display: grid; | ||
grid-template-columns: repeat(8, 1fr); | ||
grid-auto-rows: 50px; | ||
grid-template-areas: | ||
"a a a a b b b b" | ||
"a a a a b b b b"; | ||
} | ||
</style> | ||
|
||
<div class="flex container" style="align-items: center"> | ||
<div class="item"></div> | ||
</div> | ||
|
||
<div class="flex container"> | ||
<div class="item" style="align-self: center"></div> | ||
</div> | ||
|
||
<div class="grid container" | ||
style="align-items: center; justify-items: center"> | ||
<div class="item" style="grid-area: a"></div> | ||
<div class="item" style="grid-area: b"></div> | ||
</div> | ||
|
||
<div class="grid container"> | ||
<div class="item" style="grid-area: a; align-self: center"></div> | ||
<div class="item" style="grid-area: b; justify-self: center"></div> | ||
</div> |
52 changes: 52 additions & 0 deletions
52
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-center-002.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<!DOCTYPE html> | ||
<title>Tests that 'anchor-center' behaves as 'center' in non-OOF layout modes</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/#anchor-center"> | ||
<link rel="match" href="anchor-center-002-ref.html"> | ||
<link rel="author" href="mailto:xiaochengh@chromium.org"> | ||
|
||
<style> | ||
.container { | ||
width: 100px; | ||
height: 100px; | ||
background: orange; | ||
margin-block: 5px; | ||
} | ||
|
||
.item { | ||
width: 40px; | ||
height: 40px; | ||
background: lime; | ||
} | ||
|
||
.flex { | ||
display: flex; | ||
} | ||
|
||
.grid { | ||
display: grid; | ||
grid-template-columns: repeat(8, 1fr); | ||
grid-auto-rows: 50px; | ||
grid-template-areas: | ||
"a a a a b b b b" | ||
"a a a a b b b b"; | ||
} | ||
</style> | ||
|
||
<div class="flex container" style="align-items: anchor-center"> | ||
<div class="item"></div> | ||
</div> | ||
|
||
<div class="flex container"> | ||
<div class="item" style="align-self: anchor-center"></div> | ||
</div> | ||
|
||
<div class="grid container" | ||
style="align-items: anchor-center; justify-items: anchor-center"> | ||
<div class="item" style="grid-area: a"></div> | ||
<div class="item" style="grid-area: b"></div> | ||
</div> | ||
|
||
<div class="grid container"> | ||
<div class="item" style="grid-area: a; align-self: center"></div> | ||
<div class="item" style="grid-area: b; justify-self: center"></div> | ||
</div> |
45 changes: 45 additions & 0 deletions
45
...mported/w3c/web-platform-tests/css/css-anchor-position/anchor-center-htb-htb-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
|
||
FAIL .target 1 assert_equals: | ||
<div class="container"> | ||
<div class="anchor"></div> | ||
<div class="target" data-expected-width="70" data-offset-x="30"></div> | ||
</div> | ||
width expected 70 but got 100 | ||
FAIL .target 2 assert_equals: | ||
<div class="container"> | ||
<div class="anchor"></div> | ||
<div class="target" style="left: 20px;" data-expected-width="70" data-offset-x="30"></div> | ||
</div> | ||
width expected 70 but got 80 | ||
FAIL .target 3 assert_equals: | ||
<div class="container"> | ||
<div class="anchor"></div> | ||
<div class="target" style="right: 20px;" data-expected-width="30" data-offset-x="50"></div> | ||
</div> | ||
width expected 30 but got 80 | ||
FAIL .target 4 assert_equals: | ||
<div class="container"> | ||
<div class="anchor"></div> | ||
<div class="target" style="right: -20px;" data-expected-width="110" data-offset-x="10"></div> | ||
</div> | ||
width expected 110 but got 120 | ||
FAIL .target 5 assert_equals: | ||
<div class="container"> | ||
<div class="anchor"></div> | ||
<div class="target" style="right: -100px;" data-expected-width="130" data-offset-x="0"></div> | ||
</div> | ||
width expected 130 but got 196 | ||
FAIL .target 6 assert_equals: | ||
<div class="container"> | ||
<div class="anchor"></div> | ||
<div class="target" style="left: 10px; right: 20px;" data-expected-width="30" data-offset-x="50"></div> | ||
</div> | ||
width expected 30 but got 70 | ||
PASS .target 7 | ||
FAIL .target 8 assert_equals: | ||
<div class="container"> | ||
<div class="anchor"></div> | ||
<div class="target" style="left: -10px; right: -50px;" data-expected-width="150" data-offset-x="-10"></div> | ||
</div> | ||
width expected 150 but got 160 | ||
|
Oops, something went wrong.