mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Make CSSConditionRule's conditionText readonly (#30768)
As per https://github.com/w3c/csswg-drafts/issues/6819 This will be needed for https://phabricator.services.mozilla.com/D179060 The test was created by Mozilla, but was not correctly synced into WPT.
This commit is contained in:
parent
604d785bad
commit
b5bd416f7c
8 changed files with 36 additions and 98 deletions
|
@ -1,6 +1,3 @@
|
|||
[idlharness.html]
|
||||
[css-conditional IDL tests]
|
||||
expected: FAIL
|
||||
|
||||
[CSSConditionRule interface: attribute conditionText]
|
||||
expected: FAIL
|
||||
|
|
|
@ -555189,6 +555189,13 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"CSSConditionRule-conditionText.html": [
|
||||
"bccfc3135a4c80695b90638c42268f8a35d7f2fd",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"CSSContainerRule.tentative.html": [
|
||||
"4e01c0b47003a413c0853ba96011d10962ad00a5",
|
||||
[
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
[idlharness.html]
|
||||
[CSSConditionRule interface: attribute conditionText]
|
||||
expected: FAIL
|
|
@ -0,0 +1,23 @@
|
|||
<!doctype html>
|
||||
<title>CSSConditionRule.conditionText</title>
|
||||
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-conditional-3/#cssconditionrule">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
@media not all {
|
||||
:root { color: lime }
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
test(function(t) {
|
||||
let rule = document.styleSheets[0].cssRules[0];
|
||||
assert_true(rule instanceof CSSConditionRule);
|
||||
assert_equals(rule.conditionText, "not all");
|
||||
rule.conditionText = 1;
|
||||
assert_equals(rule.conditionText, "not all");
|
||||
rule.conditionText = "all";
|
||||
assert_equals(rule.conditionText, "not all");
|
||||
assert_not_equals(getComputedStyle(document.documentElement).color, "rgb(0, 255, 0)");
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue