browser_webconsole_netlogging_basic.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* vim:set ts=2 sw=2 sts=2 et: */
  2. /* Any copyright is dedicated to the Public Domain.
  3. * http://creativecommons.org/publicdomain/zero/1.0/ */
  4. // Tests that the page's resources are displayed in the console as they're
  5. // loaded
  6. "use strict";
  7. const TEST_NETWORK_URI = "http://example.com/browser/devtools/client/" +
  8. "webconsole/test/test-network.html" + "?_date=" +
  9. Date.now();
  10. add_task(function* () {
  11. yield loadTab("data:text/html;charset=utf-8,Web Console basic network " +
  12. "logging test");
  13. let hud = yield openConsole();
  14. yield BrowserTestUtils.loadURI(gBrowser.selectedBrowser, TEST_NETWORK_URI);
  15. yield waitForMessages({
  16. webconsole: hud,
  17. messages: [{
  18. text: "running network console",
  19. category: CATEGORY_WEBDEV,
  20. severity: SEVERITY_LOG,
  21. },
  22. {
  23. text: "test-network.html",
  24. category: CATEGORY_NETWORK,
  25. severity: SEVERITY_LOG,
  26. },
  27. {
  28. text: "testscript.js",
  29. category: CATEGORY_NETWORK,
  30. severity: SEVERITY_LOG,
  31. },
  32. {
  33. text: "test-image.png",
  34. category: CATEGORY_NETWORK,
  35. severity: SEVERITY_LOG,
  36. }],
  37. });
  38. });