dom/browser-element/mochitest/test_browserElement_NoAttr.html

changeset 2
7e26c7da4463
equal deleted inserted replaced
-1:000000000000 0:d70f6f73c84c
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>
14
15 <!--
16 Test that an iframe without the |mozbrowser| attribute does not emit
17 mozbrowserX events.
18 -->
19
20 <script type="application/javascript;version=1.7">
21 "use strict";
22
23 SimpleTest.waitForExplicitFinish();
24
25 function runTest() {
26 var iframe = document.getElementById('iframe');
27 iframe.addEventListener('mozbrowserloadstart', function() {
28 ok(false, 'Should not send mozbrowserloadstart event.');
29 });
30
31 iframe.addEventListener('load', function() {
32 ok(true, 'Got iframe load event.');
33 SimpleTest.finish();
34 });
35
36 iframe.src = browserElementTestHelpers.emptyPage1;
37 }
38
39 addEventListener('load', function() { SimpleTest.executeSoon(runTest); });
40
41 </script>
42
43 <iframe id='iframe'></iframe>
44
45 </body>
46 </html>

mercurial