layout/style/test/test_bug387615.html

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

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

mercurial