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 // Bug 770239 - Test that we can load pages with X-Frame-Options: Deny inside
5 // <iframe mozbrowser>.
6 "use strict";
8 SimpleTest.waitForExplicitFinish();
9 browserElementTestHelpers.setEnabledPref(true);
10 browserElementTestHelpers.addPermission();
12 function runTest() {
13 var iframe = document.createElement('iframe');
14 SpecialPowers.wrap(iframe).mozbrowser = true;
16 // The page we load will fire an alert when it successfully loads.
17 iframe.addEventListener('mozbrowsershowmodalprompt', function(e) {
18 ok(true, "Got alert");
19 SimpleTest.finish();
20 });
22 document.body.appendChild(iframe);
23 iframe.src = 'file_browserElement_XFrameOptions.sjs?DENY';
24 }
26 addEventListener('testready', runTest);