Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

  • This test gets skipped with pattern: os == 'linux' && os_version == '18.04' && processor == 'x86_64' && debug && http3 OR os == 'linux' && os_version == '24.04' && processor == 'x86_64' && display == 'x11' && debug && http3
  • Manifest: devtools/client/netmonitor/test/browser.toml
/* Any copyright is dedicated to the Public Domain.
"use strict";
const ALL_CHANNELS = Ci.nsITelemetry.DATASET_ALL_CHANNELS;
/**
* Test the throttle_change telemetry event.
*/
add_task(async function () {
const { monitor } = await initNetMonitor(SIMPLE_URL, {
requestCount: 1,
});
info("Starting test... ");
const { store, windowRequire } = monitor.panelWin;
const Actions = windowRequire("devtools/client/netmonitor/src/actions/index");
store.dispatch(Actions.batchEnable(false));
// Remove all telemetry events.
Services.telemetry.clearEvents();
// Ensure no events have been logged
const snapshot = Services.telemetry.snapshotEvents(ALL_CHANNELS, true);
ok(!snapshot.parent, "No events have been logged for the main process");
await selectThrottle(monitor, "GPRS");
// Verify existence of the telemetry event.
checkTelemetryEvent(
{
mode: "GPRS",
},
{
method: "throttle_changed",
}
);
return teardown(monitor);
});