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 | /* Any copyright is dedicated to the Public Domain. |
michael@0 | 2 | http://creativecommons.org/publicdomain/zero/1.0/ */ |
michael@0 | 3 | |
michael@0 | 4 | function test() { |
michael@0 | 5 | waitForExplicitFinish(); |
michael@0 | 6 | |
michael@0 | 7 | let tab = gBrowser.addTab(); |
michael@0 | 8 | gBrowser.selectedTab = tab; |
michael@0 | 9 | |
michael@0 | 10 | function observer(subject, topic, data) { |
michael@0 | 11 | Services.obs.removeObserver(observer, "keyword-search"); |
michael@0 | 12 | is(topic, "keyword-search", "Got keyword-search notification"); |
michael@0 | 13 | |
michael@0 | 14 | let engine = Services.search.defaultEngine; |
michael@0 | 15 | ok(engine, "Have default search engine."); |
michael@0 | 16 | is(engine, subject, "Notification subject is engine."); |
michael@0 | 17 | is("firefox health report", data, "Notification data is search term."); |
michael@0 | 18 | |
michael@0 | 19 | executeSoon(function cleanup() { |
michael@0 | 20 | gBrowser.removeTab(tab); |
michael@0 | 21 | finish(); |
michael@0 | 22 | }); |
michael@0 | 23 | } |
michael@0 | 24 | |
michael@0 | 25 | Services.obs.addObserver(observer, "keyword-search", false); |
michael@0 | 26 | |
michael@0 | 27 | gURLBar.value = "firefox health report"; |
michael@0 | 28 | gURLBar.handleCommand(); |
michael@0 | 29 | } |
michael@0 | 30 |