browser_cmd_restart.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /* Any copyright is dedicated to the Public Domain.
  2. * http://creativecommons.org/publicdomain/zero/1.0/ */
  3. // Test that restart command works properly (input wise)
  4. const TEST_URI = "data:text/html;charset=utf-8,gcli-command-restart";
  5. function test() {
  6. helpers.addTabWithToolbar(TEST_URI, function (options) {
  7. return helpers.audit(options, [
  8. {
  9. setup: "restart",
  10. check: {
  11. input: "restart",
  12. markup: "VVVVVVV",
  13. status: "VALID",
  14. args: {
  15. nocache: { value: false },
  16. safemode: { value: false },
  17. }
  18. },
  19. },
  20. {
  21. setup: "restart --nocache",
  22. check: {
  23. input: "restart --nocache",
  24. markup: "VVVVVVVVVVVVVVVVV",
  25. status: "VALID",
  26. args: {
  27. nocache: { value: true },
  28. safemode: { value: false },
  29. }
  30. },
  31. },
  32. {
  33. setup: "restart --safemode",
  34. check: {
  35. input: "restart --safemode",
  36. markup: "VVVVVVVVVVVVVVVVVV",
  37. status: "VALID",
  38. args: {
  39. nocache: { value: false },
  40. safemode: { value: true },
  41. }
  42. },
  43. },
  44. {
  45. setup: "restart --safemode --nocache",
  46. check: {
  47. input: "restart --safemode --nocache",
  48. markup: "VVVVVVVVVVVVVVVVVVVVVVVVVVVV",
  49. status: "VALID",
  50. args: {
  51. nocache: { value: true },
  52. safemode: { value: true },
  53. }
  54. },
  55. },
  56. ]);
  57. }).then(finish, helpers.handleError);
  58. }