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 "use strict";
3 exports["test common"] = require("./common")
5 var Method = require("../core")
7 exports["test host objects"] = function(assert) {
8 var isElement = Method("is-element")
9 isElement.define(function() { return false })
11 isElement.define(Element, function() { return true })
13 assert.notDeepEqual(typeof(Element.prototype[isElement]), "number",
14 "Host object's prototype is extended with a number value")
16 assert.ok(!isElement({}), "object is not an Element")
17 assert.ok(document.createElement("div"), "Element is an element")
18 }
20 require("test").run(exports)