2 <script src=
"../..//resources/js-test.js"></script>
3 <style type=
"text/css">
4 div
[attr
="caseSensitiveAttr"] {color: green
;}
5 div
[attr
="caseSensitiveATTR"] {color: blue
;}
6 div
[dir
="ltr"] {color: red
};
8 <div id=
"attr1" attr=
"caseSensitiveAttr">
9 This line should be green (attribute value is case sensitive).
11 <div id=
"attr2" attr=
"caseSensitiveATTR">
12 This line should be purple (attribute value is case sensitive).
14 <div id=
"attr3" attr=
"casesensitiveattr">
15 This line should be black (attribute value is case sensitive).
17 <div id=
"dir1" dir=
"LTR">
18 This line should be green (dir attribute is case insensitive).
20 <div id=
"dir2" dir=
"ltr">
21 This line should be green (dir attribute is case insensitive).
24 var attr1
= document
.getElementById("attr1");
25 var attr2
= document
.getElementById("attr2");
26 var attr3
= document
.getElementById("attr3");
27 var dir1
= document
.getElementById("dir1");
28 var dir2
= document
.getElementById("dir2");
31 shouldBeEqualToString("window.getComputedStyle(attr1, null).color", "rgb(0, 128, 0)");
34 shouldBeEqualToString("window.getComputedStyle(attr2, null).color", "rgb(0, 0, 255)");
37 shouldBeEqualToString("window.getComputedStyle(attr3, null).color", "rgb(0, 0, 0)");
40 shouldBeEqualToString("window.getComputedStyle(dir1, null).color", "rgb(255, 0, 0)");
43 shouldBeEqualToString("window.getComputedStyle(dir2, null).color", "rgb(255, 0, 0)");