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

Unified Diff: chrome/browser/resources/options/chromeos/onc_data.js

Issue 566063002: Compile chrome://settings, part 8: the final battle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@H_options_errors_6
Patch Set: fixed one nit Created 6 years, 3 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
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;
},

Powered by Google App Engine
This is Rietveld 408576698