2008-12-08 04:47:42 -08:00
|
|
|
var tabElm, zoomLevel;
|
|
|
|
function start_test_prefNotSet() {
|
|
|
|
tabElm.linkedBrowser.removeEventListener("load", start_test_prefNotSet, true);
|
|
|
|
tabElm.linkedBrowser.addEventListener("load", continue_test_prefNotSet, true);
|
|
|
|
|
|
|
|
is(ZoomManager.zoom, 1, "initial zoom level should be 1");
|
|
|
|
FullZoom.enlarge();
|
|
|
|
|
|
|
|
//capture the zoom level to test later
|
|
|
|
zoomLevel = ZoomManager.zoom;
|
|
|
|
isnot(zoomLevel, 1, "zoom level should have changed");
|
|
|
|
|
|
|
|
content.location =
|
2010-03-12 13:53:36 -08:00
|
|
|
"http://mochi.test:8888/browser/browser/base/content/test/moz.png";
|
2008-12-08 04:47:42 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
function continue_test_prefNotSet () {
|
|
|
|
tabElm.linkedBrowser.removeEventListener("load", continue_test_prefNotSet, true);
|
|
|
|
tabElm.linkedBrowser.addEventListener("load", end_test_prefNotSet, true);
|
|
|
|
|
2009-09-09 13:04:05 -07:00
|
|
|
is(ZoomManager.zoom, 1, "zoom level pref should not apply to an image");
|
2008-12-08 04:47:42 -08:00
|
|
|
FullZoom.reset();
|
|
|
|
|
|
|
|
content.location =
|
2010-03-12 13:53:36 -08:00
|
|
|
"http://mochi.test:8888/browser/browser/base/content/test/zoom_test.html";
|
2008-12-08 04:47:42 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
function end_test_prefNotSet() {
|
2009-10-16 06:19:57 -07:00
|
|
|
tabElm.linkedBrowser.removeEventListener("load", end_test_prefNotSet, true);
|
2008-12-08 04:47:42 -08:00
|
|
|
is(ZoomManager.zoom, zoomLevel, "the zoom level should have persisted");
|
|
|
|
|
2009-01-01 23:34:44 -08:00
|
|
|
// Reset the zoom so that other tests have a fresh zoom level
|
|
|
|
FullZoom.reset();
|
2008-12-08 04:47:42 -08:00
|
|
|
gBrowser.removeCurrentTab();
|
|
|
|
finish();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function test() {
|
|
|
|
waitForExplicitFinish();
|
|
|
|
|
|
|
|
tabElm = gBrowser.addTab();
|
|
|
|
gBrowser.selectedTab = tabElm;
|
|
|
|
tabElm.linkedBrowser.addEventListener("load", start_test_prefNotSet, true);
|
|
|
|
|
|
|
|
content.location =
|
2010-03-12 13:53:36 -08:00
|
|
|
"http://mochi.test:8888/browser/browser/base/content/test/zoom_test.html";
|
2008-12-08 04:47:42 -08:00
|
|
|
|
|
|
|
}
|