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