content/base/test/chrome/test_bug765993.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=765993
     5 -->
     6 <head>
     7   <title>Test for Bug 765993</title>
     8   <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
     9   <script type="application/javascript"  src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
    10   <script type="application/javascript"  src="chrome://mochikit/content/tests/SimpleTest/ChromeUtils.js"></script>
    11   <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
    12 </head>
    13 <body>
    14 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=765993">Mozilla Bug 765993</a>
    15 <style type="text/css">
    16 #link1 a { -moz-user-select:none; }
    17 </style>
    18 <div id="link1"><a href="http://www.mozilla.org/">link1</a></div>
    19 <div id="link2"><a href="http://www.mozilla.org/">link2</a></div>
    20 <p id="display"></p>
    21 <div id="content" style="display: none">
    23 </div>
    24 <pre id="test">
    25 <script type="application/javascript">
    27 /** Test for Bug 765993 **/
    29 Components.utils.import("resource://gre/modules/jsdebugger.jsm");
    30 addDebuggerToGlobal(this);
    32 window.onload = function () {
    33     SimpleTest.waitForExplicitFinish();
    35     var iframe = document.createElement("iframe");
    36     iframe.src = "http://mochi.test:8888/tests/content/base/test/chrome/nochrome_bug765993.html";
    37     iframe.onload = function () {
    38         var script = iframe.contentWindow.document.createElement("script");
    39         script.src = "http://mochi.test:8888/tests/content/base/test/chrome/nochrome_bug765993.js";
    40         script.onload = function () {
    41             var dbg = new Debugger(iframe.contentWindow);
    42             ok(dbg, "Should be able to create debugger");
    44             var scripts = dbg.findScripts({
    45                 url: "http://mochi.test:8888/tests/content/base/test/chrome/nochrome_bug765993.js"
    46             });
    47             ok(scripts.length > 0, "Should be able to find script");
    49             is(scripts[0].sourceMapURL, "foo.js.map");
    50             SimpleTest.finish();
    51         }
    53         iframe.contentWindow.document.body.appendChild(script);
    54     };
    56     document.body.appendChild(iframe);
    57 };
    59 </script>
    60 </pre>
    61 </body>
    62 </html>

mercurial