2012-07-10 00:42:18 +04:00
|
|
|
/* Any copyright is dedicated to the public domain.
|
|
|
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
|
|
|
|
// Bug 770239 - Test that we can load pages with X-Frame-Options: Deny inside
|
|
|
|
// <iframe mozbrowser>.
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
|
|
|
|
|
|
function runTest() {
|
|
|
|
browserElementTestHelpers.setEnabledPref(true);
|
2012-08-15 21:22:30 +04:00
|
|
|
browserElementTestHelpers.addPermission();
|
2012-07-10 00:42:18 +04:00
|
|
|
|
|
|
|
var iframe = document.createElement('iframe');
|
2013-02-27 06:26:10 +04:00
|
|
|
SpecialPowers.wrap(iframe).mozbrowser = true;
|
2012-07-10 00:42:18 +04:00
|
|
|
|
|
|
|
// The page we load will fire an alert when it successfully loads.
|
|
|
|
iframe.addEventListener('mozbrowsershowmodalprompt', function(e) {
|
|
|
|
ok(true, "Got alert");
|
|
|
|
SimpleTest.finish();
|
|
|
|
});
|
|
|
|
|
|
|
|
document.body.appendChild(iframe);
|
|
|
|
iframe.src = 'file_browserElement_XFrameOptions.sjs?DENY';
|
|
|
|
}
|
|
|
|
|
|
|
|
runTest();
|