browser_canvas-frontend-open.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* Any copyright is dedicated to the Public Domain.
  2. http://creativecommons.org/publicdomain/zero/1.0/ */
  3. /**
  4. * Tests that the frontend UI is properly configured when opening the tool.
  5. */
  6. function* ifTestingSupported() {
  7. let { target, panel } = yield initCanvasDebuggerFrontend(SIMPLE_CANVAS_URL);
  8. let { $ } = panel.panelWin;
  9. is($("#snapshots-pane").hasAttribute("hidden"), false,
  10. "The snapshots pane should initially be visible.");
  11. is($("#debugging-pane").hasAttribute("hidden"), false,
  12. "The debugging pane should initially be visible.");
  13. is($("#record-snapshot").getAttribute("hidden"), "true",
  14. "The 'record snapshot' button should initially be hidden.");
  15. is($("#import-snapshot").hasAttribute("hidden"), false,
  16. "The 'import snapshot' button should initially be visible.");
  17. is($("#clear-snapshots").hasAttribute("hidden"), false,
  18. "The 'clear snapshots' button should initially be visible.");
  19. is($("#reload-notice").hasAttribute("hidden"), false,
  20. "The reload notice should initially be visible.");
  21. is($("#empty-notice").getAttribute("hidden"), "true",
  22. "The empty notice should initially be hidden.");
  23. is($("#waiting-notice").getAttribute("hidden"), "true",
  24. "The waiting notice should initially be hidden.");
  25. is($("#screenshot-container").getAttribute("hidden"), "true",
  26. "The screenshot container should initially be hidden.");
  27. is($("#snapshot-filmstrip").getAttribute("hidden"), "true",
  28. "The snapshot filmstrip should initially be hidden.");
  29. is($("#debugging-pane-contents").getAttribute("hidden"), "true",
  30. "The rest of the UI should initially be hidden.");
  31. yield teardown(panel);
  32. finish();
  33. }