summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/dom/css-inline-style-important.html
blob: 2b606ff1015a1afc2540c041fc7df36313abd60c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="../../resources/js-test.js"></script>
<style type="text/css">
#e { color:red; visibility: hidden;}
</style>
</head>
<body>
<p id="e">This is the test element.</p>
<script>

description("This test checks to see whether setting a CSS value including !important on an inline style property fails (as it should).");

var e = document.getElementById('e');
e.style.color = "green !important";

shouldBe('window.getComputedStyle(e).color', '"rgb(255, 0, 0)"');

</script>
</body>
</html>