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

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

Issue 2572963004: MD Settings: Add "Show Google Now cards in the launcher" row in Search section. (Closed)
Patch Set: Rebase Created 4 years 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/search_page_test.js
diff --git a/chrome/test/data/webui/settings/search_page_test.js b/chrome/test/data/webui/settings/search_page_test.js
index 95d3c82d55462fe38103480f2e9986fe070ad2db..c8efd1b5bfbacbfcdff5bbd685de958e46594169 100644
--- a/chrome/test/data/webui/settings/search_page_test.js
+++ b/chrome/test/data/webui/settings/search_page_test.js
@@ -148,6 +148,31 @@ cr.define('settings_search_page', function() {
assertTrue(browserProxy.hotwordSearchEnabled);
});
});
+
+ test('UpdateGoogleNowOnPrefChange', function() {
+ return browserProxy.whenCalled('getGoogleNowAvailability').then(
+ function() {
+ Polymer.dom.flush();
+ assertTrue(page.googleNowAvailable_);
+
+ var checkbox = page.$$('#googleNowEnable');
+ assertTrue(!!checkbox);
+ assertFalse(checkbox.disabled);
+ assertFalse(checkbox.checked);
+
+ page.prefs = {
+ google_now_launcher: {
+ enabled: {
+ type: chrome.settingsPrivate.PrefType.BOOLEAN,
+ value: true,
+ }
+ }
+ };
+ Polymer.dom.flush();
+ assertFalse(checkbox.disabled);
+ assertTrue(checkbox.checked);
+ });
+ });
});
}

Powered by Google App Engine
This is Rietveld 408576698