| Index: chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc
|
| ===================================================================
|
| --- chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc (revision 12019)
|
| +++ chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc (working copy)
|
| @@ -87,7 +87,7 @@
|
| public ResourceDispatcherHost::Receiver {
|
| public:
|
| ResourceDispatcherHostTest()
|
| - : Receiver(ChildProcessInfo::RENDER_PROCESS), host_(NULL) {
|
| + : Receiver(ChildProcessInfo::RENDER_PROCESS), host_(NULL), pid_(-1) {
|
| set_handle(base::GetCurrentProcessHandle());
|
| }
|
| // ResourceDispatcherHost::Receiver implementation
|
| @@ -103,6 +103,8 @@
|
| return NULL;
|
| }
|
|
|
| + virtual int GetProcessId() const { return pid_; }
|
| +
|
| protected:
|
| // testing::Test
|
| virtual void SetUp() {
|
| @@ -145,6 +147,7 @@
|
| MessageLoopForIO message_loop_;
|
| ResourceDispatcherHost host_;
|
| ResourceIPCAccumulator accum_;
|
| + int pid_;
|
| };
|
|
|
| // Spin up the message loop to kick off the request.
|
| @@ -165,14 +168,13 @@
|
| int render_view_id,
|
| int request_id,
|
| const GURL& url) {
|
| - int old_pid = pid();
|
| pid_ = render_process_id;
|
| ViewHostMsg_Resource_Request request = CreateResourceRequest("GET", url);
|
| ViewHostMsg_RequestResource msg(render_view_id, request_id, request);
|
| bool msg_was_ok;
|
| host_.OnMessageReceived(msg, receiver, &msg_was_ok);
|
| KickOffRequest();
|
| - pid_ = old_pid;
|
| + pid_ = -1;
|
| }
|
|
|
| void ResourceDispatcherHostTest::MakeCancelRequest(int request_id) {
|
|
|