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

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

Issue 2522773002: MD Settings: extension-controlled indicators for default search engine (Closed)
Patch Set: test Created 4 years, 1 month 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 | « chrome/browser/resources/settings/search_page/search_page.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1e0b4a9917603c87c2964f4a369642256c500ad8..fec19629c506957a61a5d396b3d7457c9b71e56c 100644
--- a/chrome/test/data/webui/settings/search_page_test.js
+++ b/chrome/test/data/webui/settings/search_page_test.js
@@ -73,6 +73,31 @@ cr.define('settings_search_page', function() {
});
});
});
+
+ test('ControlledByExtension', function() {
+ return browserProxy.whenCalled('getSearchEnginesList').then(function() {
+ var selectElement = page.$$('select');
+ assertFalse(selectElement.disabled);
+ assertFalse(!!page.$$('extension-controlled-indicator'));
+
+ page.prefs = {
+ default_search_provider: {
+ enabled: {
+ controlledBy: chrome.settingsPrivate.ControlledBy.EXTENSION,
+ controlledByName: 'fake extension name',
+ enforcement: chrome.settingsPrivate.Enforcement.ENFORCED,
+ extensionId: 'fake extension id',
+ extensionCanBeDisabled: true,
+ value: true,
+ },
+ },
+ };
+ Polymer.dom.flush();
+
+ assertTrue(selectElement.disabled);
+ assertTrue(!!page.$$('extension-controlled-indicator'));
+ });
+ });
});
}
« no previous file with comments | « chrome/browser/resources/settings/search_page/search_page.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698