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

Unified Diff: chrome/test/data/extensions/api_test/management/management_policy/prohibited.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
Index: chrome/test/data/extensions/api_test/management/management_policy/prohibited.js
diff --git a/chrome/test/data/extensions/api_test/management/management_policy/prohibited.js b/chrome/test/data/extensions/api_test/management/management_policy/prohibited.js
index 2e28ea01a2d0f731ab1deede0ad84f25e539782b..9ec420412e3a61ee149b98eee8445cc01161c597 100644
--- a/chrome/test/data/extensions/api_test/management/management_policy/prohibited.js
+++ b/chrome/test/data/extensions/api_test/management/management_policy/prohibited.js
@@ -9,7 +9,7 @@ var ENABLED_NAME = 'enabled_extension';
var DISABLED_NAME = 'disabled_extension';
var UNINSTALL_NAME = 'enabled_extension';
-var EXPECTED_ERROR = 'Extension * cannot be modified by user';
+var EXPECTED_ERROR = 'Extension * cannot be modified by user.';
// Given a list of extension items, finds the one with the given name.
function findByName(items, name) {
@@ -69,8 +69,10 @@ var tests = [
var id = item.id;
var expectedError = EXPECTED_ERROR.replace('*', id);
- chrome.management.uninstall(id,
- callback(function() { checkEnabled(id, true); }, expectedError));
+ chrome.test.runWithUserGesture(function() {
+ chrome.management.uninstall(id,
+ callback(function() { checkEnabled(id, true); }, expectedError));
+ });
}));
}
];

Powered by Google App Engine
This is Rietveld 408576698