browser/devtools/commandline/test/browser_gcli_keyboard2.js

branch
TOR_BUG_9701
changeset 15
b8a032363ba2
equal deleted inserted replaced
-1:000000000000 0:f6c74eadd4c5
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-testKeyboard2.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.testIncr = function(options) {
46 return helpers.audit(options, [
47 /*
48 // We currently refuse to increment/decrement things with a non-valid
49 // status which makes sense for many cases, and is a decent default.
50 // However in theory we could do better, these tests are there for then
51 {
52 setup: 'tsu -70<UP>',
53 check: { input: 'tsu -5' }
54 },
55 {
56 setup: 'tsu -7<UP>',
57 check: { input: 'tsu -5' }
58 },
59 {
60 setup: 'tsu -6<UP>',
61 check: { input: 'tsu -5' }
62 },
63 */
64 {
65 setup: 'tsu -5<UP>',
66 check: { input: 'tsu -3' }
67 },
68 {
69 setup: 'tsu -4<UP>',
70 check: { input: 'tsu -3' }
71 },
72 {
73 setup: 'tsu -3<UP>',
74 check: { input: 'tsu 0' }
75 },
76 {
77 setup: 'tsu -2<UP>',
78 check: { input: 'tsu 0' }
79 },
80 {
81 setup: 'tsu -1<UP>',
82 check: { input: 'tsu 0' }
83 },
84 {
85 setup: 'tsu 0<UP>',
86 check: { input: 'tsu 3' }
87 },
88 {
89 setup: 'tsu 1<UP>',
90 check: { input: 'tsu 3' }
91 },
92 {
93 setup: 'tsu 2<UP>',
94 check: { input: 'tsu 3' }
95 },
96 {
97 setup: 'tsu 3<UP>',
98 check: { input: 'tsu 6' }
99 },
100 {
101 setup: 'tsu 4<UP>',
102 check: { input: 'tsu 6' }
103 },
104 {
105 setup: 'tsu 5<UP>',
106 check: { input: 'tsu 6' }
107 },
108 {
109 setup: 'tsu 6<UP>',
110 check: { input: 'tsu 9' }
111 },
112 {
113 setup: 'tsu 7<UP>',
114 check: { input: 'tsu 9' }
115 },
116 {
117 setup: 'tsu 8<UP>',
118 check: { input: 'tsu 9' }
119 },
120 {
121 setup: 'tsu 9<UP>',
122 check: { input: 'tsu 10' }
123 },
124 {
125 setup: 'tsu 10<UP>',
126 check: { input: 'tsu 10' }
127 }
128 /*
129 // See notes above
130 {
131 setup: 'tsu 100<UP>',
132 check: { input: 'tsu 10' }
133 }
134 */
135 ]);
136 };

mercurial