Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ */
4 /**
5 * Tests that the frontend UI is properly reconfigured after reloading.
6 */
8 function ifTestingSupported() {
9 let [target, debuggee, panel] = yield initCanavsDebuggerFrontend(SIMPLE_CANVAS_URL);
10 let { window, $, EVENTS } = panel.panelWin;
12 let reset = once(window, EVENTS.UI_RESET);
13 let navigated = reload(target);
15 yield reset;
16 ok(true, "The UI was reset after the refresh button was clicked.");
18 yield navigated;
19 ok(true, "The target finished reloading.");
21 is($("#snapshots-pane").hasAttribute("hidden"), false,
22 "The snapshots pane should still be visible.");
23 is($("#debugging-pane").hasAttribute("hidden"), false,
24 "The debugging pane should still be visible.");
26 is($("#record-snapshot").hasAttribute("checked"), false,
27 "The 'record snapshot' button should not be checked.");
28 is($("#record-snapshot").hasAttribute("disabled"), false,
29 "The 'record snapshot' button should not be disabled.");
31 is($("#record-snapshot").hasAttribute("hidden"), false,
32 "The 'record snapshot' button should now be visible.");
33 is($("#import-snapshot").hasAttribute("hidden"), false,
34 "The 'import snapshot' button should still be visible.");
35 is($("#clear-snapshots").hasAttribute("hidden"), false,
36 "The 'clear snapshots' button should still be visible.");
38 is($("#reload-notice").getAttribute("hidden"), "true",
39 "The reload notice should now be hidden.");
40 is($("#empty-notice").hasAttribute("hidden"), false,
41 "The empty notice should now be visible.");
42 is($("#import-notice").getAttribute("hidden"), "true",
43 "The import notice should now be hidden.");
45 is($("#snapshot-filmstrip").getAttribute("hidden"), "true",
46 "The snapshot filmstrip should still be hidden.");
47 is($("#screenshot-container").getAttribute("hidden"), "true",
48 "The screenshot container should still be hidden.");
50 is($("#debugging-pane-contents").getAttribute("hidden"), "true",
51 "The rest of the UI should still be hidden.");
53 yield teardown(panel);
54 finish();
55 }