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

Unified Diff: chrome/test/data/extensions/api_test/webstore_private/icon_url.js

Issue 15292011: Prevent duplicate webstore install requests being serviced. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tests Created 7 years, 7 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
« no previous file with comments | « chrome/test/data/extensions/api_test/webstore_private/common.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/webstore_private/icon_url.js
diff --git a/chrome/test/data/extensions/api_test/webstore_private/icon_url.js b/chrome/test/data/extensions/api_test/webstore_private/icon_url.js
index 0b86916100e236b190e1748f922f24b89da35649..13f448186da23fcaaff0f2494a4c31ae2eb68ae0 100644
--- a/chrome/test/data/extensions/api_test/webstore_private/icon_url.js
+++ b/chrome/test/data/extensions/api_test/webstore_private/icon_url.js
@@ -9,6 +9,16 @@ function makeAbsoluteUrl(path) {
return parts.join("/");
}
+// The |absoluteIconUrl| parameter controls whether to use a relative or
+// absolute url for the test.
+function runSuccessTest(absoluteIconUrl, manifest) {
+ var iconPath = "extension/icon.png";
+ var iconUrl = absoluteIconUrl ? makeAbsoluteUrl(iconPath) : iconPath;
+ installAndCleanUp(
+ {'id': extensionId,'iconUrl': iconUrl, 'manifest': manifest },
+ function() {});
+}
+
var tests = [
function IconUrlFailure() {
var manifest = getManifest();
@@ -22,18 +32,12 @@ var tests = [
function IconUrlSuccess() {
var manifest = getManifest();
+ runSuccessTest(false, manifest);
+ },
- // The |absoluteIconUrl| parameter controls whether to use a relative or
- // absolute url for the test.
- function runSuccessTest(absoluteIconUrl) {
- var iconPath = "extension/icon.png";
- var iconUrl = absoluteIconUrl ? makeAbsoluteUrl(iconPath) : iconPath;
- chrome.webstorePrivate.beginInstallWithManifest3(
- {'id': extensionId,'iconUrl': iconUrl, 'manifest': manifest },
- callbackPass());
- }
- runSuccessTest(true);
- runSuccessTest(false);
+ function IconUrlSuccessAbsoluteUrl() {
+ var manifest = getManifest();
+ runSuccessTest(true, manifest);
}
];
« no previous file with comments | « chrome/test/data/extensions/api_test/webstore_private/common.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698