blob: 16826f8188cbdf9b66592628c1659f0c20c7226c [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<link rel="chrome-webstore-item">
</head>
<body>
<script>
function runTest(galleryUrl) {
// 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/cccccccccccccccccccccccccccccccc';
try {
chrome.webstore.install(
undefined,
function() {
console.log('Unexpected install success');
window.domAutomationController.send(false);
},
function(error, errorCode) {
if (error.indexOf('Package is invalid') != -1 &&
errorCode == 'otherError') {
window.domAutomationController.send(true);
} else {
console.log('Unexpected install error: ' + error);
window.domAutomationController.send(false);
}
});
} catch (e) {
console.log('Unexpected exception: ' + e);
window.domAutomationController.send(false);
throw e;
}
}
</script>
</body>
</html>