blob: 235fb42f701d1ad4f71fe69c777f7d751e4a4cc4 [file] [log] [blame]
<!DOCTYPE html>
<meta charset="utf-8">
<title>Forced colors mode - computed value.
Ensures that forced colors do not affect the computed style.
</title>
<link rel="help" href="https://www.w3.org/TR/css-color-adjust-1/#forced-colors-properties">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
div {
background-color: green;
}
</style>
<div id="div">
Forced colors should not affect the computed style.
</div>
<script>
const properties_to_test = [
"background-color",
];
for (let property of properties_to_test) {
test(function() {
let value = document.getElementById("div").computedStyleMap()
.get(property).toString();
assert_equals(value, "rgb(0, 128, 0)")
}, "Forced colors aren't applied at computed value time for " + property);
}
</script>