layout/inspector/tests/test_get_all_style_sheets.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=734861
     5 -->
     6 <head>
     7   <meta charset="utf-8">
     8   <title>Test for Bug 734861</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   <script type="application/javascript">
    13   /** Test for Bug 734861 **/
    15   SimpleTest.waitForExplicitFinish();
    17   function runTest() {
    18     var utils = SpecialPowers.Cc["@mozilla.org/inspector/dom-utils;1"]
    19                              .getService(SpecialPowers.Ci.inIDOMUtils);
    20     var res = utils.getAllStyleSheets(document);
    22     var foundUA = false;
    23     for (var i = 0; i < res.length; i++) {
    24       if (res[i].href === "resource://gre-resources/ua.css") {
    25         foundUA = true;
    26         break;
    27       }
    28     }
    29     ok(foundUA, "UA sheet should be returned with all the other sheets.");
    30     SimpleTest.finish();
    31   }
    33   </script>
    34 </head>
    35 <body onload="runTest();">
    36 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=734861">Mozilla Bug 734861</a>
    37 <p id="display"></p>
    38 <div id="content" style="display: none">
    40 </div>
    41 <pre id="test">
    42 </pre>
    43 </body>
    44 </html>

mercurial