Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* Any copyright is dedicated to the Public Domain. |
michael@0 | 2 | * http://creativecommons.org/publicdomain/zero/1.0/ */ |
michael@0 | 3 | |
michael@0 | 4 | function test() { |
michael@0 | 5 | function isOpen() { |
michael@0 | 6 | return !!gBrowser.selectedTab.__responsiveUI; |
michael@0 | 7 | } |
michael@0 | 8 | |
michael@0 | 9 | helpers.addTabWithToolbar("about:blank", function(options) { |
michael@0 | 10 | return helpers.audit(options, [ |
michael@0 | 11 | { |
michael@0 | 12 | setup: "resize toggle", |
michael@0 | 13 | check: { |
michael@0 | 14 | input: 'resize toggle', |
michael@0 | 15 | hints: '', |
michael@0 | 16 | markup: 'VVVVVVVVVVVVV', |
michael@0 | 17 | status: 'VALID' |
michael@0 | 18 | }, |
michael@0 | 19 | exec: { |
michael@0 | 20 | output: "" |
michael@0 | 21 | }, |
michael@0 | 22 | post: function() { |
michael@0 | 23 | ok(isOpen(), "responsive mode is open"); |
michael@0 | 24 | }, |
michael@0 | 25 | }, |
michael@0 | 26 | { |
michael@0 | 27 | setup: "resize toggle", |
michael@0 | 28 | check: { |
michael@0 | 29 | input: 'resize toggle', |
michael@0 | 30 | hints: '', |
michael@0 | 31 | markup: 'VVVVVVVVVVVVV', |
michael@0 | 32 | status: 'VALID' |
michael@0 | 33 | }, |
michael@0 | 34 | exec: { |
michael@0 | 35 | output: "" |
michael@0 | 36 | }, |
michael@0 | 37 | post: function() { |
michael@0 | 38 | ok(!isOpen(), "responsive mode is closed"); |
michael@0 | 39 | }, |
michael@0 | 40 | }, |
michael@0 | 41 | { |
michael@0 | 42 | setup: "resize on", |
michael@0 | 43 | check: { |
michael@0 | 44 | input: 'resize on', |
michael@0 | 45 | hints: '', |
michael@0 | 46 | markup: 'VVVVVVVVV', |
michael@0 | 47 | status: 'VALID' |
michael@0 | 48 | }, |
michael@0 | 49 | exec: { |
michael@0 | 50 | output: "" |
michael@0 | 51 | }, |
michael@0 | 52 | post: function() { |
michael@0 | 53 | ok(isOpen(), "responsive mode is open"); |
michael@0 | 54 | }, |
michael@0 | 55 | }, |
michael@0 | 56 | { |
michael@0 | 57 | setup: "resize off", |
michael@0 | 58 | check: { |
michael@0 | 59 | input: 'resize off', |
michael@0 | 60 | hints: '', |
michael@0 | 61 | markup: 'VVVVVVVVVV', |
michael@0 | 62 | status: 'VALID' |
michael@0 | 63 | }, |
michael@0 | 64 | exec: { |
michael@0 | 65 | output: "" |
michael@0 | 66 | }, |
michael@0 | 67 | post: function() { |
michael@0 | 68 | ok(!isOpen(), "responsive mode is closed"); |
michael@0 | 69 | }, |
michael@0 | 70 | }, |
michael@0 | 71 | { |
michael@0 | 72 | setup: "resize to 400 400", |
michael@0 | 73 | check: { |
michael@0 | 74 | input: 'resize to 400 400', |
michael@0 | 75 | hints: '', |
michael@0 | 76 | markup: 'VVVVVVVVVVVVVVVVV', |
michael@0 | 77 | status: 'VALID', |
michael@0 | 78 | args: { |
michael@0 | 79 | width: { value: 400 }, |
michael@0 | 80 | height: { value: 400 }, |
michael@0 | 81 | } |
michael@0 | 82 | }, |
michael@0 | 83 | exec: { |
michael@0 | 84 | output: "" |
michael@0 | 85 | }, |
michael@0 | 86 | post: function() { |
michael@0 | 87 | ok(isOpen(), "responsive mode is open"); |
michael@0 | 88 | }, |
michael@0 | 89 | }, |
michael@0 | 90 | { |
michael@0 | 91 | setup: "resize off", |
michael@0 | 92 | check: { |
michael@0 | 93 | input: 'resize off', |
michael@0 | 94 | hints: '', |
michael@0 | 95 | markup: 'VVVVVVVVVV', |
michael@0 | 96 | status: 'VALID' |
michael@0 | 97 | }, |
michael@0 | 98 | exec: { |
michael@0 | 99 | output: "" |
michael@0 | 100 | }, |
michael@0 | 101 | post: function() { |
michael@0 | 102 | ok(!isOpen(), "responsive mode is closed"); |
michael@0 | 103 | }, |
michael@0 | 104 | }, |
michael@0 | 105 | ]); |
michael@0 | 106 | }).then(finish); |
michael@0 | 107 | } |