|
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-testKeyboard3.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.testDecr = function(options) { |
|
46 return helpers.audit(options, [ |
|
47 /* |
|
48 // See notes at top of testIncr in testKeyboard2.js |
|
49 { |
|
50 setup: 'tsu -70<DOWN>', |
|
51 check: { input: 'tsu -5' } |
|
52 }, |
|
53 { |
|
54 setup: 'tsu -7<DOWN>', |
|
55 check: { input: 'tsu -5' } |
|
56 }, |
|
57 { |
|
58 setup: 'tsu -6<DOWN>', |
|
59 check: { input: 'tsu -5' } |
|
60 }, |
|
61 */ |
|
62 { |
|
63 setup: 'tsu -5<DOWN>', |
|
64 check: { input: 'tsu -5' } |
|
65 }, |
|
66 { |
|
67 setup: 'tsu -4<DOWN>', |
|
68 check: { input: 'tsu -5' } |
|
69 }, |
|
70 { |
|
71 setup: 'tsu -3<DOWN>', |
|
72 check: { input: 'tsu -5' } |
|
73 }, |
|
74 { |
|
75 setup: 'tsu -2<DOWN>', |
|
76 check: { input: 'tsu -3' } |
|
77 }, |
|
78 { |
|
79 setup: 'tsu -1<DOWN>', |
|
80 check: { input: 'tsu -3' } |
|
81 }, |
|
82 { |
|
83 setup: 'tsu 0<DOWN>', |
|
84 check: { input: 'tsu -3' } |
|
85 }, |
|
86 { |
|
87 setup: 'tsu 1<DOWN>', |
|
88 check: { input: 'tsu 0' } |
|
89 }, |
|
90 { |
|
91 setup: 'tsu 2<DOWN>', |
|
92 check: { input: 'tsu 0' } |
|
93 }, |
|
94 { |
|
95 setup: 'tsu 3<DOWN>', |
|
96 check: { input: 'tsu 0' } |
|
97 }, |
|
98 { |
|
99 setup: 'tsu 4<DOWN>', |
|
100 check: { input: 'tsu 3' } |
|
101 }, |
|
102 { |
|
103 setup: 'tsu 5<DOWN>', |
|
104 check: { input: 'tsu 3' } |
|
105 }, |
|
106 { |
|
107 setup: 'tsu 6<DOWN>', |
|
108 check: { input: 'tsu 3' } |
|
109 }, |
|
110 { |
|
111 setup: 'tsu 7<DOWN>', |
|
112 check: { input: 'tsu 6' } |
|
113 }, |
|
114 { |
|
115 setup: 'tsu 8<DOWN>', |
|
116 check: { input: 'tsu 6' } |
|
117 }, |
|
118 { |
|
119 setup: 'tsu 9<DOWN>', |
|
120 check: { input: 'tsu 6' } |
|
121 }, |
|
122 { |
|
123 setup: 'tsu 10<DOWN>', |
|
124 check: { input: 'tsu 9' } |
|
125 } |
|
126 /* |
|
127 // See notes at top of testIncr |
|
128 { |
|
129 setup: 'tsu 100<DOWN>', |
|
130 check: { input: 'tsu 9' } |
|
131 } |
|
132 */ |
|
133 ]); |
|
134 }; |