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

Unified Diff: chrome/test/data/webui/settings/fake_networking_private.js

Issue 2720503006: MD Settings: Internet: Move network lists to a subpage (Closed)
Patch Set: Rebase Created 3 years, 10 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/test/data/webui/settings/fake_networking_private.js
diff --git a/chrome/test/data/webui/settings/fake_networking_private.js b/chrome/test/data/webui/settings/fake_networking_private.js
index 730962efe046043a3b69ea134dd9fa09596d49a8..d6421e70b73f519a0d897d8bce909251abafe9c8 100644
--- a/chrome/test/data/webui/settings/fake_networking_private.js
+++ b/chrome/test/data/webui/settings/fake_networking_private.js
@@ -72,7 +72,14 @@ cr.define('settings', function() {
/** @override */
getNetworks: function(filter, callback) {
- callback(this.networkStates_);
+ var type = filter.networkType;
+ if (type == chrome.networkingPrivate.NetworkType.ALL) {
+ callback(this.networkStates_.slice());
+ } else {
+ callback(this.networkStates_.filter(function(state) {
+ return state.Type == type;
+ }));
+ }
},
/** @override */

Powered by Google App Engine
This is Rietveld 408576698