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 if the slider in the calls list view works as advertised.
6 */
8 function ifTestingSupported() {
9 let [target, debuggee, panel] = yield initCanavsDebuggerFrontend(SIMPLE_CANVAS_URL);
10 let { window, $, EVENTS, SnapshotsListView, CallsListView } = panel.panelWin;
12 yield reload(target);
14 let recordingFinished = once(window, EVENTS.SNAPSHOT_RECORDING_FINISHED);
15 let callListPopulated = once(window, EVENTS.CALL_LIST_POPULATED);
16 SnapshotsListView._onRecordButtonClick();
17 yield promise.all([recordingFinished, callListPopulated]);
19 is(CallsListView.selectedIndex, -1,
20 "No item in the function calls list should be initially selected.");
22 is($("#calls-slider").value, 0,
23 "The slider should be moved all the way to the start.");
24 is($("#calls-slider").min, 0,
25 "The slider minimum value should be 0.");
26 is($("#calls-slider").max, 7,
27 "The slider maximum value should be 7.");
29 CallsListView.selectedIndex = 1;
30 is($("#calls-slider").value, 1,
31 "The slider should be changed according to the current selection.");
33 $("#calls-slider").value = 2;
34 is(CallsListView.selectedIndex, 2,
35 "The calls selection should be changed according to the current slider value.");
37 yield teardown(panel);
38 finish();
39 }