mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-25 19:25:43 +00:00
Bug 1470698 [wpt PR 11644] - Revert "[CSS Env Vars] Add some WPT tests", a=testonly
Automatic update from web-platform-testsRevert "[CSS Env Vars] Add some WPT tests" This reverts commit 981a543f9e743001a6e492a006873de3a5953747. Reason for revert: These tests have been failing since they were added: https://ci.chromium.org/buildbot/chromium.webkit/WebKit%20Linux%20Trusty%20Leak/20683 Original change's description: > [CSS Env Vars] Add some WPT tests > > Adds some WPT tests to test env() with @supports as well > as fallback values. > > BUG=825890 > > Change-Id: I071f5c2582f8056fe39b4a50ab62140d579c577d > Reviewed-on: https://chromium-review.googlesource.com/1111023 > Reviewed-by: Rune Lillesveen <futhark@chromium.org> > Reviewed-by: Mounir Lamouri <mlamouri@chromium.org> > Commit-Queue: Becca Hughes <beccahughes@chromium.org> > Cr-Commit-Position: refs/heads/master@{#569852} TBR=mlamouri@chromium.org,beccahughes@chromium.org,futhark@chromium.org Change-Id: I32fbe3682558bdd2d117c8f647750e5d8bcbf740 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 825890 Reviewed-on: https://chromium-review.googlesource.com/1112982 Reviewed-by: Nico Weber <thakis@chromium.org> Commit-Queue: Nico Weber <thakis@chromium.org> Cr-Commit-Position: refs/heads/master@{#569916} -- wpt-commits: 86e620c08f3956329c311fddff60055d80778603 wpt-pr: 11644
This commit is contained in:
parent
908b7084c9
commit
ca72fe3cb7
@ -317373,48 +317373,6 @@
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-env/at-supports.tentative.html": [
|
||||
[
|
||||
"/css/css-env/at-supports.tentative.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-env/env-in-custom-properties.tentative.html": [
|
||||
[
|
||||
"/css/css-env/env-in-custom-properties.tentative.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-env/fallback-nested-var.tentative.html": [
|
||||
[
|
||||
"/css/css-env/fallback-nested-var.tentative.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-env/seralization-round-tripping.tentative.html": [
|
||||
[
|
||||
"/css/css-env/seralization-round-tripping.tentative.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-env/supports-script.tentative.html": [
|
||||
[
|
||||
"/css/css-env/supports-script.tentative.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-env/syntax.tentative.html": [
|
||||
[
|
||||
"/css/css-env/syntax.tentative.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-env/unknown-env-names-override-previous.tentative.html": [
|
||||
[
|
||||
"/css/css-env/unknown-env-names-override-previous.tentative.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-exclusions/wrap-flow-001.html": [
|
||||
[
|
||||
"/css/css-exclusions/wrap-flow-001.html",
|
||||
@ -508346,34 +508304,6 @@
|
||||
"f9699f59878f869cf0eb62d6b46ff118f6abfcf3",
|
||||
"support"
|
||||
],
|
||||
"css/css-env/at-supports.tentative.html": [
|
||||
"a93a3fe4ce531b5693060c3bb3c1c340a25ea490",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-env/env-in-custom-properties.tentative.html": [
|
||||
"e7d3162835077f4698231a3a7466bcbcc31084cb",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-env/fallback-nested-var.tentative.html": [
|
||||
"f88369824b722bc13d942fd86b9ef9a175e9ffe1",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-env/seralization-round-tripping.tentative.html": [
|
||||
"d59add04498132c8db14fcc4b2bafdb33cffd6b1",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-env/supports-script.tentative.html": [
|
||||
"8c2359decb8377ac80ef296dd303f03e2f7fd3a9",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-env/syntax.tentative.html": [
|
||||
"47d940df02d19a4f8b66767bf646b4bce5de120f",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-env/unknown-env-names-override-previous.tentative.html": [
|
||||
"46996cb158a0077db59425c5c72ac7a9396833d9",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-exclusions/META.yml": [
|
||||
"3ce5754412de34748eedf62d4c86b59326b80927",
|
||||
"support"
|
||||
|
@ -1,22 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-env-1/">
|
||||
<title>Test that CSS env vars work with @support</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
@supports (background-color: env(test)) {
|
||||
body { background-color: rgb(0, 128, 0); }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test(() => {
|
||||
const style = window.getComputedStyle(document.body);
|
||||
assert_equals(style.getPropertyValue("background-color"), "rgb(0, 128, 0)");
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -1,23 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-env-1/">
|
||||
<title>Test env() will work in custom properties</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
body {
|
||||
--my-width: env(test, 100px);
|
||||
width: var(--my-width);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test(() => {
|
||||
const style = window.getComputedStyle(document.body);
|
||||
assert_equals(style.getPropertyValue("width"), "100px");
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -1,23 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-env-1/">
|
||||
<title>Test that nested var() fallback values work with CSS env vars</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
body {
|
||||
--main-bg-color: rgb(0, 128, 0);
|
||||
background-color: env(test, var(--main-bg-color));
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test(() => {
|
||||
const style = window.getComputedStyle(document.body);
|
||||
assert_equals(style.getPropertyValue("background-color"), "rgb(0, 128, 0)");
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -1,19 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-env-1/">
|
||||
<title>Test style seralization round tripping with CSS env vars</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test(() => {
|
||||
document.body.style.top = "env(test)";
|
||||
assert_equals(document.body.style.getPropertyValue("top"), "env(test)");
|
||||
document.body.style.setProperty("top", "env()");
|
||||
assert_equals(document.body.style.getPropertyValue("top"), "env(test)");
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -1,19 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-env-1/">
|
||||
<title>Test that CSS env vars work with CSS.supports</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test(() => {
|
||||
assert_true(CSS.supports("background: env(test)"));
|
||||
assert_true(CSS.supports("background", "env(test)"));
|
||||
assert_false(CSS.supports("background", "env()"));
|
||||
assert_false(CSS.supports("background", "env(test,)"));
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -1,57 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-env-1/">
|
||||
<title>Test env() syntax</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
div { background-color: rgb(0, 128, 0); }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
// This value is expected if the syntax is valid.
|
||||
const envWorkingValue = "rgba(0, 0, 0, 0)";
|
||||
|
||||
// This value is expected if the syntax is invalid.
|
||||
const pageDefaultValue = "rgb(0, 128, 0)";
|
||||
|
||||
// This value is used to test fallback values.
|
||||
const blueValue = "rgb(0, 0, 255)";
|
||||
|
||||
const testCases = [
|
||||
{ style: "", expectedPropertyValue: pageDefaultValue },
|
||||
{ style: "background-color: env(test)", expectedPropertyValue: envWorkingValue },
|
||||
{ style: "background-color: ENV(test)", expectedPropertyValue: envWorkingValue },
|
||||
{ style: "background-color: env(test) !important", expectedPropertyValue: envWorkingValue },
|
||||
{ style: "background-color: env(test, 10px)", expectedPropertyValue: envWorkingValue },
|
||||
{ style: "background-color: env(test, blue)", expectedPropertyValue: blueValue },
|
||||
{ style: "background-color: env(test, env(another))", expectedPropertyValue: envWorkingValue },
|
||||
{ style: "background-color: env(test, env(another, blue))", expectedPropertyValue: blueValue },
|
||||
{ style: "background-color: env(-test)", expectedPropertyValue: envWorkingValue },
|
||||
{ style: "background-color: env(--test)", expectedPropertyValue: envWorkingValue },
|
||||
{ style: "background-color: env(10px)", expectedPropertyValue: pageDefaultValue },
|
||||
{ style: "background-color: env(env(test))", expectedPropertyValue: pageDefaultValue },
|
||||
{ style: "background-color: env( test)", expectedPropertyValue: envWorkingValue },
|
||||
{ style: "background-color: env(test )", expectedPropertyValue: envWorkingValue },
|
||||
{ style: "background-color: env( test )", expectedPropertyValue: envWorkingValue },
|
||||
{ style: "background-color: env(test /**/, blue)", expectedPropertyValue: blueValue },
|
||||
{ style: "background-color: env(test, {})", expectedPropertyValue: envWorkingValue },
|
||||
{ style: "background-color: env(test, {)", expectedPropertyValue: pageDefaultValue },
|
||||
];
|
||||
|
||||
testCases.forEach((testcase) => {
|
||||
test(() => {
|
||||
const elem = document.createElement("div");
|
||||
const style = window.getComputedStyle(elem);
|
||||
|
||||
document.body.appendChild(elem);
|
||||
elem.style.cssText = testcase.style;
|
||||
|
||||
assert_equals(style.getPropertyValue("background-color"), testcase.expectedPropertyValue);
|
||||
}, testcase.style + " " + testcase.expectedPropertyValue);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -1,17 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-env-1/">
|
||||
<title>Test unknown env() names will override previous values</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body style="background-color: green; background-color: env(unknown);">
|
||||
<script>
|
||||
test(() => {
|
||||
const style = window.getComputedStyle(document.body);
|
||||
assert_equals(style.getPropertyValue("background-color"), "rgba(0, 0, 0, 0)");
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user