Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7367)

Unified Diff: chrome/test/data/extensions/api_test/webstore_inline_install/both_listeners.html

Issue 175263003: Add chrome.webstore API methods to allow sites to see progress of installation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/extensions/api_test/webstore_inline_install/both_listeners.html
diff --git a/chrome/test/data/extensions/api_test/webstore_inline_install/install.html b/chrome/test/data/extensions/api_test/webstore_inline_install/both_listeners.html
similarity index 71%
copy from chrome/test/data/extensions/api_test/webstore_inline_install/install.html
copy to chrome/test/data/extensions/api_test/webstore_inline_install/both_listeners.html
index 6cf0f673749d7fd7afbddf9852bacfba61350fcc..757e38b271ae5b22ae4ef29619520b5aad6031ae 100644
--- a/chrome/test/data/extensions/api_test/webstore_inline_install/install.html
+++ b/chrome/test/data/extensions/api_test/webstore_inline_install/both_listeners.html
@@ -5,10 +5,8 @@
</head>
<body>
<script>
- console.log('Page loaded');
-
function runTest(galleryUrl) {
- console.log('In runTest');
+ var receivedProgressUpdate = false;
// 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.
@@ -16,12 +14,15 @@
galleryUrl + '/detail/ecglahbcnmdpdciemllbhojghbkagdje';
try {
+ // Ensure our listener mask works correctly by adding both listeners.
+ // We don't need to test the fucntionality, as each listener is tested
+ // individually separately.
+ chrome.webstore.onDownloadProgress.addListener(function(progress) {});
+ chrome.webstore.onInstallStageChanged.addListener(function(stage) {});
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);
@@ -32,6 +33,7 @@
window.gc();
} catch (e) {
console.log('Unexpected exception: ' + e);
+ console.log(e.stack);
window.domAutomationController.send(false);
throw e;
}

Powered by Google App Engine
This is Rietveld 408576698