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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <link rel="chrome-webstore-item">
5 </head>
6 <body>
7 <script>
8 function runTest(galleryUrl) {
9 // Link URL has to be generated dynamically in order to include the right
10 // port number. The ID corresponds to the data in the "extension" directory.
11 document.getElementsByTagName('link')[0].href =
12 galleryUrl + '/detail/ecglahbcnmdpdciemllbhojghbkagdje';
13
14 try {
15 chrome.webstore.install(
16 undefined,
17 function() {
18 console.log('did not expect install success');
19 window.domAutomationController.send(false);
20 },
21 function(error) {
22 if (error.indexOf('verified site') != -1) {
23 window.domAutomationController.send(true);
24 } else {
25 console.log('Unexpected error: ' + error);
26 window.domAutomationController.send(false);
27 }
28 });
29 } catch (e) {
30 console.log('Unexpected exception: ' + e);
31 window.domAutomationController.send(false);
32 throw e;
33 }
34 }
35 </script>
36
37 </body>
38 </html>
OLDNEW
« 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