browser/devtools/canvasdebugger/test/browser_canvas-frontend-open.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/browser/devtools/canvasdebugger/test/browser_canvas-frontend-open.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,41 @@
     1.4 +/* Any copyright is dedicated to the Public Domain.
     1.5 +   http://creativecommons.org/publicdomain/zero/1.0/ */
     1.6 +
     1.7 +/**
     1.8 + * Tests that the frontend UI is properly configured when opening the tool.
     1.9 + */
    1.10 +
    1.11 +function ifTestingSupported() {
    1.12 +  let [target, debuggee, panel] = yield initCanavsDebuggerFrontend(SIMPLE_CANVAS_URL);
    1.13 +  let { $ } = panel.panelWin;
    1.14 +
    1.15 +  is($("#snapshots-pane").hasAttribute("hidden"), false,
    1.16 +    "The snapshots pane should initially be visible.");
    1.17 +  is($("#debugging-pane").hasAttribute("hidden"), false,
    1.18 +    "The debugging pane should initially be visible.");
    1.19 +
    1.20 +  is($("#record-snapshot").getAttribute("hidden"), "true",
    1.21 +    "The 'record snapshot' button should initially be hidden.");
    1.22 +  is($("#import-snapshot").hasAttribute("hidden"), false,
    1.23 +    "The 'import snapshot' button should initially be visible.");
    1.24 +  is($("#clear-snapshots").hasAttribute("hidden"), false,
    1.25 +    "The 'clear snapshots' button should initially be visible.");
    1.26 +
    1.27 +  is($("#reload-notice").hasAttribute("hidden"), false,
    1.28 +    "The reload notice should initially be visible.");
    1.29 +  is($("#empty-notice").getAttribute("hidden"), "true",
    1.30 +    "The empty notice should initially be hidden.");
    1.31 +  is($("#import-notice").getAttribute("hidden"), "true",
    1.32 +    "The import notice should initially be hidden.");
    1.33 +
    1.34 +  is($("#screenshot-container").getAttribute("hidden"), "true",
    1.35 +    "The screenshot container should initially be hidden.");
    1.36 +  is($("#snapshot-filmstrip").getAttribute("hidden"), "true",
    1.37 +    "The snapshot filmstrip should initially be hidden.");
    1.38 +
    1.39 +  is($("#debugging-pane-contents").getAttribute("hidden"), "true",
    1.40 +    "The rest of the UI should initially be hidden.");
    1.41 +
    1.42 +  yield teardown(panel);
    1.43 +  finish();
    1.44 +}

mercurial