gecko/browser/devtools/responsivedesign/test/browser_responsive_cmd.js
Joe Walker 1eb830ff5a Bug 773565 - GCLI Autocomplete goes wild when boolean params are used in a group; r=dcamp
--HG--
rename : browser/devtools/highlighter/test/helper.js => browser/devtools/highlighter/test/helpers.js
rename : browser/devtools/responsivedesign/test/helper.js => browser/devtools/responsivedesign/test/helpers.js
rename : browser/devtools/shared/test/helper.js => browser/devtools/shared/test/helpers.js
rename : browser/devtools/styleeditor/test/helper.js => browser/devtools/styleeditor/test/helpers.js
2012-08-24 16:04:45 +01:00

87 lines
1.8 KiB
JavaScript

/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
function test() {
DeveloperToolbarTest.test("about:blank", [ GAT_test ]);
}
function isOpen() {
return !!gBrowser.selectedTab.__responsiveUI;
}
function isClosed() {
return !isOpen();
}
function GAT_test() {
helpers.setInput('resize toggle');
helpers.check({
input: 'resize toggle',
hints: '',
markup: 'VVVVVVVVVVVVV',
status: 'VALID'
});
DeveloperToolbarTest.exec();
ok(isOpen(), "responsive mode is open");
helpers.setInput('resize toggle');
helpers.check({
input: 'resize toggle',
hints: '',
markup: 'VVVVVVVVVVVVV',
status: 'VALID'
});
DeveloperToolbarTest.exec();
ok(isClosed(), "responsive mode is closed");
helpers.setInput('resize on');
helpers.check({
input: 'resize on',
hints: '',
markup: 'VVVVVVVVV',
status: 'VALID'
});
DeveloperToolbarTest.exec();
ok(isOpen(), "responsive mode is open");
helpers.setInput('resize off');
helpers.check({
input: 'resize off',
hints: '',
markup: 'VVVVVVVVVV',
status: 'VALID'
});
DeveloperToolbarTest.exec();
ok(isClosed(), "responsive mode is closed");
helpers.setInput('resize to 400 400');
helpers.check({
input: 'resize to 400 400',
hints: '',
markup: 'VVVVVVVVVVVVVVVVV',
status: 'VALID',
args: {
width: { value: 400 },
height: { value: 400 },
}
});
DeveloperToolbarTest.exec();
ok(isOpen(), "responsive mode is open");
helpers.setInput('resize off');
helpers.check({
input: 'resize off',
hints: '',
markup: 'VVVVVVVVVV',
status: 'VALID'
});
DeveloperToolbarTest.exec();
ok(isClosed(), "responsive mode is closed");
}