browser_webconsole_output_regexp.js 814 B

1234567891011121314151617181920212223242526272829303132333435
  1. /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
  2. /* Any copyright is dedicated to the Public Domain.
  3. * http://creativecommons.org/publicdomain/zero/1.0/ */
  4. // Test the webconsole output for various types of objects.
  5. "use strict";
  6. const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
  7. "test/test-console-output-regexp.html";
  8. var inputTests = [
  9. // 0
  10. {
  11. input: "/foo/igym",
  12. output: "/foo/gimy",
  13. printOutput: "Error: source called",
  14. inspectable: true,
  15. },
  16. ];
  17. function test() {
  18. requestLongerTimeout(2);
  19. Task.spawn(function* () {
  20. let {tab} = yield loadTab(TEST_URI);
  21. let hud = yield openConsole(tab);
  22. return checkOutputForInputs(hud, inputTests);
  23. }).then(finishUp);
  24. }
  25. function finishUp() {
  26. inputTests = null;
  27. finishTest();
  28. }