|
1 /* Any copyright is dedicated to the public domain. |
|
2 http://creativecommons.org/publicdomain/zero/1.0/ */ |
|
3 |
|
4 // Bug 770239 - Test that we can load pages with X-Frame-Options: Deny inside |
|
5 // <iframe mozbrowser>. |
|
6 "use strict"; |
|
7 |
|
8 SimpleTest.waitForExplicitFinish(); |
|
9 browserElementTestHelpers.setEnabledPref(true); |
|
10 browserElementTestHelpers.addPermission(); |
|
11 |
|
12 function runTest() { |
|
13 var iframe = document.createElement('iframe'); |
|
14 SpecialPowers.wrap(iframe).mozbrowser = true; |
|
15 |
|
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 }); |
|
21 |
|
22 document.body.appendChild(iframe); |
|
23 iframe.src = 'file_browserElement_XFrameOptions.sjs?DENY'; |
|
24 } |
|
25 |
|
26 addEventListener('testready', runTest); |