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

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

Issue 3462011: Manual merge of 60334 - Add a launchApp method to extension management API.... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/517/src/
Patch Set: Created 10 years, 2 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
Property Changes:
Name: svn:eol-style
+ LF
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 if (!chrome.management) {
6 chrome.management = chrome.experimental.management;
7 }
8
9 window.onload = function() {
10 chrome.management.getAll(function(items) {
11 for (var i in items) {
12 var item = items[i];
13 if (item.name == "packaged_app") {
14 chrome.management.launchApp(item.id);
15 break;
16 }
17 if (item.name == "simple_extension") {
18 // Try launching a non-app extension, which should fail.
19 var expected_error = "Extension " + item.id + " is not an App";
20 chrome.management.launchApp(item.id, function() {
21 if (chrome.extension.lastError &&
22 chrome.extension.lastError.message == expected_error) {
23 chrome.test.sendMessage("got_expected_error");
24 }
25 });
26 }
27 }
28 });
29 };
30
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698