Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
1 /* Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ */
4 /**
5 * Tests whether the frontend displays the correct info for a snapshot
6 * after finishing recording.
7 */
9 function ifTestingSupported() {
10 let [target, debuggee, panel] = yield initCanavsDebuggerFrontend(SIMPLE_CANVAS_URL);
11 let { window, EVENTS, $, SnapshotsListView } = panel.panelWin;
13 yield reload(target);
15 let recordingFinished = once(window, EVENTS.SNAPSHOT_RECORDING_FINISHED);
16 SnapshotsListView._onRecordButtonClick();
18 yield recordingFinished;
19 ok(true, "Finished recording a snapshot of the animation loop.");
21 let item = SnapshotsListView.getItemAtIndex(0);
23 is(SnapshotsListView.selectedItem, item,
24 "The first item should now be selected in the snapshots list view (1).");
25 is(SnapshotsListView.selectedIndex, 0,
26 "The first item should now be selected in the snapshots list view (2).");
28 is($(".snapshot-item-calls", item.target).getAttribute("value"), "4 draws, 8 calls",
29 "The placeholder item's calls label is correct.");
30 is($(".snapshot-item-save", item.target).getAttribute("value"), "Save",
31 "The placeholder item's save label is correct.");
32 is($(".snapshot-item-save", item.target).getAttribute("disabled"), "false",
33 "The placeholder item's save label should be clickable.");
35 yield teardown(panel);
36 finish();
37 }