4 https://bugzilla.mozilla.org/show_bug.cgi?id=387615
7 <title>Test for Bug
387615</title>
8 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css" />
10 <style type=
"text/css">
11 @namespace html url
(http://www
.w3
.org
/1999/xhtml
);
13 a
[rel
="next"] { color: green
; }
14 a
[html|rel
="next"] { color: green
; }
18 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=387615">Mozilla Bug
387615</a>
19 <p id=
"display"><a>link
</a></p>
20 <div id=
"content" style=
"display: none">
24 <script class=
"testbody" type=
"text/javascript">
26 /** Test for Bug
387615 **/
28 var htmlns =
"http://www.w3.org/1999/xhtml";
30 var a = document.getElementById(
"display").firstChild;
32 function col(elt) { return getComputedStyle(elt,
"").color; }
35 a.setAttribute(
"rel",
"next");
36 var green_cs = col(a);
37 isnot(green_cs, red_cs,
"computed values for red and green are different");
39 a.setAttribute(
"rel",
"NEXT");
40 is(col(a), green_cs,
"rel attribute should match case insensitively");
42 a.removeAttribute(
"rel");
43 a.setAttributeNS(htmlns,
"html:rel",
"next");
44 is(col(a), green_cs,
"html:rel attribute should match case-sensitively");
46 a.setAttributeNS(htmlns,
"html:rel",
"NEXT");
47 is(col(a), red_cs,
"html:rel attribute should not match case-insensitively");