Index: chrome/test/data/extensions/api_test/webstore_inline_install/install_from_popup.html |
diff --git a/chrome/test/data/extensions/api_test/webstore_inline_install/install_from_popup.html b/chrome/test/data/extensions/api_test/webstore_inline_install/install_from_popup.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f760616c146fa163f99094c2011b1d36d41b2cb0 |
--- /dev/null |
+++ b/chrome/test/data/extensions/api_test/webstore_inline_install/install_from_popup.html |
@@ -0,0 +1,37 @@ |
+<!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 complete in a pop-up window.'); |
+ window.domAutomationController.send(false); |
+ }, |
+ function(error) { |
+ var expected_error = |
+ "Inline installs can not be initiated from pop-up windows."; |
+ console.log('Ran test, sending response'); |
Devlin
2015/02/12 17:18:21
I know that we do this a lot, but we really should
meacer
2015/02/12 21:12:05
Done.
|
+ window.domAutomationController.send(error == expected_error); |
+ } |
+ ); |
+ } catch (e) { |
+ console.log('Unexpected exception: ' + e); |
+ window.domAutomationController.send(false); |
+ throw e; |
+ } |
+} |
+</script> |
+ |
+</body> |
+</html> |