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

Side by Side Diff: chrome/test/data/extensions/api_test/webstore_inline_install/install.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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <link rel="chrome-webstore-item"> 4 <link rel="chrome-webstore-item">
5 </head> 5 </head>
6 <body> 6 <body>
7 <script> 7 <script>
8 function runTest(galleryUrl) { 8 function runTest(galleryUrl) {
9 // Link URL has to be generated dynamically in order to include the right 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. 10 // port number. The ID corresponds to the data in the "extension" directory.
11 document.getElementsByTagName('link')[0].href = 11 document.getElementsByTagName('link')[0].href =
12 galleryUrl + '/detail/ecglahbcnmdpdciemllbhojghbkagdje'; 12 galleryUrl + '/detail/ecglahbcnmdpdciemllbhojghbkagdje';
13 13
14 try { 14 try {
15 chrome.webstore.install(); 15 chrome.webstore.install(
16 undefined,
17 function() {
18 window.domAutomationController.send(true);
19 },
20 function(error) {
21 console.log('Unexpected error: ' + error);
22 window.domAutomationController.send(false);
23 });
16 } catch (e) { 24 } catch (e) {
17 window.domAutomationController.send(false); 25 window.domAutomationController.send(false);
18 throw e; 26 throw e;
19 } 27 }
20 window.domAutomationController.send(true);
21 } 28 }
22 </script> 29 </script>
23 30
24 </body> 31 </body>
25 </html> 32 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698