|
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"> |
|
22 |
|
23 </div> |
|
24 <pre id="test"> |
|
25 <script type="application/javascript"> |
|
26 |
|
27 /** Test for Bug 765993 **/ |
|
28 |
|
29 Components.utils.import("resource://gre/modules/jsdebugger.jsm"); |
|
30 addDebuggerToGlobal(this); |
|
31 |
|
32 window.onload = function () { |
|
33 SimpleTest.waitForExplicitFinish(); |
|
34 |
|
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"); |
|
43 |
|
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"); |
|
48 |
|
49 is(scripts[0].sourceMapURL, "foo.js.map"); |
|
50 SimpleTest.finish(); |
|
51 } |
|
52 |
|
53 iframe.contentWindow.document.body.appendChild(script); |
|
54 }; |
|
55 |
|
56 document.body.appendChild(iframe); |
|
57 }; |
|
58 |
|
59 </script> |
|
60 </pre> |
|
61 </body> |
|
62 </html> |