browser/devtools/commandline/test/browser_gcli_keyboard4.js

branch
TOR_BUG_9701
changeset 15
b8a032363ba2
equal deleted inserted replaced
-1:000000000000 0:f23d1ed3e7ec
1 /*
2 * Copyright 2012, Mozilla Foundation and contributors
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 'use strict';
18 // <INJECTED SOURCE:START>
19
20 // THIS FILE IS GENERATED FROM SOURCE IN THE GCLI PROJECT
21 // DO NOT EDIT IT DIRECTLY
22
23 var exports = {};
24
25 var TEST_URI = "data:text/html;charset=utf-8,<p id='gcli-input'>gcli-testKeyboard4.js</p>";
26
27 function test() {
28 return Task.spawn(function() {
29 let options = yield helpers.openTab(TEST_URI);
30 yield helpers.openToolbar(options);
31 gcli.addItems(mockCommands.items);
32
33 yield helpers.runTests(options, exports);
34
35 gcli.removeItems(mockCommands.items);
36 yield helpers.closeToolbar(options);
37 yield helpers.closeTab(options);
38 }).then(finish, helpers.handleError);
39 }
40
41 // <INJECTED SOURCE:END>
42
43 // var helpers = require('./helpers');
44
45 exports.testIncrFloat = function(options) {
46 return helpers.audit(options, [
47 /*
48 // See notes at top of testIncr
49 {
50 setup: 'tsf -70<UP>',
51 check: { input: 'tsf -6.5' }
52 },
53 */
54 {
55 setup: 'tsf -6.5<UP>',
56 check: { input: 'tsf -6' }
57 },
58 {
59 setup: 'tsf -6<UP>',
60 check: { input: 'tsf -4.5' }
61 },
62 {
63 setup: 'tsf -4.5<UP>',
64 check: { input: 'tsf -3' }
65 },
66 {
67 setup: 'tsf -4<UP>',
68 check: { input: 'tsf -3' }
69 },
70 {
71 setup: 'tsf -3<UP>',
72 check: { input: 'tsf -1.5' }
73 },
74 {
75 setup: 'tsf -1.5<UP>',
76 check: { input: 'tsf 0' }
77 },
78 {
79 setup: 'tsf 0<UP>',
80 check: { input: 'tsf 1.5' }
81 },
82 {
83 setup: 'tsf 1.5<UP>',
84 check: { input: 'tsf 3' }
85 },
86 {
87 setup: 'tsf 2<UP>',
88 check: { input: 'tsf 3' }
89 },
90 {
91 setup: 'tsf 3<UP>',
92 check: { input: 'tsf 4.5' }
93 },
94 {
95 setup: 'tsf 5<UP>',
96 check: { input: 'tsf 6' }
97 }
98 /*
99 // See notes at top of testIncr
100 {
101 setup: 'tsf 100<UP>',
102 check: { input: 'tsf -6.5' }
103 }
104 */
105 ]);
106 };
107
108 exports.testDecrFloat = function(options) {
109 return helpers.audit(options, [
110 /*
111 // See notes at top of testIncr
112 {
113 setup: 'tsf -70<DOWN>',
114 check: { input: 'tsf 11.5' }
115 },
116 */
117 {
118 setup: 'tsf -6.5<DOWN>',
119 check: { input: 'tsf -6.5' }
120 },
121 {
122 setup: 'tsf -6<DOWN>',
123 check: { input: 'tsf -6.5' }
124 },
125 {
126 setup: 'tsf -4.5<DOWN>',
127 check: { input: 'tsf -6' }
128 },
129 {
130 setup: 'tsf -4<DOWN>',
131 check: { input: 'tsf -4.5' }
132 },
133 {
134 setup: 'tsf -3<DOWN>',
135 check: { input: 'tsf -4.5' }
136 },
137 {
138 setup: 'tsf -1.5<DOWN>',
139 check: { input: 'tsf -3' }
140 },
141 {
142 setup: 'tsf 0<DOWN>',
143 check: { input: 'tsf -1.5' }
144 },
145 {
146 setup: 'tsf 1.5<DOWN>',
147 check: { input: 'tsf 0' }
148 },
149 {
150 setup: 'tsf 2<DOWN>',
151 check: { input: 'tsf 1.5' }
152 },
153 {
154 setup: 'tsf 3<DOWN>',
155 check: { input: 'tsf 1.5' }
156 },
157 {
158 setup: 'tsf 5<DOWN>',
159 check: { input: 'tsf 4.5' }
160 }
161 /*
162 // See notes at top of testIncr
163 {
164 setup: 'tsf 100<DOWN>',
165 check: { input: 'tsf 11.5' }
166 }
167 */
168 ]);
169 };
170
171 exports.testIncrSelection = function(options) {
172 /*
173 // Bug 829516: GCLI up/down navigation over selection is sometimes bizarre
174 return helpers.audit(options, [
175 {
176 setup: 'tselarr <DOWN>',
177 check: { hints: '2' },
178 exec: {}
179 },
180 {
181 setup: 'tselarr <DOWN><DOWN>',
182 check: { hints: '3' },
183 exec: {}
184 },
185 {
186 setup: 'tselarr <DOWN><DOWN><DOWN>',
187 check: { hints: '1' },
188 exec: {}
189 }
190 ]);
191 */
192 };
193
194 exports.testDecrSelection = function(options) {
195 /*
196 // Bug 829516: GCLI up/down navigation over selection is sometimes bizarre
197 return helpers.audit(options, [
198 {
199 setup: 'tselarr <UP>',
200 check: { hints: '3' }
201 }
202 ]);
203 */
204 };

mercurial