Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Issue 1695503004: Moved TestBackgroundSyncController to MockBackgroundSyncController (Closed)

Created:
4 years, 10 months ago by Nina
Modified:
4 years, 10 months ago
CC:
chromium-reviews, tim+watch_chromium.org, mlamouri+watch-content_chromium.org, mlamouri+watch-test-runner_chromium.org, zea+watch_chromium.org, Peter Beverloo, maxbogue+watch_chromium.org, jam, chasej+watch_chromium.org, iclelland+watch_chromium.org, darin-cc_chromium.org, jkarlin+watch_chromium.org, plaree+watch_chromium.org, mkwst+moarreviews-shell_chromium.org, jochen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Moved TestBackgroundSyncController to MockBackgroundSyncController This is the first in a series of patches to add a content setting to Background Sync. In particular, this change will enable adding a method to BackgroundSyncController that returns a permission status and mocking it for tests. We can't just add a method to the controller that returns a granted permission - this would be risky, but we do want to control permission during tests. Original, 'big picture' patch: crrev.com/1673303002 TEST=Existing background sync tests don't break. BUG=564052 Committed: https://crrev.com/db7b65c645901b995ca15cead932ebb4d04f83fa Cr-Commit-Position: refs/heads/master@{#375646}

Patch Set 1 #

Total comments: 10

Patch Set 2 : Addressed comments #

Total comments: 2

Patch Set 3 : Removed unnecessary test code #

Total comments: 4

Patch Set 4 : Nits #

Patch Set 5 : Hopefully fix win dbg compile error #

Patch Set 6 : Trying to fix win compile again #

Unified diffs Side-by-side diffs Delta from patch set Stats (+113 lines, -77 lines) Patch
M content/browser/background_sync/background_sync_manager_unittest.cc View 1 2 12 chunks +21 lines, -63 lines 0 comments Download
M content/content_tests.gypi View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/test/test_browser_context.h View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M content/public/test/test_browser_context.cc View 1 2 3 chunks +2 lines, -7 lines 0 comments Download
M content/shell/browser/layout_test/layout_test_browser_context.cc View 1 3 chunks +2 lines, -2 lines 0 comments Download
M content/shell/browser/shell_browser_context.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
A content/test/mock_background_sync_controller.h View 1 2 3 4 5 1 chunk +54 lines, -0 lines 0 comments Download
A content/test/mock_background_sync_controller.cc View 1 1 chunk +27 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (12 generated)
Nina
PTAL :)
4 years, 10 months ago (2016-02-12 16:24:21 UTC) #3
Peter Beverloo
Thanks! Could you explain why these changes are necessary? (Ideally in the CL description.) https://codereview.chromium.org/1695503004/diff/1/content/public/test/mock_background_sync_controller.cc ...
4 years, 10 months ago (2016-02-12 16:38:23 UTC) #4
Nina
Peter, Josh, fixed comments, please take a look again. https://codereview.chromium.org/1695503004/diff/1/content/public/test/mock_background_sync_controller.cc File content/public/test/mock_background_sync_controller.cc (right): https://codereview.chromium.org/1695503004/diff/1/content/public/test/mock_background_sync_controller.cc#newcode14 content/public/test/mock_background_sync_controller.cc:14: ...
4 years, 10 months ago (2016-02-15 09:48:49 UTC) #9
Peter Beverloo
Thanks! I'm OK with this, modulo one comment. https://codereview.chromium.org/1695503004/diff/20001/content/browser/background_sync/background_sync_manager_unittest.cc File content/browser/background_sync/background_sync_manager_unittest.cc (right): https://codereview.chromium.org/1695503004/diff/20001/content/browser/background_sync/background_sync_manager_unittest.cc#newcode265 content/browser/background_sync/background_sync_manager_unittest.cc:265: scoped_ptr<MockBackgroundSyncController> ...
4 years, 10 months ago (2016-02-16 00:59:00 UTC) #10
Nina
Done! https://codereview.chromium.org/1695503004/diff/20001/content/browser/background_sync/background_sync_manager_unittest.cc File content/browser/background_sync/background_sync_manager_unittest.cc (right): https://codereview.chromium.org/1695503004/diff/20001/content/browser/background_sync/background_sync_manager_unittest.cc#newcode265 content/browser/background_sync/background_sync_manager_unittest.cc:265: scoped_ptr<MockBackgroundSyncController> background_sync_controller( On 2016/02/16 00:59:00, Peter Beverloo wrote: ...
4 years, 10 months ago (2016-02-16 11:14:51 UTC) #11
Peter Beverloo
lgtm https://codereview.chromium.org/1695503004/diff/40001/content/public/test/test_browser_context.h File content/public/test/test_browser_context.h (right): https://codereview.chromium.org/1695503004/diff/40001/content/public/test/test_browser_context.h#newcode17 content/public/test/test_browser_context.h:17: class MockBackgroundSyncController; nit: blank line after the namespace ...
4 years, 10 months ago (2016-02-16 11:24:27 UTC) #12
Nina
jkarlin@, mind taking a look? https://codereview.chromium.org/1695503004/diff/40001/content/public/test/test_browser_context.h File content/public/test/test_browser_context.h (right): https://codereview.chromium.org/1695503004/diff/40001/content/public/test/test_browser_context.h#newcode17 content/public/test/test_browser_context.h:17: class MockBackgroundSyncController; On 2016/02/16 ...
4 years, 10 months ago (2016-02-16 11:32:53 UTC) #13
jkarlin
lgtm
4 years, 10 months ago (2016-02-16 15:09:41 UTC) #14
Nina
avi, please review: * content/public/test/ * content/test/ Thanks!
4 years, 10 months ago (2016-02-16 15:26:47 UTC) #17
Avi (use Gerrit)
lgtm Those files 👍
4 years, 10 months ago (2016-02-16 16:05:35 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1695503004/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1695503004/100001
4 years, 10 months ago (2016-02-16 18:56:44 UTC) #21
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 10 months ago (2016-02-16 20:14:10 UTC) #23
commit-bot: I haz the power
4 years, 10 months ago (2016-02-16 22:54:32 UTC) #25
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/db7b65c645901b995ca15cead932ebb4d04f83fa
Cr-Commit-Position: refs/heads/master@{#375646}

Powered by Google App Engine
This is Rietveld 408576698