Thu, 15 Jan 2015 15:59:08 +0100
Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
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);