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

Unified Diff: chrome/browser/ui/webui/extensions/extension_settings_browsertest.js

Issue 1060993003: [Extensions UI] Use developerPrivate API for profile configuration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/ui/webui/extensions/extension_settings_browsertest.js
diff --git a/chrome/browser/ui/webui/extensions/extension_settings_browsertest.js b/chrome/browser/ui/webui/extensions/extension_settings_browsertest.js
index ef1ff39d7d718b8692b76b2b6755d64ee0476ea1..f96ed80fa3bb9b4052bf16d6ba11236aab89829d 100644
--- a/chrome/browser/ui/webui/extensions/extension_settings_browsertest.js
+++ b/chrome/browser/ui/webui/extensions/extension_settings_browsertest.js
@@ -119,6 +119,18 @@ BasicExtensionSettingsWebUITest.prototype = {
});
});
},
+
+ /** @protected */
+ verifyDeveloperModeWorks: function() {
+ var extensionSettings = getRequiredElement('extension-settings');
+ assertFalse(extensionSettings.classList.contains('dev-mode'));
+ $('toggle-dev-on').click();
+ assertTrue(extensionSettings.classList.contains('dev-mode'));
+ chrome.developerPrivate.getProfileConfiguration(function(profileInfo) {
+ assertTrue(profileInfo.inDeveloperMode);
+ this.nextStep();
+ }.bind(this));
+ },
};
TEST_F('BasicExtensionSettingsWebUITest', 'testDisable', function() {
@@ -143,6 +155,21 @@ TEST_F('BasicExtensionSettingsWebUITest', 'testUninstall', function() {
this.nextStep();
});
+TEST_F('BasicExtensionSettingsWebUITest', 'testDeveloperMode', function() {
+ var next = this.nextStep.bind(this);
+ var checkDevModeIsOff = function() {
+ chrome.developerPrivate.getProfileConfiguration(function(profileInfo) {
+ assertFalse(profileInfo.inDeveloperMode);
+ next();
+ });
+ };
+ this.steps = [checkDevModeIsOff,
+ this.waitForPageLoad,
+ this.verifyDeveloperModeWorks,
+ testDone];
+ this.nextStep();
+});
+
function AsyncExtensionSettingsWebUITest() {}
AsyncExtensionSettingsWebUITest.prototype = {
« no previous file with comments | « chrome/browser/resources/extensions/extensions.js ('k') | chrome/browser/ui/webui/extensions/extension_settings_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698