blob: 74a177e8bf7efbc824582a02971f7300b99d09e8 [file] [log] [blame]
<!DOCTYPE html>
<style>
#test3 { color: blue; }
</style>
<div id="test-container">
<div id="test1" style="color:green; background: currentColor"></div>
<div id="test2" style="color:red; background: currentColor"></div>
<div style="color:green">
<div id="test3" style="color:currentColor; background: currentColor"></div>
</div>
</div>
<script src="../../resources/js-test-pre.js"></script>
<script>
description('Test that background-color is non-inherit and currentColor is handled correctly.');
var test1 = document.getElementById("test1");
var test2 = document.getElementById("test2");
var test3 = document.getElementById("test3");
test2.style.color = "green";
shouldBeEqualToString('getComputedStyle(test1).backgroundColor', 'rgb(0, 128, 0)');
shouldBeEqualToString('getComputedStyle(test2).backgroundColor', 'rgb(0, 128, 0)');
shouldBeEqualToString('getComputedStyle(test3).backgroundColor', 'rgb(0, 128, 0)');
</script>
<script src="../../resources/js-test-post.js"></script>