Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

/* Any copyright is dedicated to the Public Domain.
"use strict";
// Test changing the network throttling state
const {
changeNetworkThrottling,
add_task(async function () {
const store = Store();
const { getState, dispatch } = store;
ok(
!getState().networkThrottling.enabled,
"Network throttling is disabled by default."
);
equal(
getState().networkThrottling.profile,
"",
"Network throttling profile is empty by default."
);
dispatch(changeNetworkThrottling(true, "Bob"));
ok(getState().networkThrottling.enabled, "Network throttling is enabled.");
equal(
getState().networkThrottling.profile,
"Bob",
"Network throttling profile is set."
);
});