Chromium Code Reviews| Index: chrome/browser/resources/options/chromeos/onc_data.js |
| diff --git a/chrome/browser/resources/options/chromeos/onc_data.js b/chrome/browser/resources/options/chromeos/onc_data.js |
| index a7bfdf0415c6f75e790694aa25460691bb0883d1..050e540a5ec646834b8bee5fe34b066e9393e641 100644 |
| --- a/chrome/browser/resources/options/chromeos/onc_data.js |
| +++ b/chrome/browser/resources/options/chromeos/onc_data.js |
| @@ -11,7 +11,7 @@ |
| cr.exportPath('cr.onc'); |
| /** |
| - * @typedef {(Object|Array|string|undefined)} |
| + * @typedef {(Object|Array|string|number|undefined)} |
| */ |
| cr.onc.OncValue; |
| @@ -154,6 +154,7 @@ cr.define('cr.onc', function() { |
| var source = this.getActiveValue('Source'); |
| if (source == undefined) |
| return 'None'; |
| + assert(typeof source == 'string'); |
|
arv (Not doing code reviews)
2014/09/29 22:46:27
I'm not sure we want to add runtime asserts for th
Vitaly Pavlenko
2014/09/30 03:52:02
getActiveValue sometimes returns arrays:
https://
|
| return source; |
| }, |
| @@ -165,6 +166,7 @@ cr.define('cr.onc', function() { |
| var security = this.getActiveValue('WiFi.Security'); |
| if (security == undefined) |
| return 'None'; |
| + assert(typeof security == 'string'); |
| return security; |
| }, |