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 * Test if the correct filtering predicates are used when filtering from
6 * the performance analysis view.
7 */
9 function test() {
10 initNetMonitor(FILTERING_URL).then(([aTab, aDebuggee, aMonitor]) => {
11 info("Starting test... ");
13 let panel = aMonitor.panelWin;
14 let { $, EVENTS, NetMonitorView } = panel;
16 EventUtils.sendMouseEvent({ type: "click" }, $("#requests-menu-filter-html-button"));
17 EventUtils.sendMouseEvent({ type: "click" }, $("#requests-menu-filter-css-button"));
18 EventUtils.sendMouseEvent({ type: "click" }, $("#requests-menu-filter-js-button"));
19 EventUtils.sendMouseEvent({ type: "click" }, $("#requests-menu-filter-other-button"));
20 testFilterButtonsCustom(aMonitor, [0, 1, 1, 1, 0, 0, 0, 0, 0, 1]);
21 ok(true, "The correct filtering predicates are used before entering perf. analysis mode.");
23 promise.all([
24 waitFor(panel, EVENTS.PRIMED_CACHE_CHART_DISPLAYED),
25 waitFor(panel, EVENTS.EMPTY_CACHE_CHART_DISPLAYED)
26 ]).then(() => {
27 EventUtils.sendMouseEvent({ type: "click" }, $(".pie-chart-slice"));
28 testFilterButtons(aMonitor, "html");
29 ok(true, "The correct filtering predicate is used when exiting perf. analysis mode.");
31 teardown(aMonitor).then(finish);
32 });
34 NetMonitorView.toggleFrontendMode();
35 });
36 }