Bug 460926 A11y hierachy is broken on Ubuntu 8.10 (GNOME 2.24), r=Evan.Yan sr=roc
[wine-gecko.git] / layout / style / test / test_bug387615.html
blob10ee803e6865635f490b99b6b3fe35aac1a8af88
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=387615
5 -->
6 <head>
7 <title>Test for Bug 387615</title>
8 <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
9 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
11 <style type="text/css">
12 @namespace html url(http://www.w3.org/1999/xhtml);
13 a { color: red; }
14 a[rel="next"] { color: green; }
15 a[html|rel="next"] { color: green; }
16 </style>
17 </head>
18 <body>
19 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=387615">Mozilla Bug 387615</a>
20 <p id="display"><a>link</a></p>
21 <div id="content" style="display: none">
23 </div>
24 <pre id="test">
25 <script class="testbody" type="text/javascript">
27 /** Test for Bug 387615 **/
29 var htmlns = "http://www.w3.org/1999/xhtml";
31 var a = document.getElementById("display").firstChild;
33 function col(elt) { return getComputedStyle(elt, "").color; }
35 var red_cs = col(a);
36 a.setAttribute("rel", "next");
37 var green_cs = col(a);
38 isnot(green_cs, red_cs, "computed values for red and green are different");
40 a.setAttribute("rel", "NEXT");
41 is(col(a), green_cs, "rel attribute should match case insensitively");
43 a.removeAttribute("rel");
44 a.setAttributeNS(htmlns, "html:rel", "next");
45 is(col(a), green_cs, "html:rel attribute should match case-sensitively");
47 a.setAttributeNS(htmlns, "html:rel", "NEXT");
48 is(col(a), red_cs, "html:rel attribute should not match case-insensitively");
50 </script>
51 </pre>
52 </body>
53 </html>