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

Unified Diff: chrome/test/data/extensions/api_test/runtime/uninstall_url/test.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/runtime/uninstall_url/test.js
diff --git a/chrome/test/data/extensions/api_test/runtime/uninstall_url/test.js b/chrome/test/data/extensions/api_test/runtime/uninstall_url/test.js
index 8cf2fc3b67965bc46eca042944b8911ff4dbbe79..5d42e56f4e14c739ed9649fc5320fee0779e5900 100644
--- a/chrome/test/data/extensions/api_test/runtime/uninstall_url/test.js
+++ b/chrome/test/data/extensions/api_test/runtime/uninstall_url/test.js
@@ -12,13 +12,14 @@ var uninstalled = false;
chrome.test.runTests([
function uninstallURL() {
chrome.management.getAll(function(results) {
- for(var i = 0;i<results.length;i++)
- {
+ for(var i = 0; i < results.length; i++) {
if (results[i].name == sets_uninstall_url) {
- chrome.management.uninstall(results[i].id, pass(function() {
- chrome.tabs.query({'url': uninstall_url}, pass(function(tabs) {
- chrome.test.assertEq(tabs.length, 1);
- chrome.test.assertEq(tabs[0].url, uninstall_url);
+ chrome.test.runWithUserGesture(pass(function() {
+ chrome.management.uninstall(results[i].id, pass(function() {
+ chrome.tabs.query({'url': uninstall_url}, pass(function(tabs) {
+ chrome.test.assertEq(tabs.length, 1);
+ chrome.test.assertEq(tabs[0].url, uninstall_url);
+ }));
}));
}));
uninstalled = true;

Powered by Google App Engine
This is Rietveld 408576698