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

Side by Side Diff: chrome/common/resource_dispatcher_unittest.cc

Issue 112042: Prevent an extra copy of data types that get passed into IPC messages when... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/ipc_message_utils.h ('k') | chrome/renderer/render_view_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/process.h" 8 #include "base/process.h"
9 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
10 #include "chrome/common/filter_policy.h" 10 #include "chrome/common/filter_policy.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 memcpy(put_data_here, test_page_contents, test_page_contents_len); 113 memcpy(put_data_here, test_page_contents, test_page_contents_len);
114 base::SharedMemoryHandle dup_handle; 114 base::SharedMemoryHandle dup_handle;
115 EXPECT_TRUE(shared_mem.GiveToProcess( 115 EXPECT_TRUE(shared_mem.GiveToProcess(
116 base::Process::Current().handle(), &dup_handle)); 116 base::Process::Current().handle(), &dup_handle));
117 dispatcher_->OnReceivedData( 117 dispatcher_->OnReceivedData(
118 message_queue_[0], request_id, dup_handle, test_page_contents_len); 118 message_queue_[0], request_id, dup_handle, test_page_contents_len);
119 119
120 message_queue_.erase(message_queue_.begin()); 120 message_queue_.erase(message_queue_.begin());
121 121
122 // read the ack message. 122 // read the ack message.
123 int request_ack = -1; 123 Tuple1<int> request_ack;
124 ASSERT_TRUE(ViewHostMsg_DataReceived_ACK::Read( 124 ASSERT_TRUE(ViewHostMsg_DataReceived_ACK::Read(
125 &message_queue_[0], &request_ack)); 125 &message_queue_[0], &request_ack));
126 126
127 ASSERT_EQ(request_ack, request_id); 127 ASSERT_EQ(request_ack.a, request_id);
128 128
129 message_queue_.erase(message_queue_.begin()); 129 message_queue_.erase(message_queue_.begin());
130 } 130 }
131 } 131 }
132 132
133 protected: 133 protected:
134 static ResourceDispatcher* GetResourceDispatcher(WebFrame* unused) { 134 static ResourceDispatcher* GetResourceDispatcher(WebFrame* unused) {
135 return dispatcher_.get(); 135 return dispatcher_.get();
136 } 136 }
137 137
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 // FIXME 182 // FIXME
183 } 183 }
184 184
185 TEST_F(ResourceDispatcherTest, Cookies) { 185 TEST_F(ResourceDispatcherTest, Cookies) {
186 // FIXME 186 // FIXME
187 } 187 }
188 188
189 TEST_F(ResourceDispatcherTest, SerializedPostData) { 189 TEST_F(ResourceDispatcherTest, SerializedPostData) {
190 // FIXME 190 // FIXME
191 } 191 }
OLDNEW
« no previous file with comments | « chrome/common/ipc_message_utils.h ('k') | chrome/renderer/render_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698