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

Unified Diff: chrome/test/data/extensions/api_test/shared_module/import_pass/check.js

Issue 317993003: Send an onInstalled event for shared module update (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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
« no previous file with comments | « chrome/browser/extensions/test_extension_system.cc ('k') | extensions/browser/api/runtime/runtime_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/shared_module/import_pass/check.js
diff --git a/chrome/test/data/extensions/api_test/shared_module/import_pass/check.js b/chrome/test/data/extensions/api_test/shared_module/import_pass/check.js
index 37ca2a0a5c8fdf9c8639b3af584f528e37a8f6f5..b0f9c43605ac8d142ad012bd684caf13f6d70944 100644
--- a/chrome/test/data/extensions/api_test/shared_module/import_pass/check.js
+++ b/chrome/test/data/extensions/api_test/shared_module/import_pass/check.js
@@ -8,4 +8,15 @@ if (typeof fail_exported != 'undefined')
if (typeof pass_exported == 'undefined')
chrome.test.notifyFail('pass.js was not exported correctly.');
+chrome.runtime.onInstalled.addListener(function(details) {
+ if (details.reason == 'shared_module_update' &&
+ details.previousVersion == '1.0' &&
+ // This ID corresponds to the public key in 'shared'.
+ details.id == 'gpcckkmippodnppallflahfabmeilgjg') {
+ chrome.test.sendMessage('shared_module_updated');
+ }
+});
+
+chrome.test.sendMessage('ready');
+
chrome.test.notifyPass();
« no previous file with comments | « chrome/browser/extensions/test_extension_system.cc ('k') | extensions/browser/api/runtime/runtime_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698