browser_cmd_highlight_03.js 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. /* Any copyright is dedicated to the Public Domain.
  2. * http://creativecommons.org/publicdomain/zero/1.0/ */
  3. "use strict";
  4. /* eslint key-spacing: 0 */
  5. // Tests the various highlight command parameters and options that doesn't
  6. // involve nodes at all.
  7. var TEST_PAGE = "data:text/html;charset=utf-8,";
  8. function test() {
  9. return Task.spawn(spawnTest).then(finish, helpers.handleError);
  10. }
  11. function* spawnTest() {
  12. let options = yield helpers.openTab(TEST_PAGE);
  13. yield helpers.openToolbar(options);
  14. yield helpers.audit(options, [
  15. {
  16. setup: "highlight body --hide",
  17. check: {
  18. input: "highlight body --hide",
  19. hints: "guides [options]",
  20. markup: "VVVVVVVVVVVVVVVIIIIII",
  21. status: "ERROR"
  22. },
  23. exec: {
  24. output: "Error: Too many arguments"
  25. }
  26. },
  27. {
  28. setup: "highlight body --show",
  29. check: {
  30. input: "highlight body --show",
  31. hints: "infobar [options]",
  32. markup: "VVVVVVVVVVVVVVVIIIIII",
  33. status: "ERROR"
  34. },
  35. exec: {
  36. output: "Error: Too many arguments"
  37. }
  38. },
  39. {
  40. setup: "highlight body --showa",
  41. check: {
  42. input: "highlight body --showa",
  43. hints: "ll [options]",
  44. markup: "VVVVVVVVVVVVVVVIIIIIII",
  45. status: "ERROR"
  46. },
  47. exec: {
  48. output: "Error: Too many arguments"
  49. }
  50. },
  51. {
  52. setup: "highlight body --r",
  53. check: {
  54. input: "highlight body --r",
  55. hints: "egion [options]",
  56. markup: "VVVVVVVVVVVVVVVIII",
  57. status: "ERROR"
  58. },
  59. exec: {
  60. output: "Error: Too many arguments"
  61. }
  62. },
  63. {
  64. setup: "highlight body --region",
  65. check: {
  66. input: "highlight body --region",
  67. hints: " <selection> [options]",
  68. markup: "VVVVVVVVVVVVVVVIIIIIIII",
  69. status: "ERROR"
  70. },
  71. exec: {
  72. output: "Error: Value required for \u2018region\u2019."
  73. }
  74. },
  75. {
  76. setup: "highlight body --fi",
  77. check: {
  78. input: "highlight body --fi",
  79. hints: "ll [options]",
  80. markup: "VVVVVVVVVVVVVVVIIII",
  81. status: "ERROR"
  82. },
  83. exec: {
  84. output: "Error: Too many arguments"
  85. }
  86. },
  87. {
  88. setup: "highlight body --fill",
  89. check: {
  90. input: "highlight body --fill",
  91. hints: " <string> [options]",
  92. markup: "VVVVVVVVVVVVVVVIIIIII",
  93. status: "ERROR"
  94. },
  95. exec: {
  96. output: "Error: Value required for \u2018fill\u2019."
  97. }
  98. },
  99. {
  100. setup: "highlight body --ke",
  101. check: {
  102. input: "highlight body --ke",
  103. hints: "ep [options]",
  104. markup: "VVVVVVVVVVVVVVVIIII",
  105. status: "ERROR"
  106. },
  107. exec: {
  108. output: "Error: Too many arguments"
  109. }
  110. },
  111. {
  112. setup: "unhighlight",
  113. check: {
  114. input: "unhighlight",
  115. hints: "",
  116. markup: "VVVVVVVVVVV",
  117. status: "VALID"
  118. }
  119. }
  120. ]);
  121. yield helpers.closeToolbar(options);
  122. yield helpers.closeTab(options);
  123. }