mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
LibWeb: Import WPT tests for view-transition-name parsing
This commit is contained in:
parent
c0eb072645
commit
89f36168b7
Notes:
github-actions[bot]
2025-02-22 14:53:11 +00:00
Author: https://github.com/Psychpsyo Commit: https://github.com/LadybirdBrowser/ladybird/commit/89f36168b75 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3605 Reviewed-by: https://github.com/AtkinsSJ ✅
6 changed files with 120 additions and 0 deletions
|
@ -0,0 +1,14 @@
|
|||
Harness status: OK
|
||||
|
||||
Found 9 tests
|
||||
|
||||
9 Pass
|
||||
Pass Property view-transition-name value 'none'
|
||||
Pass Property view-transition-name value 'foo'
|
||||
Pass Property view-transition-name value 'bar'
|
||||
Pass Property view-transition-name value 'baz'
|
||||
Pass Property view-transition-name value 'unset'
|
||||
Pass Property view-transition-name value 'initial'
|
||||
Pass Property view-transition-name value 'inherit'
|
||||
Pass Property view-transition-name value 'revert'
|
||||
Pass Property view-transition-name value 'revert-layer'
|
|
@ -0,0 +1,16 @@
|
|||
Harness status: OK
|
||||
|
||||
Found 11 tests
|
||||
|
||||
11 Pass
|
||||
Pass e.style['view-transition-name'] = "default" should not set the property value
|
||||
Pass e.style['view-transition-name'] = "none none" should not set the property value
|
||||
Pass e.style['view-transition-name'] = "\"none\"" should not set the property value
|
||||
Pass e.style['view-transition-name'] = "\"foo\"" should not set the property value
|
||||
Pass e.style['view-transition-name'] = "foo foo" should not set the property value
|
||||
Pass e.style['view-transition-name'] = "bar bar" should not set the property value
|
||||
Pass e.style['view-transition-name'] = "baz baz" should not set the property value
|
||||
Pass e.style['view-transition-name'] = "#fff" should not set the property value
|
||||
Pass e.style['view-transition-name'] = "12px" should not set the property value
|
||||
Pass e.style['view-transition-name'] = "12em" should not set the property value
|
||||
Pass e.style['view-transition-name'] = "12%" should not set the property value
|
|
@ -0,0 +1,12 @@
|
|||
Harness status: OK
|
||||
|
||||
Found 6 tests
|
||||
|
||||
5 Pass
|
||||
1 Fail
|
||||
Pass e.style['view-transition-name'] = "none" should set the property value
|
||||
Fail e.style['view-transition-name'] = "auto" should set the property value
|
||||
Pass e.style['view-transition-name'] = "match-element" should set the property value
|
||||
Pass e.style['view-transition-name'] = "foo" should set the property value
|
||||
Pass e.style['view-transition-name'] = "bar" should set the property value
|
||||
Pass e.style['view-transition-name'] = "baz" should set the property value
|
|
@ -0,0 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS View Transitions: view-transition-name with computed values</title>
|
||||
<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/">
|
||||
<meta name="assert" content="view-transition-name supports custom keywords.">
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script src="../../../css/support/computed-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id=target></div>
|
||||
<script>
|
||||
test_computed_value("view-transition-name", "none");
|
||||
test_computed_value("view-transition-name", "foo");
|
||||
test_computed_value("view-transition-name", "bar");
|
||||
test_computed_value("view-transition-name", "baz");
|
||||
test_computed_value("view-transition-name", "unset", "none");
|
||||
test_computed_value("view-transition-name", "initial", "none");
|
||||
test_computed_value("view-transition-name", "inherit", "none");
|
||||
test_computed_value("view-transition-name", "revert", "none");
|
||||
test_computed_value("view-transition-name", "revert-layer", "none");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS View Transitions Test: view-transition-name with invalid values</title>
|
||||
<link rel="author" title="Tim Nguyen" href="https://github.com/nt1m">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/">
|
||||
<meta name="assert" content="view-transition-name does not support invalid values">
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script src="../../../css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_invalid_value("view-transition-name", "default"); // `default` isn't allowed by the `<custom-ident>` syntax.
|
||||
test_invalid_value("view-transition-name", "none none");
|
||||
test_invalid_value("view-transition-name", `"none"`);
|
||||
test_invalid_value("view-transition-name", `"foo"`);
|
||||
test_invalid_value("view-transition-name", "foo foo");
|
||||
test_invalid_value("view-transition-name", "bar bar");
|
||||
test_invalid_value("view-transition-name", "baz baz");
|
||||
test_invalid_value("view-transition-name", "#fff");
|
||||
test_invalid_value("view-transition-name", "12px");
|
||||
test_invalid_value("view-transition-name", "12em");
|
||||
test_invalid_value("view-transition-name", "12%");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS View Transitions Test: view-transition-name with valid values</title>
|
||||
<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/">
|
||||
<meta name="assert" content="view-transition-name supports custom tags">
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script src="../../../css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_valid_value("view-transition-name", "none");
|
||||
test_valid_value("view-transition-name", "auto");
|
||||
test_valid_value("view-transition-name", "match-element");
|
||||
test_valid_value("view-transition-name", "foo");
|
||||
test_valid_value("view-transition-name", "bar");
|
||||
test_valid_value("view-transition-name", "baz");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Reference in a new issue