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

Unified Diff: content/browser/resolve_proxy_msg_helper_unittest.cc

Issue 7791005: Stop using the default profile's proxy service for plugin proxy requests, and instead use the ass... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix test Created 9 years, 4 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
« no previous file with comments | « content/browser/resolve_proxy_msg_helper.cc ('k') | content/common/child_process_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/resolve_proxy_msg_helper_unittest.cc
===================================================================
--- content/browser/resolve_proxy_msg_helper_unittest.cc (revision 98569)
+++ content/browser/resolve_proxy_msg_helper_unittest.cc (working copy)
@@ -4,7 +4,7 @@
#include "content/browser/resolve_proxy_msg_helper.h"
-#include "content/common/child_process_messages.h"
+#include "content/common/view_messages.h"
#include "ipc/ipc_test_sink.h"
#include "net/base/net_errors.h"
#include "net/proxy/mock_proxy_resolver.h"
@@ -27,12 +27,12 @@
public IPC::Channel::Listener {
public:
struct PendingResult {
- PendingResult(int error_code,
+ PendingResult(bool result,
const std::string& proxy_list)
- : error_code(error_code), proxy_list(proxy_list) {
+ : result(result), proxy_list(proxy_list) {
}
- int error_code;
+ bool result;
std::string proxy_list;
};
@@ -55,9 +55,9 @@
}
IPC::Message* GenerateReply() {
- int temp_int;
+ bool temp_bool;
std::string temp_string;
- ChildProcessHostMsg_ResolveProxy message(GURL(), &temp_int, &temp_string);
+ ViewHostMsg_ResolveProxy message(GURL(), &temp_bool, &temp_string);
return IPC::SyncMessage::GenerateReply(&message);
}
@@ -68,10 +68,8 @@
private:
virtual bool OnMessageReceived(const IPC::Message& msg) {
- TupleTypes<ChildProcessHostMsg_ResolveProxy::ReplyParam>::ValueTuple
- reply_data;
- EXPECT_TRUE(
- ChildProcessHostMsg_ResolveProxy::ReadReplyParam(&msg, &reply_data));
+ TupleTypes<ViewHostMsg_ResolveProxy::ReplyParam>::ValueTuple reply_data;
+ EXPECT_TRUE(ViewHostMsg_ResolveProxy::ReadReplyParam(&msg, &reply_data));
DCHECK(!pending_result_.get());
pending_result_.reset(new PendingResult(reply_data.a, reply_data.b));
test_sink_.ClearMessages();
@@ -108,7 +106,7 @@
resolver_->pending_requests()[0]->CompleteNow(net::OK);
// Check result.
- EXPECT_EQ(net::OK, pending_result()->error_code);
+ EXPECT_EQ(true, pending_result()->result);
EXPECT_EQ("PROXY result1:80", pending_result()->proxy_list);
clear_pending_result();
@@ -120,7 +118,7 @@
resolver_->pending_requests()[0]->CompleteNow(net::OK);
// Check result.
- EXPECT_EQ(net::OK, pending_result()->error_code);
+ EXPECT_EQ(true, pending_result()->result);
EXPECT_EQ("PROXY result2:80", pending_result()->proxy_list);
clear_pending_result();
@@ -132,7 +130,7 @@
resolver_->pending_requests()[0]->CompleteNow(net::OK);
// Check result.
- EXPECT_EQ(net::OK, pending_result()->error_code);
+ EXPECT_EQ(true, pending_result()->result);
EXPECT_EQ("PROXY result3:80", pending_result()->proxy_list);
clear_pending_result();
}
@@ -167,7 +165,7 @@
resolver_->pending_requests()[0]->CompleteNow(net::OK);
// Check result.
- EXPECT_EQ(net::OK, pending_result()->error_code);
+ EXPECT_EQ(true, pending_result()->result);
EXPECT_EQ("PROXY result1:80", pending_result()->proxy_list);
clear_pending_result();
@@ -178,7 +176,7 @@
resolver_->pending_requests()[0]->CompleteNow(net::OK);
// Check result.
- EXPECT_EQ(net::OK, pending_result()->error_code);
+ EXPECT_EQ(true, pending_result()->result);
EXPECT_EQ("PROXY result2:80", pending_result()->proxy_list);
clear_pending_result();
@@ -189,7 +187,7 @@
resolver_->pending_requests()[0]->CompleteNow(net::OK);
// Check result.
- EXPECT_EQ(net::OK, pending_result()->error_code);
+ EXPECT_EQ(true, pending_result()->result);
EXPECT_EQ("PROXY result3:80", pending_result()->proxy_list);
clear_pending_result();
}
« no previous file with comments | « content/browser/resolve_proxy_msg_helper.cc ('k') | content/common/child_process_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698