browser_gcli_focus.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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_focus.js");
  22. }
  23. // var helpers = require('./helpers');
  24. exports.testBasic = function (options) {
  25. return helpers.audit(options, [
  26. {
  27. name: "exec setup",
  28. setup: function () {
  29. // Just check that we've got focus, and everything is clear
  30. helpers.focusInput(options);
  31. return helpers.setInput(options, "echo hi");
  32. },
  33. check: { },
  34. exec: { }
  35. },
  36. {
  37. setup: "tsn deep",
  38. check: {
  39. input: "tsn deep",
  40. hints: " down nested cmd",
  41. markup: "IIIVIIII",
  42. cursor: 8,
  43. status: "ERROR",
  44. outputState: "false:default",
  45. tooltipState: "false:default"
  46. }
  47. },
  48. {
  49. setup: "tsn deep<TAB>",
  50. check: {
  51. input: "tsn deep down nested cmd ",
  52. hints: "",
  53. markup: "VVVVVVVVVVVVVVVVVVVVVVVVV",
  54. cursor: 25,
  55. status: "VALID",
  56. outputState: "false:default",
  57. tooltipState: "false:default"
  58. }
  59. }
  60. ]);
  61. };