Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(829)

Unified Diff: Source/devtools/front_end/components/NetworkConditionsSelector.js

Issue 1300483002: [DevTools] Add maximum limit to throttling values. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/components/NetworkConditionsSelector.js
diff --git a/Source/devtools/front_end/components/NetworkConditionsSelector.js b/Source/devtools/front_end/components/NetworkConditionsSelector.js
index 86c338e9d55bd21e944b9e67aaf4cc09f9717a99..0a4fb32344c24bfb3b23e0d8042cd9abb1bd8532 100644
--- a/Source/devtools/front_end/components/NetworkConditionsSelector.js
+++ b/Source/devtools/front_end/components/NetworkConditionsSelector.js
@@ -38,7 +38,7 @@ WebInspector.NetworkConditionsSelector.throughputText = function(conditions)
*/
WebInspector.NetworkConditionsSelector.throughputValidator = function(value)
{
- if (!value || (/^[\d]+(\.\d+)?|\.\d+$/.test(value) && value >= 0))
+ if (!value || (/^[\d]+(\.\d+)?|\.\d+$/.test(value) && value >= 0 && value <= 10000000))
return "";
return WebInspector.UIString("Value must be non-negative float");
}
@@ -49,7 +49,7 @@ WebInspector.NetworkConditionsSelector.throughputValidator = function(value)
*/
WebInspector.NetworkConditionsSelector.latencyValidator = function(value)
{
- if (!value || (/^[\d]+$/.test(value) && value >= 0))
+ if (!value || (/^[\d]+$/.test(value) && value >= 0 && value <= 1000000))
return "";
return WebInspector.UIString("Value must be non-negative integer");
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698