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

Issue 2695243002: Use IPC::TestSink instead of MockSubresourceFilterDrivers in unittests. (Closed)

Created:
3 years, 10 months ago by engedy
Modified:
3 years, 10 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, subresource-filter-reviews_chromium.org, clamy
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use IPC::TestSink instead of MockSubresourceFilterDrivers in unittests. Refactor ContentSubresourceFilterDriverFactoryTests to no longer inject mock ContentSubresourceFilterDrivers for verifying that the sending of activation IPC messages is triggered. Instead, expect to find the activation IPC message in the IPC::TestSink associated with the MockRenderProcessHost. This supports unit-testing scenarios with transfer navigations, without the need for inventing a mechanism to inject mock drivers into all RFHs at opportune times. BUG=637415 Review-Url: https://codereview.chromium.org/2695243002 Cr-Commit-Position: refs/heads/master@{#450695} Committed: https://chromium.googlesource.com/chromium/src/+/5dbb827e3b41a97ec2d7105a0378c268a5d29fbe

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -49 lines) Patch
M components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc View 10 chunks +24 lines, -49 lines 0 comments Download

Messages

Total messages: 16 (9 generated)
engedy
Tanja, could you please take a quick look?
3 years, 10 months ago (2017-02-15 14:24:07 UTC) #3
melandory
On 2017/02/15 14:24:07, engedy wrote: > Tanja, could you please take a quick look? this ...
3 years, 10 months ago (2017-02-15 14:26:35 UTC) #6
Charlie Harrison
drive-by: Can you use the same trick for safe_browsing_service_browsertest.cc? This would completely eliminate the driver ...
3 years, 10 months ago (2017-02-15 14:28:08 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2695243002/1
3 years, 10 months ago (2017-02-15 14:34:29 UTC) #11
engedy
On 2017/02/15 14:28:08, Charlie Harrison wrote: > drive-by: Can you use the same trick for ...
3 years, 10 months ago (2017-02-15 14:37:54 UTC) #12
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://chromium.googlesource.com/chromium/src/+/5dbb827e3b41a97ec2d7105a0378c268a5d29fbe
3 years, 10 months ago (2017-02-15 14:54:54 UTC) #15
Charlie Harrison
3 years, 10 months ago (2017-02-15 14:57:46 UTC) #16
Message was sent while issue was closed.
SGTM for some reason I thought IPC sinks were compatible with browser tests.

Powered by Google App Engine
This is Rietveld 408576698