content/base/test/test_bug894874.html

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=894874
     5 -->
     6 <head>
     7   <meta charset="utf-8">
     8   <title>Test for Bug 894874</title>
     9   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    10   <!-- IMPORTANT: Keep the sheets in this order! -->
    11   <link rel="stylesheet" type="text/css" href="data:text/css,">
    12   <link rel="stylesheet" type="text/css" title="one" href="data:text/css,">
    13   <link rel="stylesheet" type="text/css" title="two" href="data:text/css,">
    14   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    15   <script type="application/javascript">
    17   /** Test for Bug 894874 **/
    18   SimpleTest.waitForExplicitFinish();
    19   addLoadEvent(function() {
    20     is(document.styleSheets[0].disabled, false,
    21        "Sheet with no title should be enabled");
    22     is(document.styleSheets[1].disabled, false,
    23        "First preferred sheet should be enabled");
    24     is(document.styleSheets[2].disabled, true,
    25        "Second preferred sheet should be disabled");
    26     is(document.selectedStyleSheetSet, "one", "Sheet one is enabled");
    27     document.styleSheets[0].disabled = true;
    28     document.styleSheets[2].disabled = false;
    29     ok(document.selectedStyleSheetSet === null,
    30        "Sheet one and sheet two are both enabled");
    31     SimpleTest.finish();
    32   });
    34   </script>
    35 </head>
    36 <body>
    37 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=894874">Mozilla Bug 894874</a>
    38 <p id="display"></p>
    39 <div id="content" style="display: none">
    41 </div>
    42 <pre id="test">
    43 </pre>
    44 </body>
    45 </html>

mercurial