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

Unified Diff: content/browser/resolve_proxy_msg_helper_unittest.cc

Issue 24514003: Make BrowserMessageFilter not derive from IPC::ChannelProxy::MessageFilter. This allows us to hide … (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/resolve_proxy_msg_helper_unittest.cc
===================================================================
--- content/browser/resolve_proxy_msg_helper_unittest.cc (revision 225900)
+++ content/browser/resolve_proxy_msg_helper_unittest.cc (working copy)
@@ -27,6 +27,25 @@
}
};
+class TestResolveProxyMsgHelper : public ResolveProxyMsgHelper {
+ public:
+ TestResolveProxyMsgHelper(
+ net::ProxyService* proxy_service,
+ IPC::Listener* listener)
+ : ResolveProxyMsgHelper(proxy_service),
+ listener_(listener) {}
+ virtual bool Send(IPC::Message* message) OVERRIDE {
+ listener_->OnMessageReceived(*message);
+ delete message;
+ return true;
+ }
+
+ protected:
+ virtual ~TestResolveProxyMsgHelper() {}
+
+ IPC::Listener* listener_;
+};
+
class ResolveProxyMsgHelperTest : public testing::Test, public IPC::Listener {
public:
struct PendingResult {
@@ -43,11 +62,10 @@
: resolver_(new net::MockAsyncProxyResolver),
service_(
new net::ProxyService(new MockProxyConfigService, resolver_, NULL)),
- helper_(new ResolveProxyMsgHelper(service_.get())),
+ helper_(new TestResolveProxyMsgHelper(service_.get(), this)),
message_loop_(base::MessageLoop::TYPE_IO),
io_thread_(BrowserThread::IO, &message_loop_) {
test_sink_.AddFilter(this);
- helper_->OnFilterAdded(&test_sink_);
}
protected:
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/browser/tracing/trace_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698