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