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

Unified Diff: chrome/test/data/extensions/api_test/extension_gallery_install/test.html

Issue 4727001: Split the private webstore install API into two parts.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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/extension_gallery_install/test.html
===================================================================
--- chrome/test/data/extensions/api_test/extension_gallery_install/test.html (revision 65457)
+++ chrome/test/data/extensions/api_test/extension_gallery_install/test.html (working copy)
@@ -16,7 +16,7 @@
if (id == extension.id)
found = true;
});
-
+
callback(found);
});
}
@@ -26,10 +26,10 @@
chrome.test.assertEq(false, installed);
// Install "gallery" extensions.
- chrome.management.onInstalled.addListener(function(info) {
+ chrome.management.onInstalled.addListener(function(info) {
chrome.test.assertEq(id, info.id);
console.log("Installed " + info.id);
-
+
// Double check it is installed.
checkInstalled(function(installed) {
chrome.test.assertEq(true, installed);
@@ -39,7 +39,7 @@
// And check that it's gone.
checkInstalled(function(installed) {
chrome.test.assertEq(false, installed);
-
+
chrome.test.succeed();
});
});
@@ -50,8 +50,17 @@
});
});
});
- chrome.webstorePrivate.install(id, function() {
+ chrome.webstorePrivate.beginInstall(id, function() {
+ if (window.location.href.indexOf("expect_error=true") > 0) {
+ chrome.test.assertEq(chrome.extension.lastError.message,
+ "This function must be called during a user gesture");
+ chrome.test.succeed();
+ return;
+ }
chrome.test.assertNoLastError();
+ chrome.webstorePrivate.completeInstall(id, function() {
Erik does not do reviews 2010/11/09 16:32:21 seems like you need a couple of tests that call co
asargent_no_longer_on_chrome 2010/11/10 00:23:48 I've simplified this test and added others to cove
+ chrome.test.assertNoLastError();
+ });
});
console.log("Installing...");
});

Powered by Google App Engine
This is Rietveld 408576698