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

Unified Diff: chrome/test/data/extensions/api_test/webstore_inline_install/find_link.html

Issue 7795032: Add link URL and success/failure callback parameters to chrome.webstore.install() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review feedback Created 9 years, 3 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_inline_install/find_link.html
diff --git a/chrome/test/data/extensions/api_test/webstore_inline_install/find_link.html b/chrome/test/data/extensions/api_test/webstore_inline_install/find_link.html
index 95710d2613cf4937097941608b0453ae7579549d..6c735d7027eec6c292adcca80ab28ec859d9f84e 100644
--- a/chrome/test/data/extensions/api_test/webstore_inline_install/find_link.html
+++ b/chrome/test/data/extensions/api_test/webstore_inline_install/find_link.html
@@ -7,9 +7,9 @@
var NO_LINK_EXCEPTION = 'No Chrome Web Store item link found.';
var INVALID_URL_EXCEPTION = 'Invalid Chrome Web Store item URL.';
- function checkNoLinkFound(expectedException) {
+ function checkNoLinkFound(expectedException, opt_preferredStoreUrl) {
try {
- chrome.webstore.install();
+ chrome.webstore.install(opt_preferredStoreUrl);
console.log('Exception should have been thrown');
window.domAutomationController.send(false);
return;
@@ -55,6 +55,13 @@
galleryUrl + '/detail/mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm?foo=bar';
checkNoLinkFound(INVALID_URL_EXCEPTION);
+ // Non-existent preferred link.
+ linkNode.rel = 'chrome-webstore-item';
+ linkNode.href = galleryUrl + '/detail/mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm';
+ checkNoLinkFound(
+ NO_LINK_EXCEPTION,
+ galleryUrl + '/detail/iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii');
+
// Successful installation is tested elsewhere
window.domAutomationController.send(true);
}

Powered by Google App Engine
This is Rietveld 408576698