Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 var tabElm, zoomLevel;
2 function start_test_prefNotSet() {
3 Task.spawn(function () {
4 is(ZoomManager.zoom, 1, "initial zoom level should be 1");
5 FullZoom.enlarge();
7 //capture the zoom level to test later
8 zoomLevel = ZoomManager.zoom;
9 isnot(zoomLevel, 1, "zoom level should have changed");
11 yield FullZoomHelper.load(gBrowser.selectedTab, "http://mochi.test:8888/browser/browser/base/content/test/general/moz.png");
12 }).then(continue_test_prefNotSet, FullZoomHelper.failAndContinue(finish));
13 }
15 function continue_test_prefNotSet () {
16 Task.spawn(function () {
17 is(ZoomManager.zoom, 1, "zoom level pref should not apply to an image");
18 FullZoom.reset();
20 yield FullZoomHelper.load(gBrowser.selectedTab, "http://mochi.test:8888/browser/browser/base/content/test/general/zoom_test.html");
21 }).then(end_test_prefNotSet, FullZoomHelper.failAndContinue(finish));
22 }
24 function end_test_prefNotSet() {
25 Task.spawn(function () {
26 is(ZoomManager.zoom, zoomLevel, "the zoom level should have persisted");
28 // Reset the zoom so that other tests have a fresh zoom level
29 FullZoom.reset();
30 yield FullZoomHelper.removeTabAndWaitForLocationChange();
31 finish();
32 });
33 }
35 function test() {
36 waitForExplicitFinish();
38 Task.spawn(function () {
39 tabElm = gBrowser.addTab();
40 yield FullZoomHelper.selectTabAndWaitForLocationChange(tabElm);
41 yield FullZoomHelper.load(tabElm, "http://mochi.test:8888/browser/browser/base/content/test/general/zoom_test.html");
42 }).then(start_test_prefNotSet, FullZoomHelper.failAndContinue(finish));
43 }