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