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

Unified Diff: chrome/test/data/extensions/platform_apps/messaging/app2/background.js

Issue 448473003: Attempt to fix flaky PlatformAppBrowserTest.Messaging. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added comment Created 6 years, 4 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/apps/app_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/platform_apps/messaging/app2/background.js
diff --git a/chrome/test/data/extensions/platform_apps/messaging/app2/background.js b/chrome/test/data/extensions/platform_apps/messaging/app2/background.js
index 6f05fedbd23753c0cae0bf2e3bcfbb18b67727ae..e078fa356e49f5dd705d3038b990044b089aeaf0 100644
--- a/chrome/test/data/extensions/platform_apps/messaging/app2/background.js
+++ b/chrome/test/data/extensions/platform_apps/messaging/app2/background.js
@@ -4,8 +4,6 @@
var otherId = 'ljhhihhmjomkjokmknellgbidphmahkh';
-chrome.test.sendMessage('Launched');
-
chrome.runtime.onConnectExternal.addListener(function(port) {
port.onMessage.addListener(function(msg) {
if (msg == 'ok_to_disconnect') {
@@ -23,3 +21,7 @@ chrome.runtime.onMessageExternal.addListener(function(msg, sender, callback) {
else
callback();
});
+
+// Must ensure that the listeners are active before sending the "Ready"
+// message (which will cause app1 to be launched).
+chrome.test.sendMessage('Ready');
« no previous file with comments | « chrome/browser/apps/app_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698