browser_gcli_completion1.js 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  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. "use strict";
  17. // THIS FILE IS GENERATED FROM SOURCE IN THE GCLI PROJECT
  18. // PLEASE TALK TO SOMEONE IN DEVELOPER TOOLS BEFORE EDITING IT
  19. const exports = {};
  20. function test() {
  21. helpers.runTestModule(exports, "browser_gcli_completion1.js");
  22. }
  23. // var helpers = require('./helpers');
  24. exports.testActivate = function (options) {
  25. return helpers.audit(options, [
  26. {
  27. setup: "",
  28. check: {
  29. hints: ""
  30. }
  31. },
  32. {
  33. setup: " ",
  34. check: {
  35. hints: ""
  36. }
  37. },
  38. {
  39. setup: "tsr",
  40. check: {
  41. hints: " <text>"
  42. }
  43. },
  44. {
  45. setup: "tsr ",
  46. check: {
  47. hints: "<text>"
  48. }
  49. },
  50. {
  51. setup: "tsr b",
  52. check: {
  53. hints: ""
  54. }
  55. },
  56. {
  57. setup: "tsb",
  58. check: {
  59. hints: " [toggle]"
  60. }
  61. },
  62. {
  63. setup: "tsm",
  64. check: {
  65. hints: " <abc> <txt> <num>"
  66. }
  67. },
  68. {
  69. setup: "tsm ",
  70. check: {
  71. hints: "a <txt> <num>"
  72. }
  73. },
  74. {
  75. setup: "tsm a",
  76. check: {
  77. hints: " <txt> <num>"
  78. }
  79. },
  80. {
  81. setup: "tsm a ",
  82. check: {
  83. hints: "<txt> <num>"
  84. }
  85. },
  86. {
  87. setup: "tsm a ",
  88. check: {
  89. hints: "<txt> <num>"
  90. }
  91. },
  92. {
  93. setup: "tsm a d",
  94. check: {
  95. hints: " <num>"
  96. }
  97. },
  98. {
  99. setup: 'tsm a "d d"',
  100. check: {
  101. hints: " <num>"
  102. }
  103. },
  104. {
  105. setup: 'tsm a "d ',
  106. check: {
  107. hints: " <num>"
  108. }
  109. },
  110. {
  111. setup: 'tsm a "d d" ',
  112. check: {
  113. hints: "<num>"
  114. }
  115. },
  116. {
  117. setup: 'tsm a "d d ',
  118. check: {
  119. hints: " <num>"
  120. }
  121. },
  122. {
  123. setup: "tsm d r",
  124. check: {
  125. hints: " <num>"
  126. }
  127. },
  128. {
  129. setup: "tsm a d ",
  130. check: {
  131. hints: "<num>"
  132. }
  133. },
  134. {
  135. setup: "tsm a d 4",
  136. check: {
  137. hints: ""
  138. }
  139. },
  140. {
  141. setup: "tsg",
  142. check: {
  143. hints: " <solo> [options]"
  144. }
  145. },
  146. {
  147. setup: "tsg ",
  148. check: {
  149. hints: "aaa [options]"
  150. }
  151. },
  152. {
  153. setup: "tsg a",
  154. check: {
  155. hints: "aa [options]"
  156. }
  157. },
  158. {
  159. setup: "tsg b",
  160. check: {
  161. hints: "bb [options]"
  162. }
  163. },
  164. {
  165. skipIf: options.isPhantomjs, // PhantomJS gets predictions wrong
  166. setup: "tsg d",
  167. check: {
  168. hints: " [options] -> ccc"
  169. }
  170. },
  171. {
  172. setup: "tsg aa",
  173. check: {
  174. hints: "a [options]"
  175. }
  176. },
  177. {
  178. setup: "tsg aaa",
  179. check: {
  180. hints: " [options]"
  181. }
  182. },
  183. {
  184. setup: "tsg aaa ",
  185. check: {
  186. hints: "[options]"
  187. }
  188. },
  189. {
  190. setup: "tsg aaa d",
  191. check: {
  192. hints: " [options]"
  193. }
  194. },
  195. {
  196. setup: "tsg aaa dddddd",
  197. check: {
  198. hints: " [options]"
  199. }
  200. },
  201. {
  202. setup: "tsg aaa dddddd ",
  203. check: {
  204. hints: "[options]"
  205. }
  206. },
  207. {
  208. setup: 'tsg aaa "d',
  209. check: {
  210. hints: " [options]"
  211. }
  212. },
  213. {
  214. setup: 'tsg aaa "d d',
  215. check: {
  216. hints: " [options]"
  217. }
  218. },
  219. {
  220. setup: 'tsg aaa "d d"',
  221. check: {
  222. hints: " [options]"
  223. }
  224. },
  225. {
  226. setup: "tsn ex ",
  227. check: {
  228. hints: ""
  229. }
  230. },
  231. {
  232. setup: "selarr",
  233. check: {
  234. hints: " -> tselarr"
  235. }
  236. },
  237. {
  238. setup: "tselar 1",
  239. check: {
  240. hints: ""
  241. }
  242. },
  243. {
  244. name: "tselar |1",
  245. setup: function () {
  246. return helpers.setInput(options, "tselar 1", 7);
  247. },
  248. check: {
  249. hints: ""
  250. }
  251. },
  252. {
  253. name: "tselar| 1",
  254. setup: function () {
  255. return helpers.setInput(options, "tselar 1", 6);
  256. },
  257. check: {
  258. hints: " -> tselarr"
  259. }
  260. },
  261. {
  262. name: "tsela|r 1",
  263. setup: function () {
  264. return helpers.setInput(options, "tselar 1", 5);
  265. },
  266. check: {
  267. hints: " -> tselarr"
  268. }
  269. },
  270. ]);
  271. };