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.
michael@0 | 1 | function run_test() { |
michael@0 | 2 | const ios = Components.classes["@mozilla.org/network/io-service;1"] |
michael@0 | 3 | .getService(Components.interfaces.nsIIOService); |
michael@0 | 4 | |
michael@0 | 5 | var base = ios.newURI("http://localhost/bug379034/index.html", null, null); |
michael@0 | 6 | |
michael@0 | 7 | var uri = ios.newURI("http:a.html", null, base); |
michael@0 | 8 | do_check_eq(uri.spec, "http://localhost/bug379034/a.html"); |
michael@0 | 9 | |
michael@0 | 10 | uri = ios.newURI("HtTp:b.html", null, base); |
michael@0 | 11 | do_check_eq(uri.spec, "http://localhost/bug379034/b.html"); |
michael@0 | 12 | |
michael@0 | 13 | uri = ios.newURI("https:c.html", null, base); |
michael@0 | 14 | do_check_eq(uri.spec, "https://c.html/"); |
michael@0 | 15 | |
michael@0 | 16 | uri = ios.newURI("./https:d.html", null, base); |
michael@0 | 17 | do_check_eq(uri.spec, "http://localhost/bug379034/https:d.html"); |
michael@0 | 18 | } |