Skip to content

Commit

Permalink
Re-import css/css-color-adjust WPT
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=261245
rdar://115083949

Reviewed by Tim Nguyen.

Upstream commit: web-platform-tests/wpt@f97b1df

* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/resources/resource-files.json:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/animation/color-scheme-no-interpolation-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/animation/color-scheme-no-interpolation.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/animation/forced-color-adjust-no-interpolation-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/animation/forced-color-adjust-no-interpolation.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/animation/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/support/w3c-import.log.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background-mismatch-opaque-cross-origin.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background-mismatch-used-preferred-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background-mismatch-used-preferred-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background-mismatch-used-preferred.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-preferred-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-preferred-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-preferred.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/support/prefers-color-scheme-blue-purple.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/support/w3c-import.log:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/w3c-import.log:

Canonical link: https://commits.webkit.org/267717@main
  • Loading branch information
pxlcoder committed Sep 7, 2023
1 parent c734176 commit 2998b8e
Show file tree
Hide file tree
Showing 17 changed files with 181 additions and 1 deletion.
2 changes: 2 additions & 0 deletions LayoutTests/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -4639,6 +4639,8 @@ webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/oklch-009.html
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/oklch-010.html [ ImageOnlyFailure ]
webkit.org/b/214455 imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-visited-link-initial.html [ ImageOnlyFailure ]
webkit.org/b/214455 imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-table-border-currentcolor-responsive.html [ ImageOnlyFailure ]
webkit.org/b/214455 imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background-mismatch-opaque-cross-origin.sub.html [ ImageOnlyFailure ]
webkit.org/b/214455 imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-preferred.html [ ImageOnlyFailure ]

webkit.org/b/214456 imported/w3c/web-platform-tests/css/css-images/conic-gradient-angle.html [ ImageOnlyFailure ]
webkit.org/b/214456 imported/w3c/web-platform-tests/css/css-images/conic-gradient-angle-negative.html [ ImageOnlyFailure ]
Expand Down
3 changes: 3 additions & 0 deletions LayoutTests/imported/w3c/resources/resource-files.json
Original file line number Diff line number Diff line change
Expand Up @@ -1041,13 +1041,16 @@
"web-platform-tests/css/css-backgrounds/ttwf-css3background-border-style-values.htm",
"web-platform-tests/css/css-backgrounds/ttwf-css3background-border-style.htm",
"web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-change-checkbox-notref.html",
"web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background-mismatch-used-preferred-ref.html",
"web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background-ref.html",
"web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-preferred-ref.html",
"web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-table-border-currentcolor-responsive-ref.html",
"web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-visited-link-initial-ref.html",
"web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/support/dark-frame-alpha.html",
"web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/support/dark-frame-opaque.html",
"web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/support/dark-frame-ref.html",
"web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/support/dark-frame.html",
"web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/support/prefers-color-scheme-blue-purple.html",
"web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/svg-as-image-ref.html",
"web-platform-tests/css/css-color/009900-image-ref.html",
"web-platform-tests/css/css-color/009900-tagged-image-ref.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

PASS CSS Transitions: property <color-scheme> from [initial] to [dark] at (-0.3) should be [dark]
PASS CSS Transitions: property <color-scheme> from [initial] to [dark] at (0) should be [dark]
PASS CSS Transitions: property <color-scheme> from [initial] to [dark] at (0.3) should be [dark]
PASS CSS Transitions: property <color-scheme> from [initial] to [dark] at (0.5) should be [dark]
PASS CSS Transitions: property <color-scheme> from [initial] to [dark] at (0.6) should be [dark]
PASS CSS Transitions: property <color-scheme> from [initial] to [dark] at (1) should be [dark]
PASS CSS Transitions: property <color-scheme> from [initial] to [dark] at (1.5) should be [dark]
PASS CSS Transitions with transition: all: property <color-scheme> from [initial] to [dark] at (-0.3) should be [dark]
PASS CSS Transitions with transition: all: property <color-scheme> from [initial] to [dark] at (0) should be [dark]
PASS CSS Transitions with transition: all: property <color-scheme> from [initial] to [dark] at (0.3) should be [dark]
PASS CSS Transitions with transition: all: property <color-scheme> from [initial] to [dark] at (0.5) should be [dark]
PASS CSS Transitions with transition: all: property <color-scheme> from [initial] to [dark] at (0.6) should be [dark]
PASS CSS Transitions with transition: all: property <color-scheme> from [initial] to [dark] at (1) should be [dark]
PASS CSS Transitions with transition: all: property <color-scheme> from [initial] to [dark] at (1.5) should be [dark]
PASS CSS Animations: property <color-scheme> from [initial] to [dark] at (-0.3) should be [initial]
PASS CSS Animations: property <color-scheme> from [initial] to [dark] at (0) should be [initial]
PASS CSS Animations: property <color-scheme> from [initial] to [dark] at (0.3) should be [initial]
FAIL CSS Animations: property <color-scheme> from [initial] to [dark] at (0.5) should be [dark] assert_equals: expected "dark " but got "normal "
FAIL CSS Animations: property <color-scheme> from [initial] to [dark] at (0.6) should be [dark] assert_equals: expected "dark " but got "normal "
FAIL CSS Animations: property <color-scheme> from [initial] to [dark] at (1) should be [dark] assert_equals: expected "dark " but got "normal "
FAIL CSS Animations: property <color-scheme> from [initial] to [dark] at (1.5) should be [dark] assert_equals: expected "dark " but got "normal "
PASS Web Animations: property <color-scheme> from [initial] to [dark] at (-0.3) should be [initial]
PASS Web Animations: property <color-scheme> from [initial] to [dark] at (0) should be [initial]
PASS Web Animations: property <color-scheme> from [initial] to [dark] at (0.3) should be [initial]
FAIL Web Animations: property <color-scheme> from [initial] to [dark] at (0.5) should be [dark] assert_equals: expected "dark " but got "normal "
FAIL Web Animations: property <color-scheme> from [initial] to [dark] at (0.6) should be [dark] assert_equals: expected "dark " but got "normal "
FAIL Web Animations: property <color-scheme> from [initial] to [dark] at (1) should be [dark] assert_equals: expected "dark " but got "normal "
FAIL Web Animations: property <color-scheme> from [initial] to [dark] at (1.5) should be [dark] assert_equals: expected "dark " but got "normal "

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<link rel=author href="mailto:jarhar@chromium.org">
<link rel=help href="https://github.com/w3c/csswg-drafts/issues/4441">
<link rel=help href="https://drafts.csswg.org/css-color-adjust/#color-scheme-prop">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/interpolation-testcommon.js"></script>

<body>
<script>
test_no_interpolation({
property: 'color-scheme',
from: 'initial',
to: 'dark'
});
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

FAIL CSS Transitions: property <forced-color-adjust> from [initial] to [none] at (-0.3) should be [none] assert_true: 'from' value should be supported expected true got false
FAIL CSS Transitions: property <forced-color-adjust> from [initial] to [none] at (0) should be [none] assert_true: 'from' value should be supported expected true got false
FAIL CSS Transitions: property <forced-color-adjust> from [initial] to [none] at (0.3) should be [none] assert_true: 'from' value should be supported expected true got false
FAIL CSS Transitions: property <forced-color-adjust> from [initial] to [none] at (0.5) should be [none] assert_true: 'from' value should be supported expected true got false
FAIL CSS Transitions: property <forced-color-adjust> from [initial] to [none] at (0.6) should be [none] assert_true: 'from' value should be supported expected true got false
FAIL CSS Transitions: property <forced-color-adjust> from [initial] to [none] at (1) should be [none] assert_true: 'from' value should be supported expected true got false
FAIL CSS Transitions: property <forced-color-adjust> from [initial] to [none] at (1.5) should be [none] assert_true: 'from' value should be supported expected true got false
FAIL CSS Transitions with transition: all: property <forced-color-adjust> from [initial] to [none] at (-0.3) should be [none] assert_true: 'from' value should be supported expected true got false
FAIL CSS Transitions with transition: all: property <forced-color-adjust> from [initial] to [none] at (0) should be [none] assert_true: 'from' value should be supported expected true got false
FAIL CSS Transitions with transition: all: property <forced-color-adjust> from [initial] to [none] at (0.3) should be [none] assert_true: 'from' value should be supported expected true got false
FAIL CSS Transitions with transition: all: property <forced-color-adjust> from [initial] to [none] at (0.5) should be [none] assert_true: 'from' value should be supported expected true got false
FAIL CSS Transitions with transition: all: property <forced-color-adjust> from [initial] to [none] at (0.6) should be [none] assert_true: 'from' value should be supported expected true got false
FAIL CSS Transitions with transition: all: property <forced-color-adjust> from [initial] to [none] at (1) should be [none] assert_true: 'from' value should be supported expected true got false
FAIL CSS Transitions with transition: all: property <forced-color-adjust> from [initial] to [none] at (1.5) should be [none] assert_true: 'from' value should be supported expected true got false
FAIL CSS Animations: property <forced-color-adjust> from [initial] to [none] at (-0.3) should be [initial] assert_true: 'from' value should be supported expected true got false
FAIL CSS Animations: property <forced-color-adjust> from [initial] to [none] at (0) should be [initial] assert_true: 'from' value should be supported expected true got false
FAIL CSS Animations: property <forced-color-adjust> from [initial] to [none] at (0.3) should be [initial] assert_true: 'from' value should be supported expected true got false
FAIL CSS Animations: property <forced-color-adjust> from [initial] to [none] at (0.5) should be [none] assert_true: 'from' value should be supported expected true got false
FAIL CSS Animations: property <forced-color-adjust> from [initial] to [none] at (0.6) should be [none] assert_true: 'from' value should be supported expected true got false
FAIL CSS Animations: property <forced-color-adjust> from [initial] to [none] at (1) should be [none] assert_true: 'from' value should be supported expected true got false
FAIL CSS Animations: property <forced-color-adjust> from [initial] to [none] at (1.5) should be [none] assert_true: 'from' value should be supported expected true got false
FAIL Web Animations: property <forced-color-adjust> from [initial] to [none] at (-0.3) should be [initial] assert_true: 'from' value should be supported expected true got false
FAIL Web Animations: property <forced-color-adjust> from [initial] to [none] at (0) should be [initial] assert_true: 'from' value should be supported expected true got false
FAIL Web Animations: property <forced-color-adjust> from [initial] to [none] at (0.3) should be [initial] assert_true: 'from' value should be supported expected true got false
FAIL Web Animations: property <forced-color-adjust> from [initial] to [none] at (0.5) should be [none] assert_true: 'from' value should be supported expected true got false
FAIL Web Animations: property <forced-color-adjust> from [initial] to [none] at (0.6) should be [none] assert_true: 'from' value should be supported expected true got false
FAIL Web Animations: property <forced-color-adjust> from [initial] to [none] at (1) should be [none] assert_true: 'from' value should be supported expected true got false
FAIL Web Animations: property <forced-color-adjust> from [initial] to [none] at (1.5) should be [none] assert_true: 'from' value should be supported expected true got false

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<link rel=author href="mailto:jarhar@chromium.org">
<link rel=help href="https://github.com/w3c/csswg-drafts/issues/4441">
<link rel=help href="https://drafts.csswg.org/css-color-adjust/#forced-color-adjust-prop">
<link rel=help href="https://drafts.csswg.org/css-transitions-2/#transition-property-property">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/interpolation-testcommon.js"></script>

<body>
<script>
test_no_interpolation({
property: 'forced-color-adjust',
from: 'initial',
to: 'none'
});
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
The tests in this directory were imported from the W3C repository.
Do NOT modify these tests directly in WebKit.
Instead, create a pull request on the WPT github:
https://github.com/web-platform-tests/wpt

Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport

Do NOT modify or remove this file.

------------------------------------------------------------------------
Properties requiring vendor prefixes:
None
Property values requiring vendor prefixes:
None
------------------------------------------------------------------------
List of files:
/LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/animation/color-scheme-no-interpolation.html
/LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/animation/forced-color-adjust-no-interpolation.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
display: block;
}
</style>
<iframe src="http://{{hosts[alt][]}}:{{ports[http][0]}}/css/css-color-adjust/rendering/dark-color-scheme/support/dark-frame-opaque.html"></iframe>
<iframe src="http://{{domains[www]}}:{{ports[http][0]}}/css/css-color-adjust/rendering/dark-color-scheme/support/dark-frame-opaque.html"></iframe>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<!doctype html>
<title>CSS Test Reference</title>
<div style="background-color: green; height: 150px; width: 300px"></div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<!doctype html>
<title>CSS Test Reference</title>
<div style="background-color: green; height: 150px; width: 300px"></div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!doctype html>
<meta charset="utf-8">
<title>Used (not preferred) color-scheme is used for iframe backplate decisions</title>
<link rel="help" href="https://drafts.csswg.org/css-color-adjust/#color-scheme-effect">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1787127">
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="author" title="Mozilla" href="https://mozilla.org">
<link rel="match" href="color-scheme-iframe-background-mismatch-used-preferred-ref.html">
<iframe frameborder=0 scrolling=no style="color-scheme: dark" srcdoc="<style>:root { background-color: green }</style><iframe frameborder=0 srcdoc=&quot;<font color=green>This text should <em>not</em> be visible</font>&quot;></iframe>">
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!doctype html>
<title>CSS Test Reference</title>
<style>
div {
width: 100px;
height: 100px;
}
</style>
<div style="background-color: purple"></div>
<div style="background-color: blue"></div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!doctype html>
<title>CSS Test Reference</title>
<style>
div {
width: 100px;
height: 100px;
}
</style>
<div style="background-color: purple"></div>
<div style="background-color: blue"></div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!doctype html>
<title>prefers-color-scheme propagation</title>
<link rel="help" href="https://drafts.csswg.org/css-color-adjust/#color-scheme-effect">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/4772">
<link rel="match" href="color-scheme-iframe-preferred-ref.html">
<style>
iframe {
display: block;
border: none;
width: 100px;
height: 100px;
}
</style>
<iframe style="color-scheme: dark" src="support/prefers-color-scheme-blue-purple.html"></iframe>
<iframe style="color-scheme: light" src="support/prefers-color-scheme-blue-purple.html"></iframe>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!doctype html>
<style>
:root { background-color: blue }
@media (prefers-color-scheme: dark) {
:root { background-color: purple }
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ List of files:
/LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/support/dark-frame-opaque.html
/LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/support/dark-frame-ref.html
/LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/support/dark-frame.html
/LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/support/prefers-color-scheme-blue-purple.html
/LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/support/prefers-color-scheme.svg
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,14 @@ List of files:
/LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background-mismatch-opaque-cross-origin.sub.html
/LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background-mismatch-opaque-expected.html
/LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background-mismatch-opaque.html
/LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background-mismatch-used-preferred-expected.html
/LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background-mismatch-used-preferred-ref.html
/LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background-mismatch-used-preferred.html
/LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background-ref.html
/LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background.html
/LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-preferred-expected.html
/LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-preferred-ref.html
/LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-preferred.html
/LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-root-background.html
/LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-system-colors.html
/LayoutTests/imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-table-border-currentcolor-responsive-expected.html
Expand Down

0 comments on commit 2998b8e

Please sign in to comment.