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

Unified Diff: chrome/test/data/extensions/api_test/webstore_private/install_bundle_invalid.html

Issue 9414013: Add a webstore API for installing bundles of extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix debug build Created 8 years, 10 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/webstore_private/install_bundle_invalid.html
diff --git a/chrome/test/data/extensions/api_test/webstore_private/install_bundle_invalid.html b/chrome/test/data/extensions/api_test/webstore_private/install_bundle_invalid.html
new file mode 100644
index 0000000000000000000000000000000000000000..a144718c9a1c9cdf36ce0d8a03eac930e6a23a5b
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/webstore_private/install_bundle_invalid.html
@@ -0,0 +1,73 @@
+<!--
+ * Copyright (c) 2012 The Chromium Authors. All rights reserved. Use of this
+ * source code is governed by a BSD-style license that can be found in the
+ * LICENSE file.
+-->
+<script src="common.js"></script>
+<script>
+
+var bundleItems = [
+ {
+ id: 'begfmnajjkbjdgmffnjaojchoncnmngg',
+ manifest: getManifest('bundle/app1.json'),
+ localizedName: 'app.1'
+ },
+ {
+ id: 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', // Invalid CRX.
+ manifest: getManifest('bundle/app2.json'),
+ localizedName: 'app.2'
+ },
+ {
+ id: 'bmfoocgfinpmkmlbjhcbofejhkhlbchk', // Wrong manifest.
+ manifest: getManifest('bundle/extension2.json'),
+ localizedName: 'extension.1'
+ },
+ {
+ id: 'pkapffpjmiilhlhbibjhamlmdhfneidj',
+ manifest: getManifest('bundle/extension2.json'),
+ localizedName: 'extension.2'
+ }
+];
+
+var installed = [
+ 'begfmnajjkbjdgmffnjaojchoncnmngg',
+ 'pkapffpjmiilhlhbibjhamlmdhfneidj'
+];
+
+var failed = [
+ 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
+ 'bmfoocgfinpmkmlbjhcbofejhkhlbchk'
+];
+
+runTests([
+ function successfulInstall() {
+ chrome.webstorePrivate.installBundle(
+ bundleItems, callbackPass(function() {
+ installed.forEach(function(id) {
+ checkItemInstalled(
+ id,
+ callbackPass(function(result) { assertTrue(result); }));
+ });
+ failed.forEach(function(id) {
+ checkItemInstalled(
+ id,
+ callbackPass(function(result) { assertFalse(result); }));
+ });
+ }));
+ },
+
+ function allItemsFail() {
+ chrome.webstorePrivate.installBundle(
+ [bundleItems[2]], callbackPass(function() {
+ checkItemInstalled(
+ bundleItems[2].id,
+ callbackPass(function(result) { assertFalse(result); }));
+ }));
+ },
+
+ function noItems() {
+ chrome.webstorePrivate.installBundle([], callbackFail("unknown_error"));
+ }
+]);
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698