browser_gcli_async.js 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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_async.js");
  22. }
  23. // var helpers = require('./helpers');
  24. exports.testBasic = function (options) {
  25. return helpers.audit(options, [
  26. {
  27. setup: "tsslo",
  28. check: {
  29. input: "tsslo",
  30. hints: "w",
  31. markup: "IIIII",
  32. cursor: 5,
  33. current: "__command",
  34. status: "ERROR",
  35. predictions: ["tsslow"],
  36. unassigned: [ ]
  37. }
  38. },
  39. {
  40. setup: "tsslo<TAB>",
  41. check: {
  42. input: "tsslow ",
  43. hints: "Shalom",
  44. markup: "VVVVVVV",
  45. cursor: 7,
  46. current: "hello",
  47. status: "ERROR",
  48. predictions: [
  49. "Shalom", "Namasté", "Hallo", "Dydd-da", "Chào", "Hej",
  50. "Saluton", "Sawubona"
  51. ],
  52. unassigned: [ ],
  53. args: {
  54. command: { name: "tsslow" },
  55. hello: {
  56. arg: "",
  57. status: "INCOMPLETE"
  58. },
  59. }
  60. }
  61. },
  62. {
  63. setup: "tsslow S",
  64. check: {
  65. input: "tsslow S",
  66. hints: "halom",
  67. markup: "VVVVVVVI",
  68. cursor: 8,
  69. current: "hello",
  70. status: "ERROR",
  71. predictions: [ "Shalom", "Saluton", "Sawubona", "Namasté" ],
  72. unassigned: [ ],
  73. args: {
  74. command: { name: "tsslow" },
  75. hello: {
  76. arg: " S",
  77. status: "INCOMPLETE"
  78. },
  79. }
  80. }
  81. },
  82. {
  83. setup: "tsslow S<TAB>",
  84. check: {
  85. input: "tsslow Shalom ",
  86. hints: "",
  87. markup: "VVVVVVVVVVVVVV",
  88. cursor: 14,
  89. current: "hello",
  90. status: "VALID",
  91. predictions: [ "Shalom" ],
  92. unassigned: [ ],
  93. args: {
  94. command: { name: "tsslow" },
  95. hello: {
  96. arg: " Shalom ",
  97. status: "VALID",
  98. message: ""
  99. },
  100. }
  101. }
  102. }
  103. ]);
  104. };