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