Index: chrome/test/data/extensions/api_test/push_messaging/background.js |
diff --git a/chrome/test/data/extensions/api_test/push_messaging/background.js b/chrome/test/data/extensions/api_test/push_messaging/background.js |
index 9e8503f247ced65188ba3a14355d5b5e139b8c0c..8c81771924217e458e6936b438f9069a485f7f3c 100644 |
--- a/chrome/test/data/extensions/api_test/push_messaging/background.js |
+++ b/chrome/test/data/extensions/api_test/push_messaging/background.js |
@@ -2,3 +2,15 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
+function verifyDetails(details) { |
+ chrome.test.assertEq(1, details.subchannelId); |
+ chrome.test.assertEq("payload", details.payload); |
+} |
+ |
+function testEventDispatch() { |
+ chrome.experimental.pushMessaging.onMessage.addListener( |
+ chrome.test.callbackPass(verifyDetails)); |
+ chrome.test.sendMessage('ready'); |
+} |
+ |
+chrome.test.runTests([testEventDispatch]); |