Wed, 31 Dec 2014 06:55:50 +0100
Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2
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 they're globally pref'ed off.
18 -->
20 <script type="application/javascript;version=1.7">
21 "use strict";
23 SimpleTest.waitForExplicitFinish();
25 function runTest() {
27 var iframe = document.createElement('iframe');
28 SpecialPowers.wrap(iframe).mozbrowser = true;
29 document.body.appendChild(iframe);
31 iframe.addEventListener('mozbrowserloadstart', function() {
32 ok(false, 'Should not send mozbrowserloadstart event.');
33 });
35 iframe.addEventListener('load', function() {
36 ok(true, 'Got iframe load event.');
37 SimpleTest.finish();
38 });
40 iframe.src = browserElementTestHelpers.emptyPage1;
41 }
43 browserElementTestHelpers.setEnabledPref(false);
44 addEventListener('testready', runTest);
46 </script>
48 </body>
49 </html>