content/base/test/test_bug820909.html

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     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 type="application/javascript" 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">
    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");
    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");
    36 // XXX Not sure how to test items 3, 4, 5
    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");
    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");
    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");
    55 // XXXbz don't know how to test item 9
    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");
    63 // XXXbz add test for item 11?
    65 // XXXbz add test for item 12?
    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");
    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");
    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");
    84 </script>
    85 </pre>
    86 </body>
    87 </html>

mercurial