summaryrefslogtreecommitdiffstats
path: root/devtools/client/canvasdebugger/test/browser_canvas-frontend-reload-01.js
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /devtools/client/canvasdebugger/test/browser_canvas-frontend-reload-01.js
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'devtools/client/canvasdebugger/test/browser_canvas-frontend-reload-01.js')
-rw-r--r--devtools/client/canvasdebugger/test/browser_canvas-frontend-reload-01.js55
1 files changed, 55 insertions, 0 deletions
diff --git a/devtools/client/canvasdebugger/test/browser_canvas-frontend-reload-01.js b/devtools/client/canvasdebugger/test/browser_canvas-frontend-reload-01.js
new file mode 100644
index 000000000..cf353aa27
--- /dev/null
+++ b/devtools/client/canvasdebugger/test/browser_canvas-frontend-reload-01.js
@@ -0,0 +1,55 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+/**
+ * Tests that the frontend UI is properly reconfigured after reloading.
+ */
+
+function* ifTestingSupported() {
+ let { target, panel } = yield initCanvasDebuggerFrontend(SIMPLE_CANVAS_URL);
+ let { window, $, EVENTS } = panel.panelWin;
+
+ let reset = once(window, EVENTS.UI_RESET);
+ let navigated = reload(target);
+
+ yield reset;
+ ok(true, "The UI was reset after the refresh button was clicked.");
+
+ yield navigated;
+ ok(true, "The target finished reloading.");
+
+ is($("#snapshots-pane").hasAttribute("hidden"), false,
+ "The snapshots pane should still be visible.");
+ is($("#debugging-pane").hasAttribute("hidden"), false,
+ "The debugging pane should still be visible.");
+
+ is($("#record-snapshot").hasAttribute("checked"), false,
+ "The 'record snapshot' button should not be checked.");
+ is($("#record-snapshot").hasAttribute("disabled"), false,
+ "The 'record snapshot' button should not be disabled.");
+
+ is($("#record-snapshot").hasAttribute("hidden"), false,
+ "The 'record snapshot' button should now be visible.");
+ is($("#import-snapshot").hasAttribute("hidden"), false,
+ "The 'import snapshot' button should still be visible.");
+ is($("#clear-snapshots").hasAttribute("hidden"), false,
+ "The 'clear snapshots' button should still be visible.");
+
+ is($("#reload-notice").getAttribute("hidden"), "true",
+ "The reload notice should now be hidden.");
+ is($("#empty-notice").hasAttribute("hidden"), false,
+ "The empty notice should now be visible.");
+ is($("#waiting-notice").getAttribute("hidden"), "true",
+ "The waiting notice should now be hidden.");
+
+ is($("#snapshot-filmstrip").getAttribute("hidden"), "true",
+ "The snapshot filmstrip should still be hidden.");
+ is($("#screenshot-container").getAttribute("hidden"), "true",
+ "The screenshot container should still be hidden.");
+
+ is($("#debugging-pane-contents").getAttribute("hidden"), "true",
+ "The rest of the UI should still be hidden.");
+
+ yield teardown(panel);
+ finish();
+}