Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 /* Any copyright is dedicated to the public domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ */
4 // Test that alert works from inside an <iframe> inside an <iframe mozbrowser>.
5 "use strict";
7 SimpleTest.waitForExplicitFinish();
8 browserElementTestHelpers.setEnabledPref(true);
9 browserElementTestHelpers.addPermission();
11 function runTest() {
12 var iframe = document.createElement('iframe');
13 SpecialPowers.wrap(iframe).mozbrowser = true;
15 iframe.addEventListener('mozbrowsershowmodalprompt', function(e) {
16 is(e.detail.message, 'Hello');
17 SimpleTest.finish();
18 });
20 iframe.src = 'file_browserElement_AlertInFrame.html';
21 document.body.appendChild(iframe);
22 }
24 addEventListener('testready', runTest);