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

Side by Side Diff: chrome/test/data/extensions/management/launch_app/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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 window.onload = function() { 5 window.onload = function() {
6 chrome.management.getAll(function(items) { 6 chrome.management.getAll(function(items) {
7 for (var i in items) { 7 for (var i in items) {
8 var item = items[i]; 8 var item = items[i];
9 if (item.name == "packaged_app") { 9 if (item.name == "packaged_app") {
10 chrome.management.launchApp(item.id); 10 chrome.management.launchApp(item.id);
11 } 11 }
12 if (item.name == "simple_extension") { 12 if (item.name == "simple_extension") {
13 // Try launching a non-app extension, which should fail. 13 // Try launching a non-app extension, which should fail.
14 var expected_error = "Extension " + item.id + " is not an App"; 14 var expected_error = "Extension " + item.id + " is not an App.";
15 chrome.management.launchApp(item.id, function() { 15 chrome.management.launchApp(item.id, function() {
16 if (chrome.runtime.lastError && 16 if (chrome.runtime.lastError &&
17 chrome.runtime.lastError.message == expected_error) { 17 chrome.runtime.lastError.message == expected_error) {
18 chrome.test.sendMessage("got_expected_error"); 18 chrome.test.sendMessage("got_expected_error");
19 } 19 }
20 }); 20 });
21 } 21 }
22 } 22 }
23 }); 23 });
24 }; 24 };
25 25
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698