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

Unified Diff: chrome/test/data/extensions/management/uninstall_extension/background.js

Issue 137793011: Require user confirmation for chrome.management.uninstall except when uninstalling self. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ExtensionManagementApiBrowserTest.LaunchApp Created 6 years, 11 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
« no previous file with comments | « chrome/test/data/extensions/management/launch_app/test.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/extensions/management/uninstall_extension/background.js
diff --git a/chrome/test/data/extensions/management/uninstall_extension/background.js b/chrome/test/data/extensions/management/uninstall_extension/background.js
index 5ea92dd57847f9f8192ddc5234cc423fd54db20e..f105df0913eb20f2c0199743fdc30a3f50a9432b 100644
--- a/chrome/test/data/extensions/management/uninstall_extension/background.js
+++ b/chrome/test/data/extensions/management/uninstall_extension/background.js
@@ -11,11 +11,13 @@ chrome.management.getAll(function(items) {
if (item.name != EXPECTED_NAME) continue;
var id = item.id;
chrome.test.assertEq(false, item.mayDisable);
- chrome.management.uninstall(id, function() {
- // Check that the right error occured.
- var expectedError = 'Extension ' + id + ' cannot be modified by user';
- chrome.test.assertEq(expectedError, chrome.runtime.lastError.message);
- chrome.test.sendMessage('ready');
+ chrome.test.runWithUserGesture(function() {
+ chrome.management.uninstall(id, function() {
+ // Check that the right error occured.
+ var expectedError = 'Extension ' + id + ' cannot be modified by user.';
+ chrome.test.assertEq(expectedError, chrome.runtime.lastError.message);
+ chrome.test.sendMessage('ready');
+ });
});
}
});
« no previous file with comments | « chrome/test/data/extensions/management/launch_app/test.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698