test_bug820909.html (3038B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=820909 5 --> 6 <head> 7 <meta charset="utf-8"> 8 <title>Test for Bug 820909</title> 9 <script src="/tests/SimpleTest/SimpleTest.js"></script> 10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 11 </head> 12 <body> 13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=820909">Mozilla Bug 820909</a> 14 <p id="display"></p> 15 <div id="content" style="display: none"> 16 <span dİsabled="CAPS"></span> 17 </div> 18 <pre id="test"> 19 <script> 20 var bogusScriptRan = false; 21 </script> 22 <script type="applİcation/javascript"> 23 bogusScriptRan = true; 24 </script> 25 <script type="application/javascript"> 26 27 /** Test for Bug 820909 */ 28 // Test for https://bugzilla.mozilla.org/show_bug.cgi?id=820909#c7 item 1 29 ok(!bogusScriptRan, "Script types should be ASCII case-insensitive"); 30 31 // Test for https://bugzilla.mozilla.org/show_bug.cgi?id=820909#c7 item 2 32 var input = document.createElement("input"); 33 input.type = "radİo"; 34 is(input.type, "text", "Input types should be ASCII case-insensitive"); 35 36 // XXX Not sure how to test items 3, 4, 5 37 38 // Test for https://bugzilla.mozilla.org/show_bug.cgi?id=820909#c7 item 6 39 is(document.querySelector("[dİsabled='caps']"), null, 40 "Checking whether an attribute is case-sensitive for selector-matching " + 41 "purposes should be ASCII case-insensitive on the attr name"); 42 43 // Test for https://bugzilla.mozilla.org/show_bug.cgi?id=820909#c7 item 7 44 $("content").style.width = "0"; 45 $("content").style.width = "1İn"; 46 is($("content").style.width, "0px", 47 "CSS unit names should be ASCII case-insensitive"); 48 49 // Test for https://bugzilla.mozilla.org/show_bug.cgi?id=820909#c7 item 8 50 $("content").style.setProperty("animation-name", "a"); 51 $("content").style.setProperty("-moz-anİmation-name", "b"); 52 is($("content").style.animationName, "a", 53 "CSS property aliases should be ASCII case-insensitive"); 54 55 // XXXbz don't know how to test item 9 56 57 // Test for https://bugzilla.mozilla.org/show_bug.cgi?id=820909#c7 item 10 58 $("content").innerHTML = "<table><input type='hİdden'></table>"; 59 is($("content").querySelector("input").parentNode, $("content"), 60 "Inputs that aren't actually type='hidden' should not be allowed as " + 61 "table kids"); 62 63 // XXXbz add test for item 11? 64 65 // XXXbz add test for item 12? 66 67 // Test for https://bugzilla.mozilla.org/show_bug.cgi?id=820909#c7 item 13 68 $("content").style.setProperty("animation-name", "a"); 69 $("content").style.setProperty("anİmation-name", "b"); 70 is($("content").style.animationName, "a", 71 "CSS property names should be ASCII case-insensitive"); 72 73 $("content").style.setProperty("display", "none"); 74 $("content").style.setProperty("display", "İnline"); 75 is($("content").style.display, "none", 76 "CSS keywords should be ASCII case-insensitive"); 77 78 $("content").style.setProperty("color", "white"); 79 $("content").style.setProperty("color", "İndigo"); 80 is($("content").style.color, "white", 81 "CSS color names should be ASCII case-insensitive"); 82 83 84 </script> 85 </pre> 86 </body> 87 </html>