Index: chrome/test/data/extensions/api_test/webstore_inline_install/install-non-verified-domain.html |
diff --git a/chrome/test/data/extensions/api_test/webstore_inline_install/install-non-verified-domain.html b/chrome/test/data/extensions/api_test/webstore_inline_install/install-non-verified-domain.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b40f4fb2be66ad32d109fc2cc79dd7074e9cbe4b |
--- /dev/null |
+++ b/chrome/test/data/extensions/api_test/webstore_inline_install/install-non-verified-domain.html |
@@ -0,0 +1,38 @@ |
+<!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/ecglahbcnmdpdciemllbhojghbkagdje'; |
+ |
+ try { |
+ chrome.webstore.install( |
+ undefined, |
+ function() { |
+ console.log('did not expect install success'); |
+ window.domAutomationController.send(false); |
+ }, |
+ function(error) { |
+ if (error.indexOf('verified site') != -1) { |
+ window.domAutomationController.send(true); |
+ } else { |
+ console.log('Unexpected error: ' + error); |
+ window.domAutomationController.send(false); |
+ } |
+ }); |
+ } catch (e) { |
+ console.log('Unexpected exception: ' + e); |
+ window.domAutomationController.send(false); |
+ throw e; |
+ } |
+ } |
+</script> |
+ |
+</body> |
+</html> |