Chromium Code Reviews| 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..599df749d30a25f4d9861df93cec7e4c52a691d8 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')); |
| + getRequiredElement('toggle-dev-on').click(); |
|
Dan Beam
2015/04/10 02:48:06
there's really no downside to using getRequiredEle
Devlin
2015/04/10 16:30:38
Fair point. C++ habit carryover where a failed AS
|
| + 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 = { |