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

Side by Side Diff: chrome/test/data/extensions/management/launch_app/test.js

Issue 8801037: Fix ExtensionManagementApiBrowserTest.LaunchApp to no longer be order-dependent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 break;
12 } 11 }
13 if (item.name == "simple_extension") { 12 if (item.name == "simple_extension") {
14 // Try launching a non-app extension, which should fail. 13 // Try launching a non-app extension, which should fail.
15 var expected_error = "Extension " + item.id + " is not an App"; 14 var expected_error = "Extension " + item.id + " is not an App";
16 chrome.management.launchApp(item.id, function() { 15 chrome.management.launchApp(item.id, function() {
17 if (chrome.extension.lastError && 16 if (chrome.extension.lastError &&
18 chrome.extension.lastError.message == expected_error) { 17 chrome.extension.lastError.message == expected_error) {
19 chrome.test.sendMessage("got_expected_error"); 18 chrome.test.sendMessage("got_expected_error");
20 } 19 }
21 }); 20 });
22 } 21 }
23 } 22 }
24 }); 23 });
25 }; 24 };
26 25
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698