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

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

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

mercurial