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

Issue 10915216: Browser test for the push messaging feature (Closed)

Created:
8 years, 3 months ago by Pete Williamson
Modified:
8 years, 3 months ago
CC:
chromium-reviews, ncarter (slow), mihaip-chromium-reviews_chromium.org, akalin, Raghu Simha, Aaron Boodman, haitaol1, tim (not reviewing)
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Browser test for the push messaging feature We've implemented a push messaging feature and checked it in with a unit test. This change is adding a browser test to get better coverage in a running environment. The browser test basically brings up a small packaged app, and injects a message into the sync code. For the test to succeed, the message must arrive into the JS code of the packaged app. BUG=148550 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=157296

Patch Set 1 #

Patch Set 2 : refactor to reduce duplication #

Total comments: 19

Patch Set 3 : CR fixes per DCheng and MihaiP #

Total comments: 2

Patch Set 4 : Comment CR fixes per MihaiP #

Patch Set 5 : CR changes per DCheng #

Total comments: 2

Patch Set 6 : CR changes per DCheng #

Patch Set 7 : Change name of obj_id variable #

Total comments: 5

Patch Set 8 : CR changes per Akalin #

Total comments: 2

Patch Set 9 : CR change per Alakin #

Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -0 lines) Patch
M chrome/browser/extensions/api/push_messaging/push_messaging_apitest.cc View 1 2 3 4 5 6 7 8 3 chunks +33 lines, -0 lines 0 comments Download
M chrome/browser/sync/profile_sync_service.h View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/sync/profile_sync_service.cc View 1 2 3 4 5 6 7 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
Pete Williamson
Ben: Please review chrome_tests.gypi only as OWNER (small change) Fred: Please review the changes in ...
8 years, 3 months ago (2012-09-11 23:10:19 UTC) #1
dcheng
In general, this feels very similar to the existing test at http://git.chromium.org/gitweb/?p=chromium.git;a=blob;f=chrome/browser/extensions/api/push_messaging/push_messaging_apitest.cc;h=20c523b6883355207246aba27946034244706bbc;hb=refs/heads/trunk. It looks like ...
8 years, 3 months ago (2012-09-11 23:15:28 UTC) #2
Pete Williamson
(removed Ben since we are no longer changing chrome_tests.gypi) CR changes per DCheng - moved ...
8 years, 3 months ago (2012-09-12 18:21:29 UTC) #3
Mihai Parparita -not on Chrome
https://chromiumcodereview.appspot.com/10915216/diff/9/chrome/browser/extensions/api/push_messaging/push_messaging_apitest.cc File chrome/browser/extensions/api/push_messaging/push_messaging_apitest.cc (right): https://chromiumcodereview.appspot.com/10915216/diff/9/chrome/browser/extensions/api/push_messaging/push_messaging_apitest.cc#newcode68 chrome/browser/extensions/api/push_messaging/push_messaging_apitest.cc:68: // test that a push introduced into the sync ...
8 years, 3 months ago (2012-09-13 20:37:09 UTC) #4
dcheng
http://codereview.chromium.org/10915216/diff/9/chrome/browser/extensions/api/push_messaging/push_messaging_apitest.cc File chrome/browser/extensions/api/push_messaging/push_messaging_apitest.cc (right): http://codereview.chromium.org/10915216/diff/9/chrome/browser/extensions/api/push_messaging/push_messaging_apitest.cc#newcode75 chrome/browser/extensions/api/push_messaging/push_messaging_apitest.cc:75: // launch the test app In general, comments like ...
8 years, 3 months ago (2012-09-13 21:00:48 UTC) #5
Pete Williamson
New patch uploaded to address CR comments. https://chromiumcodereview.appspot.com/10915216/diff/9/chrome/browser/extensions/api/push_messaging/push_messaging_apitest.cc File chrome/browser/extensions/api/push_messaging/push_messaging_apitest.cc (right): https://chromiumcodereview.appspot.com/10915216/diff/9/chrome/browser/extensions/api/push_messaging/push_messaging_apitest.cc#newcode68 chrome/browser/extensions/api/push_messaging/push_messaging_apitest.cc:68: // test ...
8 years, 3 months ago (2012-09-14 19:14:47 UTC) #6
Mihai Parparita -not on Chrome
LGTM https://chromiumcodereview.appspot.com/10915216/diff/5002/chrome/browser/sync/profile_sync_service.cc File chrome/browser/sync/profile_sync_service.cc (right): https://chromiumcodereview.appspot.com/10915216/diff/5002/chrome/browser/sync/profile_sync_service.cc#newcode475 chrome/browser/sync/profile_sync_service.cc:475: // test method for system test to allow ...
8 years, 3 months ago (2012-09-14 20:02:49 UTC) #7
dcheng
http://codereview.chromium.org/10915216/diff/9/chrome/browser/sync/profile_sync_service.cc File chrome/browser/sync/profile_sync_service.cc (right): http://codereview.chromium.org/10915216/diff/9/chrome/browser/sync/profile_sync_service.cc#newcode479 chrome/browser/sync/profile_sync_service.cc:479: const std::string& id_name, On 2012/09/14 19:14:48, Pete Williamson wrote: ...
8 years, 3 months ago (2012-09-17 18:39:15 UTC) #8
Pete Williamson
Added new changes for DCheng Ah, I see, I can use the source to build ...
8 years, 3 months ago (2012-09-17 20:52:56 UTC) #9
dcheng
http://codereview.chromium.org/10915216/diff/6002/chrome/browser/extensions/api/push_messaging/push_messaging_apitest.cc File chrome/browser/extensions/api/push_messaging/push_messaging_apitest.cc (right): http://codereview.chromium.org/10915216/diff/6002/chrome/browser/extensions/api/push_messaging/push_messaging_apitest.cc#newcode95 chrome/browser/extensions/api/push_messaging/push_messaging_apitest.cc:95: invalidation::ObjectId objId(kSourceId, id); See next comment about naming. http://codereview.chromium.org/10915216/diff/6002/chrome/browser/sync/profile_sync_service.h ...
8 years, 3 months ago (2012-09-17 21:00:55 UTC) #10
Pete Williamson
OK, fixed as Daniel suggests, Daniel, please check the changes.
8 years, 3 months ago (2012-09-17 22:47:32 UTC) #11
dcheng
lgtm
8 years, 3 months ago (2012-09-17 22:49:18 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/petewil@chromium.org/10915216/15002
8 years, 3 months ago (2012-09-17 23:03:45 UTC) #13
commit-bot: I haz the power
Presubmit check for 10915216-15002 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 3 months ago (2012-09-17 23:03:48 UTC) #14
akalin
few nits https://chromiumcodereview.appspot.com/10915216/diff/15002/chrome/browser/sync/profile_sync_service.cc File chrome/browser/sync/profile_sync_service.cc (right): https://chromiumcodereview.appspot.com/10915216/diff/15002/chrome/browser/sync/profile_sync_service.cc#newcode475 chrome/browser/sync/profile_sync_service.cc:475: // Test method for system test to ...
8 years, 3 months ago (2012-09-17 23:20:14 UTC) #15
Pete Williamson
CR changes updated per Akalin - Fred, can you please take a look? Thanks!
8 years, 3 months ago (2012-09-17 23:56:21 UTC) #16
akalin
lgtm http://codereview.chromium.org/10915216/diff/11007/chrome/browser/extensions/api/push_messaging/push_messaging_apitest.cc File chrome/browser/extensions/api/push_messaging/push_messaging_apitest.cc (right): http://codereview.chromium.org/10915216/diff/11007/chrome/browser/extensions/api/push_messaging/push_messaging_apitest.cc#newcode91 chrome/browser/extensions/api/push_messaging/push_messaging_apitest.cc:91: std::string id("U/"); can you just do: const std::string ...
8 years, 3 months ago (2012-09-18 00:12:33 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/petewil@chromium.org/10915216/17001
8 years, 3 months ago (2012-09-18 00:47:53 UTC) #18
commit-bot: I haz the power
Change committed as 157296
8 years, 3 months ago (2012-09-18 04:35:48 UTC) #19
dcheng
8 years, 3 months ago (2012-09-20 20:44:19 UTC) #20
http://codereview.chromium.org/10915216/diff/11007/chrome/browser/extensions/...
File chrome/browser/extensions/api/push_messaging/push_messaging_apitest.cc
(right):

http://codereview.chromium.org/10915216/diff/11007/chrome/browser/extensions/...
chrome/browser/extensions/api/push_messaging/push_messaging_apitest.cc:91:
std::string id("U/");
On 2012/09/18 00:12:33, akalin wrote:
> can you just do:
> 
> const std::string id = "U/" + extension->id() + "/1";
> 
> ?

+= is generally more efficient than + since it results in less temporaries. It
is possible to make + more efficient (for example, the WebKit String
implementation does), but I don't think typical STL implementations try to
optimize this case.

Powered by Google App Engine
This is Rietveld 408576698