2008-12-08 12:47:42 +00: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 =
|
|
|
|
"http://localhost:8888/browser/browser/base/content/test/moz.png";
|
|
|
|
}
|
|
|
|
|
|
|
|
function continue_test_prefNotSet () {
|
|
|
|
tabElm.linkedBrowser.removeEventListener("load", continue_test_prefNotSet, true);
|
|
|
|
tabElm.linkedBrowser.addEventListener("load", end_test_prefNotSet, true);
|
|
|
|
|
2009-09-09 20:04:05 +00:00
|
|
|
is(ZoomManager.zoom, 1, "zoom level pref should not apply to an image");
|
2008-12-08 12:47:42 +00:00
|
|
|
FullZoom.reset();
|
|
|
|
|
|
|
|
content.location =
|
|
|
|
"http://localhost:8888/browser/browser/base/content/test/zoom_test.html";
|
|
|
|
}
|
|
|
|
|
|
|
|
function end_test_prefNotSet() {
|
2009-10-16 13:19:57 +00:00
|
|
|
tabElm.linkedBrowser.removeEventListener("load", end_test_prefNotSet, true);
|
2008-12-08 12:47:42 +00:00
|
|
|
is(ZoomManager.zoom, zoomLevel, "the zoom level should have persisted");
|
|
|
|
|
2009-01-02 07:34:44 +00:00
|
|
|
// Reset the zoom so that other tests have a fresh zoom level
|
|
|
|
FullZoom.reset();
|
2008-12-08 12:47:42 +00:00
|
|
|
gBrowser.removeCurrentTab();
|
|
|
|
finish();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function test() {
|
|
|
|
waitForExplicitFinish();
|
|
|
|
|
|
|
|
tabElm = gBrowser.addTab();
|
|
|
|
gBrowser.selectedTab = tabElm;
|
|
|
|
tabElm.linkedBrowser.addEventListener("load", start_test_prefNotSet, true);
|
|
|
|
|
|
|
|
content.location =
|
|
|
|
"http://localhost:8888/browser/browser/base/content/test/zoom_test.html";
|
|
|
|
|
|
|
|
}
|