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

Side by Side Diff: chrome/test/data/extensions/api_test/push_messaging/event_dispatch.js

Issue 10915216: Browser test for the push messaging feature (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: refactor to reduce duplication Created 8 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 function verifyDetails(details) { 5 function verifyDetails(details) {
6 // comment these back in for debugging
Mihai Parparita -not on Chrome 2012/09/13 20:37:09 Please don't commit with commented-out code (espec
Pete Williamson 2012/09/14 19:14:48 Done.
7 // console.log("push messaging payload is " + message.payload);
8 // console.log("push messaging subChannel is " + message.subchannelId);
6 chrome.test.assertEq(1, details.subchannelId); 9 chrome.test.assertEq(1, details.subchannelId);
7 chrome.test.assertEq("payload", details.payload); 10 chrome.test.assertEq("payload", details.payload);
8 } 11 }
9 12
10 function testEventDispatch() { 13 function testEventDispatch() {
11 chrome.experimental.pushMessaging.onMessage.addListener( 14 chrome.experimental.pushMessaging.onMessage.addListener(
12 chrome.test.callbackPass(verifyDetails)); 15 chrome.test.callbackPass(verifyDetails));
13 chrome.test.sendMessage('ready'); 16 chrome.test.sendMessage('ready');
14 } 17 }
15 18
16 chrome.test.runTests([testEventDispatch]); 19 chrome.test.runTests([testEventDispatch]);
OLDNEW
« chrome/browser/sync/profile_sync_service.cc ('K') | « chrome/browser/sync/profile_sync_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698