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

Unified Diff: chrome/test/data/extensions/api_test/webstore_inline_install/install-non-verified-domain.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
« no previous file with comments | « chrome/test/data/extensions/api_test/webstore_inline_install/install.html ('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_inline_install/install-non-verified-domain.html
diff --git a/chrome/test/data/extensions/api_test/webstore_inline_install/install-non-verified-domain.html b/chrome/test/data/extensions/api_test/webstore_inline_install/install-non-verified-domain.html
new file mode 100644
index 0000000000000000000000000000000000000000..b40f4fb2be66ad32d109fc2cc79dd7074e9cbe4b
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/webstore_inline_install/install-non-verified-domain.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <link rel="chrome-webstore-item">
+</head>
+<body>
+<script>
+ function runTest(galleryUrl) {
+ // Link URL has to be generated dynamically in order to include the right
+ // port number. The ID corresponds to the data in the "extension" directory.
+ document.getElementsByTagName('link')[0].href =
+ galleryUrl + '/detail/ecglahbcnmdpdciemllbhojghbkagdje';
+
+ try {
+ chrome.webstore.install(
+ undefined,
+ function() {
+ console.log('did not expect install success');
+ window.domAutomationController.send(false);
+ },
+ function(error) {
+ if (error.indexOf('verified site') != -1) {
+ window.domAutomationController.send(true);
+ } else {
+ console.log('Unexpected error: ' + error);
+ window.domAutomationController.send(false);
+ }
+ });
+ } catch (e) {
+ console.log('Unexpected exception: ' + e);
+ window.domAutomationController.send(false);
+ throw e;
+ }
+ }
+</script>
+
+</body>
+</html>
« no previous file with comments | « chrome/test/data/extensions/api_test/webstore_inline_install/install.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698