Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
1 var tab;
3 function test() {
5 // ----------
6 // Test setup
8 waitForExplicitFinish();
10 gPrefService.setBoolPref("browser.zoom.updateBackgroundTabs", true);
11 gPrefService.setBoolPref("browser.zoom.siteSpecific", true);
13 let uri = "http://example.org/browser/browser/base/content/test/general/dummy_page.html";
15 Task.spawn(function () {
16 tab = gBrowser.addTab();
17 yield FullZoomHelper.load(tab, uri);
19 // -------------------------------------------------------------------
20 // Test - Trigger a tab switch that should update the zoom level
21 yield FullZoomHelper.selectTabAndWaitForLocationChange(tab);
22 ok(true, "applyPrefToSetting was called");
23 }).then(endTest, FullZoomHelper.failAndContinue(endTest));
24 }
26 // -------------
27 // Test clean-up
28 function endTest() {
29 Task.spawn(function () {
30 yield FullZoomHelper.removeTabAndWaitForLocationChange(tab);
32 tab = null;
34 if (gPrefService.prefHasUserValue("browser.zoom.updateBackgroundTabs"))
35 gPrefService.clearUserPref("browser.zoom.updateBackgroundTabs");
37 if (gPrefService.prefHasUserValue("browser.zoom.siteSpecific"))
38 gPrefService.clearUserPref("browser.zoom.siteSpecific");
40 finish();
41 });
42 }