Bug 1279562 - Accept negative 'left' and 'top' values in chrome.windows.update. r=kmag

--HG--
extra : rebase_source : 25a49cfc156fafcb490dcd997d26f20c550fa4ec
This commit is contained in:
Martin Giger 2016-06-17 02:22:00 -04:00
parent 28ae5ce216
commit 1478f20494
2 changed files with 11 additions and 1 deletions

View File

@ -77,6 +77,16 @@ add_task(function* testWindowCreate() {
return browser.windows.update(windowId, geom);
}).then(() => {
return checkWindow(geom);
}).then(() => {
return browser.runtime.getPlatformInfo();
}).then((platformInfo) => {
if (platformInfo.os != "linux") {
geom = {left: -50, top: -50, width: 800, height: 600};
return browser.windows.update(windowId, geom).then(() => {
return checkWindow(geom);
});
}
}).then(() => {
return browser.windows.remove(windowId);
}).then(() => {

View File

@ -1398,7 +1398,7 @@ this.Schemas = {
return new NumberType(type);
} else if (type.type == "integer") {
checkTypeProperties("minimum", "maximum");
return new IntegerType(type, type.minimum || 0, type.maximum || Infinity);
return new IntegerType(type, type.minimum || -Infinity, type.maximum || Infinity);
} else if (type.type == "boolean") {
checkTypeProperties();
return new BooleanType(type);