From 7a52f142909447a7e3c878edb1d804d58635a95d Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Mon, 16 Mar 2020 12:06:16 +0000 Subject: [PATCH] Bug 1621899 [wpt PR 22213] - Add tests for color-scheme and iframes., a=testonly Automatic update from web-platform-tests Add tests for color-scheme and iframes. Iframes where the color-scheme of the iframe element and the iframe document's root does not match, will get a backdrop matching the color- scheme of the iframe's root element. Also adjust existing test according to spec change. See: https://github.com/w3c/csswg-drafts/issues/4772 Bug: 1058822 Change-Id: I82fd3cc3c2bbf5b4835b157a7522cb22c459ff20 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2095112 Reviewed-by: Anders Hartvoll Ruud Commit-Queue: Rune Lillesveen Cr-Commit-Position: refs/heads/master{#750186} -- wpt-commits: 348adc5c7b2e3abb76763af063fbd921afb99ac5 wpt-pr: 22213 UltraBlame original commit: e0db51ee811dc6abb6d0897bbbf56a8ed8fdb1f0 --- ...heme-iframe-background-mismatch-alpha.html | 20 +++++++++++++++++++ ...eme-iframe-background-mismatch-opaque.html | 20 +++++++++++++++++++ .../color-scheme-iframe-background.html | 6 +++--- .../support/dark-frame-alpha.html | 9 +++++++++ .../support/dark-frame-opaque.html | 6 ++++++ 5 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 testing/web-platform/tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background-mismatch-alpha.html create mode 100644 testing/web-platform/tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background-mismatch-opaque.html create mode 100644 testing/web-platform/tests/css/css-color-adjust/rendering/dark-color-scheme/support/dark-frame-alpha.html create mode 100644 testing/web-platform/tests/css/css-color-adjust/rendering/dark-color-scheme/support/dark-frame-opaque.html diff --git a/testing/web-platform/tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background-mismatch-alpha.html b/testing/web-platform/tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background-mismatch-alpha.html new file mode 100644 index 0000000000000..26c58198c46b0 --- /dev/null +++ b/testing/web-platform/tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background-mismatch-alpha.html @@ -0,0 +1,20 @@ + +CSS Color Adjustment Test: iframe element with light color-scheme, frame document with dark color-scheme, :root background with alpha + + + + + diff --git a/testing/web-platform/tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background-mismatch-opaque.html b/testing/web-platform/tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background-mismatch-opaque.html new file mode 100644 index 0000000000000..9e39c0b827699 --- /dev/null +++ b/testing/web-platform/tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background-mismatch-opaque.html @@ -0,0 +1,20 @@ + +CSS Color Adjustment Test: Frames with a dark color-scheme should get an opaque background when embedding element and embedded root color-schemes do not match + + + + + diff --git a/testing/web-platform/tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background.html b/testing/web-platform/tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background.html index ee0f006b5b257..591044f61803b 100644 --- a/testing/web-platform/tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background.html +++ b/testing/web-platform/tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background.html @@ -1,6 +1,6 @@ -CSS Color Adjustment Test: Frames with a dark color-scheme should still be transparent - +CSS Color Adjustment Test: Frames with a dark color-scheme should still be transparent when embedding element and embedded root color-schemes match + - + diff --git a/testing/web-platform/tests/css/css-color-adjust/rendering/dark-color-scheme/support/dark-frame-alpha.html b/testing/web-platform/tests/css/css-color-adjust/rendering/dark-color-scheme/support/dark-frame-alpha.html new file mode 100644 index 0000000000000..cb5e6d66917e4 --- /dev/null +++ b/testing/web-platform/tests/css/css-color-adjust/rendering/dark-color-scheme/support/dark-frame-alpha.html @@ -0,0 +1,9 @@ + + +

This text should be lime and the background should be green blended with a dark canvas.

diff --git a/testing/web-platform/tests/css/css-color-adjust/rendering/dark-color-scheme/support/dark-frame-opaque.html b/testing/web-platform/tests/css/css-color-adjust/rendering/dark-color-scheme/support/dark-frame-opaque.html new file mode 100644 index 0000000000000..ca845ea13ce1f --- /dev/null +++ b/testing/web-platform/tests/css/css-color-adjust/rendering/dark-color-scheme/support/dark-frame-opaque.html @@ -0,0 +1,6 @@ + + +

This text should be green and the background should be dark opaque.