Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
michael@0 | 1 | function test() { |
michael@0 | 2 | waitForExplicitFinish(); |
michael@0 | 3 | |
michael@0 | 4 | var rootDir = "http://mochi.test:8888/browser/docshell/test/browser/"; |
michael@0 | 5 | gBrowser.selectedTab = gBrowser.addTab(rootDir + "file_bug234628-9.html"); |
michael@0 | 6 | gBrowser.selectedBrowser.addEventListener("load", afterOpen, true); |
michael@0 | 7 | } |
michael@0 | 8 | |
michael@0 | 9 | function afterOpen(event) { |
michael@0 | 10 | if (event.target != gBrowser.contentDocument) { |
michael@0 | 11 | return; |
michael@0 | 12 | } |
michael@0 | 13 | |
michael@0 | 14 | gBrowser.selectedBrowser.removeEventListener("load", afterOpen, true); |
michael@0 | 15 | |
michael@0 | 16 | is(gBrowser.contentDocument.documentElement.textContent.indexOf('\u20AC'), 145, "Parent doc should be UTF-16"); |
michael@0 | 17 | |
michael@0 | 18 | is(gBrowser.contentDocument.getElementsByTagName("iframe")[0].contentDocument.documentElement.textContent.indexOf('\u20AC'), 96, "Child doc should be windows-1252"); |
michael@0 | 19 | |
michael@0 | 20 | gBrowser.removeCurrentTab(); |
michael@0 | 21 | finish(); |
michael@0 | 22 | } |
michael@0 | 23 |