Wed, 31 Dec 2014 06:09:35 +0100
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=710231
5 -->
6 <head>
7 <title>Test for Bug 710231</title>
8 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
9 <script type="application/javascript" src="browserElementTestHelpers.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=710231">Mozilla Bug 710231</a>
15 <!--
16 Test that an iframe with the |mozbrowser| attribute does not emit
17 mozbrowserX events when this page does not have the "browser" permission.
18 -->
20 <script type="application/javascript;version=1.7">
21 "use strict";
23 SimpleTest.waitForExplicitFinish();
25 function runTest() {
26 var iframe = document.createElement('iframe');
27 SpecialPowers.wrap(iframe).mozbrowser = true;
28 document.body.appendChild(iframe);
30 iframe.addEventListener('mozbrowserloadstart', function() {
31 ok(false, 'Should not send mozbrowserloadstart event.');
32 });
34 iframe.addEventListener('load', function() {
35 ok(true, 'Got iframe load event.');
36 SimpleTest.finish();
37 });
39 iframe.src = browserElementTestHelpers.emptyPage1;
40 }
42 browserElementTestHelpers.setEnabledPref(true);
43 SpecialPowers.removePermission("browser", document);
44 addEventListener('testready', runTest);
46 </script>
48 </body>
49 </html>