blob: a34ba21eaf02540b7c9b090f06a83a90986118f7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
/**
* Tests that the overview continuously renders content when recording.
*/
const { Constants } = require("devtools/client/performance/modules/constants");
const { SIMPLE_URL } = require("devtools/client/performance/test/helpers/urls");
const { initPerformanceInNewTab, teardownToolboxAndRemoveTab } = require("devtools/client/performance/test/helpers/panel-utils");
const { startRecording, stopRecording } = require("devtools/client/performance/test/helpers/actions");
const { times } = require("devtools/client/performance/test/helpers/event-utils");
add_task(function* () {
let { panel } = yield initPerformanceInNewTab({
url: SIMPLE_URL,
win: window
});
let { EVENTS, OverviewView } = panel.panelWin;
yield startRecording(panel);
// Ensure overview keeps rendering.
yield times(OverviewView, EVENTS.UI_OVERVIEW_RENDERED, 3, {
expectedArgs: { "1": Constants.FRAMERATE_GRAPH_LOW_RES_INTERVAL }
});
ok(true, "Overview was rendered while recording.");
yield stopRecording(panel);
yield teardownToolboxAndRemoveTab(panel);
});
|