blob: f94e166b49adc3b794b3232f011214e9ba983427 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../resources/js-test.js"></script>
<style>
.b .a { background-color: red; }
</style>
<div class="b"><div class="a">You should see no red.</div></div>
<script>
description("Removing a class affected by a selector.");
document.body.offsetLeft; // force style recalc
document.getElementsByTagName("div")[1].className = "";
shouldBe("getComputedStyle(document.getElementsByTagName('div')[1], null).backgroundColor", "'rgba(0, 0, 0, 0)'");
</script>