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

Issue 6387007: Add support for attaching filters to an IPC TestSink. (Closed)

Created:
9 years, 11 months ago by Brian Ryner
Modified:
9 years, 7 months ago
Reviewers:
brettw, noelutz
CC:
chromium-reviews, darin-cc_chromium.org, jam, lzheng
Visibility:
Public.

Description

Add support for attaching filters to an IPC TestSink. The filters can see every message that is sent to the sink, which is useful when if the test is waiting for a specific message to arrive. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=73194

Patch Set 1 #

Patch Set 2 : add some more comments #

Total comments: 4

Patch Set 3 : Address Brett's suggestions #

Total comments: 2

Patch Set 4 : Fix brace style issue #

Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -0 lines) Patch
M ipc/ipc_test_sink.h View 1 2 3 chunks +32 lines, -0 lines 0 comments Download
M ipc/ipc_test_sink.cc View 1 2 3 2 chunks +16 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Brian Ryner
I'm planning to use this as part of the test for an upcoming change to ...
9 years, 11 months ago (2011-01-28 01:53:07 UTC) #1
noelutz
LGTM http://codereview.chromium.org/6387007/diff/2001/ipc/ipc_test_sink.cc File ipc/ipc_test_sink.cc (right): http://codereview.chromium.org/6387007/diff/2001/ipc/ipc_test_sink.cc#newcode66 ipc/ipc_test_sink.cc:66: observer_list_.RemoveObserver(obs); Maybe check in the destructor that all ...
9 years, 11 months ago (2011-01-28 02:13:06 UTC) #2
Brian Ryner
http://codereview.chromium.org/6387007/diff/2001/ipc/ipc_test_sink.cc File ipc/ipc_test_sink.cc (right): http://codereview.chromium.org/6387007/diff/2001/ipc/ipc_test_sink.cc#newcode66 ipc/ipc_test_sink.cc:66: observer_list_.RemoveObserver(obs); On 2011/01/28 02:13:06, noelutz wrote: > Maybe check ...
9 years, 11 months ago (2011-01-28 02:19:59 UTC) #3
brettw
Why do you need the test sink if you're waiting for a message? It seems ...
9 years, 11 months ago (2011-01-28 16:26:15 UTC) #4
Brian Ryner
On 2011/01/28 16:26:15, brettw wrote: > Why do you need the test sink if you're ...
9 years, 11 months ago (2011-01-28 18:38:27 UTC) #5
brettw
On Fri, Jan 28, 2011 at 10:38 AM, <bryner@chromium.org> wrote: > On 2011/01/28 16:26:15, brettw ...
9 years, 11 months ago (2011-01-28 19:02:20 UTC) #6
Brian Ryner
Updated to use a filtering model and IPC::Channel::Listeners per Brett's suggestion. I didn't add a ...
9 years, 11 months ago (2011-01-28 20:43:07 UTC) #7
brettw
LGTM http://codereview.chromium.org/6387007/diff/12001/ipc/ipc_test_sink.cc File ipc/ipc_test_sink.cc (right): http://codereview.chromium.org/6387007/diff/12001/ipc/ipc_test_sink.cc#newcode26 ipc/ipc_test_sink.cc:26: while ((observer = it.GetNext()) != NULL) This outer ...
9 years, 11 months ago (2011-01-28 21:12:32 UTC) #8
Brian Ryner
9 years, 11 months ago (2011-01-28 22:04:23 UTC) #9
Thanks, fixed and submitting.

http://codereview.chromium.org/6387007/diff/12001/ipc/ipc_test_sink.cc
File ipc/ipc_test_sink.cc (right):

http://codereview.chromium.org/6387007/diff/12001/ipc/ipc_test_sink.cc#newcode26
ipc/ipc_test_sink.cc:26: while ((observer = it.GetNext()) != NULL)
On 2011/01/28 21:12:32, brettw wrote:
> This outer while() needs {} since it contains > 1 line (Chrome team style
rule).

Done.

Powered by Google App Engine
This is Rietveld 408576698