browser_gcli_keyboard1.js 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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_keyboard1.js");
  22. }
  23. var javascript = require("gcli/types/javascript");
  24. // var helpers = require('./helpers');
  25. exports.testSimple = function (options) {
  26. return helpers.audit(options, [
  27. {
  28. setup: "tsela<TAB>",
  29. check: { input: "tselarr ", cursor: 8 }
  30. },
  31. {
  32. setup: "tsn di<TAB>",
  33. check: { input: "tsn dif ", cursor: 8 }
  34. },
  35. {
  36. setup: "tsg a<TAB>",
  37. check: { input: "tsg aaa ", cursor: 8 }
  38. }
  39. ]);
  40. };
  41. exports.testScript = function (options) {
  42. return helpers.audit(options, [
  43. {
  44. skipRemainingIf: options.isRemote ||
  45. options.requisition.system.commands.get("{") == null,
  46. setup: "{ wind<TAB>",
  47. check: { input: "{ window" }
  48. },
  49. {
  50. setup: "{ window.docum<TAB>",
  51. check: { input: "{ window.document" }
  52. }
  53. ]);
  54. };
  55. exports.testJsdom = function (options) {
  56. return helpers.audit(options, [
  57. {
  58. skipIf: options.isRemote ||
  59. options.requisition.system.commands.get("{") == null,
  60. setup: "{ window.document.titl<TAB>",
  61. check: { input: "{ window.document.title " }
  62. }
  63. ]);
  64. };