1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/base/test/test_bug820909.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,87 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<!-- 1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=820909 1.8 +--> 1.9 +<head> 1.10 + <meta charset="utf-8"> 1.11 + <title>Test for Bug 820909</title> 1.12 + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.13 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 1.14 +</head> 1.15 +<body> 1.16 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=820909">Mozilla Bug 820909</a> 1.17 +<p id="display"></p> 1.18 +<div id="content" style="display: none"> 1.19 + <span dİsabled="CAPS"></span> 1.20 +</div> 1.21 +<pre id="test"> 1.22 +<script> 1.23 + var bogusScriptRan = false; 1.24 +</script> 1.25 +<script type="applİcation/javascript"> 1.26 + bogusScriptRan = true; 1.27 +</script> 1.28 +<script type="application/javascript"> 1.29 + 1.30 +/** Test for Bug 820909 **/ 1.31 +// Test for https://bugzilla.mozilla.org/show_bug.cgi?id=820909#c7 item 1 1.32 +ok(!bogusScriptRan, "Script types should be ASCII case-insensitive"); 1.33 + 1.34 +// Test for https://bugzilla.mozilla.org/show_bug.cgi?id=820909#c7 item 2 1.35 +var input = document.createElement("input"); 1.36 +input.type = "radİo"; 1.37 +is(input.type, "text", "Input types should be ASCII case-insensitive"); 1.38 + 1.39 +// XXX Not sure how to test items 3, 4, 5 1.40 + 1.41 +// Test for https://bugzilla.mozilla.org/show_bug.cgi?id=820909#c7 item 6 1.42 +is(document.querySelector("[dİsabled='caps']"), null, 1.43 + "Checking whether an attribute is case-sensitive for selector-matching " + 1.44 + "purposes should be ASCII case-insensitive on the attr name"); 1.45 + 1.46 +// Test for https://bugzilla.mozilla.org/show_bug.cgi?id=820909#c7 item 7 1.47 +$("content").style.width = "0"; 1.48 +$("content").style.width = "1İn"; 1.49 +is($("content").style.width, "0px", 1.50 + "CSS unit names should be ASCII case-insensitive"); 1.51 + 1.52 +// Test for https://bugzilla.mozilla.org/show_bug.cgi?id=820909#c7 item 8 1.53 +$("content").style.setProperty("animation-name", "a"); 1.54 +$("content").style.setProperty("-moz-anİmation-name", "b"); 1.55 +is($("content").style.animationName, "a", 1.56 + "CSS property aliases should be ASCII case-insensitive"); 1.57 + 1.58 +// XXXbz don't know how to test item 9 1.59 + 1.60 +// Test for https://bugzilla.mozilla.org/show_bug.cgi?id=820909#c7 item 10 1.61 +$("content").innerHTML = "<table><input type='hİdden'></table>"; 1.62 +is($("content").querySelector("input").parentNode, $("content"), 1.63 + "Inputs that aren't actually type='hidden' should not be allowed as " + 1.64 + "table kids"); 1.65 + 1.66 +// XXXbz add test for item 11? 1.67 + 1.68 +// XXXbz add test for item 12? 1.69 + 1.70 +// Test for https://bugzilla.mozilla.org/show_bug.cgi?id=820909#c7 item 13 1.71 +$("content").style.setProperty("animation-name", "a"); 1.72 +$("content").style.setProperty("anİmation-name", "b"); 1.73 +is($("content").style.animationName, "a", 1.74 + "CSS property names should be ASCII case-insensitive"); 1.75 + 1.76 +$("content").style.setProperty("display", "none"); 1.77 +$("content").style.setProperty("display", "İnline"); 1.78 +is($("content").style.display, "none", 1.79 + "CSS keywords should be ASCII case-insensitive"); 1.80 + 1.81 +$("content").style.setProperty("color", "white"); 1.82 +$("content").style.setProperty("color", "İndigo"); 1.83 +is($("content").style.color, "white", 1.84 + "CSS color names should be ASCII case-insensitive"); 1.85 + 1.86 + 1.87 +</script> 1.88 +</pre> 1.89 +</body> 1.90 +</html>