forked from web-platform-tests/wpt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[carousel] Move Carousel parsing tests to WPT
As the spec for it is mature enough and passed a few reviews, not making them .tentative. Bug: 332396355 Change-Id: I861ee742070bf8d3e6c349e850f2abb67dd1dc71 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6097954 Commit-Queue: Daniil Sakhapov <sakhapov@chromium.org> Reviewed-by: Rune Lillesveen <futhark@chromium.org> Cr-Commit-Position: refs/heads/main@{#1397241}
- Loading branch information
1 parent
09eacd6
commit 40d8fc6
Showing
5 changed files
with
132 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
css/css-overflow/parsing/parsing/scroll-buttons-invalid.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,18 @@ | ||
<!doctype html> | ||
<meta charset="utf-8"> | ||
<title>CSS Overflow Test: ::scroll-button() invalid tests</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-buttons"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/css/support/parsing-testcommon.js"></script> | ||
<script> | ||
test_invalid_selector('::scroll-button'); | ||
test_invalid_selector('::scroll-button)'); | ||
test_invalid_selector('::scroll-button('); | ||
test_invalid_selector('::scroll-button()'); | ||
test_invalid_selector('::scroll-button(*)'); | ||
test_invalid_selector('::scroll-button(\'up\')'); | ||
test_invalid_selector('::scroll-button(up, down)'); | ||
test_invalid_selector('::scroll-button(north)'); | ||
test_invalid_selector('::scroll-button(5051)'); | ||
</script> |
47 changes: 47 additions & 0 deletions
47
css/css-overflow/parsing/parsing/scroll-buttons-valid.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,47 @@ | ||
<!doctype html> | ||
<meta charset="utf-8"> | ||
<title>CSS Overflow Test: ::scroll-button() valid tests</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-buttons"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/css/support/parsing-testcommon.js"></script> | ||
<script> | ||
test_valid_selector('::scroll-button(up)'); | ||
test_valid_selector('::scroll-button(down)'); | ||
test_valid_selector('::scroll-button(left)'); | ||
test_valid_selector('::scroll-button(right)'); | ||
test_valid_selector('::scroll-button(block-start)'); | ||
test_valid_selector('::scroll-button(inline-start)'); | ||
test_valid_selector('::scroll-button(inline-end)'); | ||
test_valid_selector('::scroll-button(block-end)'); | ||
|
||
// :focus | ||
test_valid_selector('::scroll-button(up):focus'); | ||
test_valid_selector('::scroll-button(down):focus'); | ||
test_valid_selector('::scroll-button(left):focus'); | ||
test_valid_selector('::scroll-button(right):focus'); | ||
test_valid_selector('::scroll-button(block-start):focus'); | ||
test_valid_selector('::scroll-button(inline-start):focus'); | ||
test_valid_selector('::scroll-button(inline-end):focus'); | ||
test_valid_selector('::scroll-button(block-end):focus'); | ||
|
||
// :disabled | ||
test_valid_selector('::scroll-button(up):disabled'); | ||
test_valid_selector('::scroll-button(down):disabled'); | ||
test_valid_selector('::scroll-button(left):disabled'); | ||
test_valid_selector('::scroll-button(right):disabled'); | ||
test_valid_selector('::scroll-button(block-start):disabled'); | ||
test_valid_selector('::scroll-button(inline-start):disabled'); | ||
test_valid_selector('::scroll-button(inline-end):disabled'); | ||
test_valid_selector('::scroll-button(block-end):disabled'); | ||
|
||
// :enabled | ||
test_valid_selector('::scroll-button(up):enabled'); | ||
test_valid_selector('::scroll-button(down):enabled'); | ||
test_valid_selector('::scroll-button(left):enabled'); | ||
test_valid_selector('::scroll-button(right):enabled'); | ||
test_valid_selector('::scroll-button(block-start):enabled'); | ||
test_valid_selector('::scroll-button(inline-start):enabled'); | ||
test_valid_selector('::scroll-button(inline-end):enabled'); | ||
test_valid_selector('::scroll-button(block-end):enabled'); | ||
</script> |
34 changes: 34 additions & 0 deletions
34
css/css-overflow/parsing/parsing/scroll-markers-computed.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,34 @@ | ||
<!doctype html> | ||
<meta charset="utf-8"> | ||
<title>CSS Overflow: scroll-marker-group computed values</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-marker-group-property"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/css/support/computed-testcommon.js"></script> | ||
<style> | ||
#target { | ||
scroll-marker-group: before; | ||
} | ||
</style> | ||
<div id="target"></div> | ||
<script> | ||
test_computed_value('scroll-marker-group', 'initial', 'none'); | ||
test_computed_value('scroll-marker-group', 'inherit', 'none'); | ||
test_computed_value('scroll-marker-group', 'unset', 'none'); | ||
test_computed_value('scroll-marker-group', 'revert', 'none'); | ||
|
||
test_computed_value('scroll-marker-group', 'none'); | ||
test_computed_value('scroll-marker-group', 'before'); | ||
test_computed_value('scroll-marker-group', 'after'); | ||
|
||
test(() => { | ||
let style = getComputedStyle(document.getElementById('target')); | ||
assert_not_equals(Array.from(style).indexOf('scroll-marker-group'), -1); | ||
}, 'The scroll-marker-group property shows up in CSSStyleDeclaration enumeration'); | ||
|
||
test(() => { | ||
let style = document.getElementById('target').style; | ||
assert_not_equals(style.cssText.indexOf('scroll-marker-group'), -1); | ||
}, 'The scroll-marker-group property shows up in CSSStyleDeclaration.cssText'); | ||
|
||
</script> |
15 changes: 15 additions & 0 deletions
15
css/css-overflow/parsing/parsing/scroll-markers-invalid.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,15 @@ | ||
<!doctype html> | ||
<meta charset="utf-8"> | ||
<title>CSS Overflow: parsing scroll-marker-group with invalid values</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-marker-group-property"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/css/support/parsing-testcommon.js"></script> | ||
<div id="target"></div> | ||
<script> | ||
test_invalid_value('scroll-marker-group', '10'); | ||
test_invalid_value('scroll-marker-group', 'true'); | ||
test_invalid_value('scroll-marker-group', 'default'); | ||
test_invalid_value('scroll-marker-group', 'set'); | ||
test_invalid_value('scroll-marker-group', 'before, after'); | ||
</script> |
18 changes: 18 additions & 0 deletions
18
css/css-overflow/parsing/parsing/scroll-markers-valid.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,18 @@ | ||
<!doctype html> | ||
<meta charset="utf-8"> | ||
<title>CSS Overflow: parsing scroll-marker-group with valid values</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-marker-group-property"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/css/support/parsing-testcommon.js"></script> | ||
<div id="target"></div> | ||
<script> | ||
test_valid_value('scroll-marker-group', 'initial'); | ||
test_valid_value('scroll-marker-group', 'inherit'); | ||
test_valid_value('scroll-marker-group', 'unset'); | ||
test_valid_value('scroll-marker-group', 'revert'); | ||
|
||
test_valid_value("scroll-marker-group", "none"); | ||
test_valid_value("scroll-marker-group", "before"); | ||
test_valid_value("scroll-marker-group", "after"); | ||
</script> |