Commit 80a1b322 authored by Erik Luo's avatar Erik Luo Committed by Commit Bot

DevTools: add network throttling presets to command menu

Screenshot: https://imgur.com/a/NN6xOYN

Bug: 784231
Change-Id: I799e76c74f6e08bd64b1213918c7ce30135c69fa
Reviewed-on: https://chromium-review.googlesource.com/1100314Reviewed-by: default avatarDmitry Gozman <dgozman@chromium.org>
Commit-Queue: Erik Luo <luoe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567752}
parent 115ece2f
......@@ -251,6 +251,14 @@ MobileThrottling.ThrottlingManager.ActionDelegate = class {
SDK.multitargetNetworkManager.setNetworkConditions(SDK.NetworkManager.NoThrottlingConditions);
return true;
}
if (actionId === 'network-conditions.network-low-end-mobile') {
SDK.multitargetNetworkManager.setNetworkConditions(SDK.NetworkManager.Slow3GConditions);
return true;
}
if (actionId === 'network-conditions.network-mid-tier-mobile') {
SDK.multitargetNetworkManager.setNetworkConditions(SDK.NetworkManager.Fast3GConditions);
return true;
}
if (actionId === 'network-conditions.network-offline') {
SDK.multitargetNetworkManager.setNetworkConditions(SDK.NetworkManager.OfflineConditions);
return true;
......
......@@ -12,7 +12,23 @@
"category": "Network",
"title": "Go offline",
"className": "MobileThrottling.ThrottlingManager.ActionDelegate",
"tags": "device"
"tags": "device, throttling"
},
{
"type": "action",
"actionId": "network-conditions.network-low-end-mobile",
"category": "Network",
"title": "Enable slow 3G throttling",
"className": "MobileThrottling.ThrottlingManager.ActionDelegate",
"tags": "device, throttling"
},
{
"type": "action",
"actionId": "network-conditions.network-mid-tier-mobile",
"category": "Network",
"title": "Enable fast 3G throttling",
"className": "MobileThrottling.ThrottlingManager.ActionDelegate",
"tags": "device, throttling"
},
{
"type": "action",
......@@ -20,7 +36,7 @@
"category": "Network",
"title": "Go online",
"className": "MobileThrottling.ThrottlingManager.ActionDelegate",
"tags": "device"
"tags": "device, throttling"
},
{
"type": "view",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment