OLD | NEW |
(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> |
OLD | NEW |