blob: 6cf0f673749d7fd7afbddf9852bacfba61350fcc [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<link rel="chrome-webstore-item">
</head>
<body>
<script>
console.log('Page loaded');
function runTest(galleryUrl) {
console.log('In runTest');
// 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('Ran test, sending response');
window.domAutomationController.send(true);
console.log('Test complete');
},
function(error) {
console.log('Unexpected error: ' + error);
window.domAutomationController.send(false);
});
// Force a garbage collection, so that if the callbacks aren't being
// retained properly they'll get collected and the test will fail.
window.gc();
} catch (e) {
console.log('Unexpected exception: ' + e);
window.domAutomationController.send(false);
throw e;
}
}
</script>
</body>
</html>