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

Issue 1816123002: Add testing for subscription from service workers (Closed)

Created:
4 years, 9 months ago by harkness
Modified:
4 years, 8 months ago
CC:
chromium-reviews, Peter Beverloo, mvanouwerkerk+watch_chromium.org, johnme+watch_chromium.org, harkness+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add testing for subscription from service workers Testing covers subscription from workers both with and without keys, and in situations where it triggers a read from a manifest or a pre-subscribed worker. This also cleaned up the unregistration, so that any registrations are searched for, instead of using a variable to store the registration. BUG=596471 Committed: https://crrev.com/2a019912946921d445189c61af9c1ab5c3cef860 Cr-Commit-Position: refs/heads/master@{#384332}

Patch Set 1 #

Patch Set 2 : Removed rebase added duplicate code #

Total comments: 13

Patch Set 3 : Fixed conversion issues and updated tests. Still investigating one test failure. #

Patch Set 4 : Code review comments incorporated and all tests working #

Total comments: 20

Patch Set 5 : Code review comment integration #

Patch Set 6 : Fix for mac and permissions tests #

Patch Set 7 : Fix asan errors #

Unified diffs Side-by-side diffs Delta from patch set Stats (+298 lines, -87 lines) Patch
M chrome/browser/push_messaging/push_messaging_browsertest.cc View 1 2 3 4 5 6 32 chunks +144 lines, -32 lines 0 comments Download
M chrome/browser/push_messaging/push_messaging_permission_context.cc View 1 2 3 4 5 1 chunk +8 lines, -5 lines 0 comments Download
M chrome/browser/push_messaging/push_messaging_permission_context_unittest.cc View 1 2 3 4 5 4 chunks +18 lines, -8 lines 0 comments Download
A chrome/test/data/push_messaging/push_constants.js View 1 2 3 1 chunk +13 lines, -0 lines 0 comments Download
M chrome/test/data/push_messaging/push_test.js View 1 2 3 4 chunks +36 lines, -28 lines 0 comments Download
M chrome/test/data/push_messaging/service_worker.js View 1 2 3 4 5 2 chunks +30 lines, -0 lines 0 comments Download
M chrome/test/data/push_messaging/subscope1/test.html View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/data/push_messaging/subscope2/test.html View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/data/push_messaging/test.html View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/data/push_messaging/test_no_subscription_options.html View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/push_messaging/push_messaging_message_filter.cc View 1 2 3 4 1 chunk +11 lines, -3 lines 0 comments Download
M content/child/push_messaging/push_provider.cc View 1 2 3 4 1 chunk +4 lines, -1 line 0 comments Download
M content/renderer/push_messaging/push_messaging_dispatcher.cc View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/push_messaging/PushManager.cpp View 1 2 3 4 2 chunks +7 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/push_messaging/PushManagerTest.cpp View 1 2 3 4 5 6 1 chunk +20 lines, -5 lines 0 comments Download

Messages

Total messages: 28 (11 generated)
harkness
Adding tests for subscription from service workers. https://codereview.chromium.org/1816123002/diff/20001/chrome/test/data/push_messaging/push_test.js File chrome/test/data/push_messaging/push_test.js (right): https://codereview.chromium.org/1816123002/diff/20001/chrome/test/data/push_messaging/push_test.js#newcode199 chrome/test/data/push_messaging/push_test.js:199: navigator.serviceWorker.ready.then(function(swRegistration) { ...
4 years, 9 months ago (2016-03-21 15:05:02 UTC) #2
Michael van Ouwerkerk
Tests, nice! https://codereview.chromium.org/1816123002/diff/20001/chrome/browser/push_messaging/push_messaging_browsertest.cc File chrome/browser/push_messaging/push_messaging_browsertest.cc (right): https://codereview.chromium.org/1816123002/diff/20001/chrome/browser/push_messaging/push_messaging_browsertest.cc#newcode412 chrome/browser/push_messaging/push_messaging_browsertest.cc:412: IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest, WorkerSubscribeSuccessful) { Not all attempts in ...
4 years, 9 months ago (2016-03-22 11:31:38 UTC) #3
harkness
Separating out the tests revealed two additional issues with the code. First, the previous WebString ...
4 years, 9 months ago (2016-03-24 16:56:24 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1816123002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1816123002/60001
4 years, 8 months ago (2016-03-30 08:52:11 UTC) #6
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/189181)
4 years, 8 months ago (2016-03-30 09:34:23 UTC) #8
Michael van Ouwerkerk
https://codereview.chromium.org/1816123002/diff/60001/chrome/browser/push_messaging/push_messaging_browsertest.cc File chrome/browser/push_messaging/push_messaging_browsertest.cc (right): https://codereview.chromium.org/1816123002/diff/60001/chrome/browser/push_messaging/push_messaging_browsertest.cc#newcode329 chrome/browser/push_messaging/push_messaging_browsertest.cc:329: EXPECT_EQ(reinterpret_cast<const char*>(kApplicationServerKey), nit: a small helper function like "getTestApplicationServerKey" ...
4 years, 8 months ago (2016-03-30 09:50:05 UTC) #9
harkness
https://codereview.chromium.org/1816123002/diff/60001/chrome/browser/push_messaging/push_messaging_browsertest.cc File chrome/browser/push_messaging/push_messaging_browsertest.cc (right): https://codereview.chromium.org/1816123002/diff/60001/chrome/browser/push_messaging/push_messaging_browsertest.cc#newcode329 chrome/browser/push_messaging/push_messaging_browsertest.cc:329: EXPECT_EQ(reinterpret_cast<const char*>(kApplicationServerKey), On 2016/03/30 09:50:04, Michael van Ouwerkerk wrote: ...
4 years, 8 months ago (2016-03-30 10:51:49 UTC) #10
Michael van Ouwerkerk
lgtm
4 years, 8 months ago (2016-03-30 12:21:20 UTC) #11
Michael van Ouwerkerk
lgtm
4 years, 8 months ago (2016-03-30 12:21:21 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1816123002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1816123002/80001
4 years, 8 months ago (2016-03-30 13:04:06 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/202310)
4 years, 8 months ago (2016-03-30 13:53:57 UTC) #16
harkness
Fixed the mac notification failure and the push message permissions context unittests.
4 years, 8 months ago (2016-03-30 17:12:38 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1816123002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1816123002/100001
4 years, 8 months ago (2016-03-31 09:04:15 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/138219)
4 years, 8 months ago (2016-03-31 11:09:42 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1816123002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1816123002/120001
4 years, 8 months ago (2016-03-31 16:59:21 UTC) #25
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 8 months ago (2016-03-31 18:15:36 UTC) #26
commit-bot: I haz the power
4 years, 8 months ago (2016-03-31 18:17:43 UTC) #28
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/2a019912946921d445189c61af9c1ab5c3cef860
Cr-Commit-Position: refs/heads/master@{#384332}

Powered by Google App Engine
This is Rietveld 408576698