Bug 817330 - test_bug458898.html fails if dom.disable_window_move_resize = true. r=dbaron

This commit is contained in:
Jens Hatlak 2012-12-01 13:44:00 +01:00
parent 2eb81e5864
commit 3b4df9464f

View File

@ -24,10 +24,14 @@ var win = window.openDialog("data:text/html,<div style='height:200px; width:100p
function loaded() {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var disableWindowResizePref = "dom.disable_window_move_resize";
var oldPrefValue = SpecialPowers.getBoolPref(disableWindowResizePref);
SpecialPowers.setBoolPref(disableWindowResizePref, false);
win.sizeToContent();
ok(win.innerWidth >= 100, "innerWidth: " + win.innerWidth + " >= 100 ?");
ok(win.innerHeight >= 200, "innerHeight: " + win.innerHeight + " >= 200 ?");
win.close();
SpecialPowers.setBoolPref(disableWindowResizePref, oldPrefValue);
SimpleTest.finish();
}