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

Side by Side Diff: content/test/render_view_fake_resources_test.cc

Issue 7602023: Use a monotonic clock (TimeTicks) to report network times to WebCore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync & Merge Created 9 years 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 | « content/public/common/webkit_param_traits.cc ('k') | net/url_request/url_request.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/test/render_view_fake_resources_test.h" 5 #include "content/test/render_view_fake_resources_test.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "base/process.h" 9 #include "base/process.h"
10 #include "base/shared_memory.h" 10 #include "base/shared_memory.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 request_id, 168 request_id,
169 handle, 169 handle,
170 body.size(), 170 body.size(),
171 body.size()))); 171 body.size())));
172 172
173 ASSERT_TRUE(channel_->Send(new ResourceMsg_RequestComplete( 173 ASSERT_TRUE(channel_->Send(new ResourceMsg_RequestComplete(
174 message.routing_id(), 174 message.routing_id(),
175 request_id, 175 request_id,
176 net::URLRequestStatus(), 176 net::URLRequestStatus(),
177 std::string(), 177 std::string(),
178 base::Time()))); 178 base::TimeTicks())));
179 } 179 }
180 180
181 void RenderViewFakeResourcesTest::OnRenderViewReady() { 181 void RenderViewFakeResourcesTest::OnRenderViewReady() {
182 // Grab a pointer to the new view using RenderViewVisitor. 182 // Grab a pointer to the new view using RenderViewVisitor.
183 ASSERT_TRUE(!view_); 183 ASSERT_TRUE(!view_);
184 content::RenderView::ForEach(this); 184 content::RenderView::ForEach(this);
185 ASSERT_TRUE(view_); 185 ASSERT_TRUE(view_);
186 message_loop_.Quit(); 186 message_loop_.Quit();
187 } 187 }
188 188
189 void RenderViewFakeResourcesTest::GoToOffset( 189 void RenderViewFakeResourcesTest::GoToOffset(
190 int offset, 190 int offset,
191 const WebKit::WebHistoryItem& history_item) { 191 const WebKit::WebHistoryItem& history_item) {
192 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); 192 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_);
193 ViewMsg_Navigate_Params params; 193 ViewMsg_Navigate_Params params;
194 params.page_id = impl->GetPageId() + offset; 194 params.page_id = impl->GetPageId() + offset;
195 params.pending_history_list_offset = 195 params.pending_history_list_offset =
196 impl->history_list_offset() + offset; 196 impl->history_list_offset() + offset;
197 params.current_history_list_offset = impl->history_list_offset(); 197 params.current_history_list_offset = impl->history_list_offset();
198 params.current_history_list_length = (impl->historyBackListCount() + 198 params.current_history_list_length = (impl->historyBackListCount() +
199 impl->historyForwardListCount() + 1); 199 impl->historyForwardListCount() + 1);
200 params.url = GURL(history_item.urlString()); 200 params.url = GURL(history_item.urlString());
201 params.transition = content::PAGE_TRANSITION_FORWARD_BACK; 201 params.transition = content::PAGE_TRANSITION_FORWARD_BACK;
202 params.state = webkit_glue::HistoryItemToString(history_item); 202 params.state = webkit_glue::HistoryItemToString(history_item);
203 params.navigation_type = ViewMsg_Navigate_Type::NORMAL; 203 params.navigation_type = ViewMsg_Navigate_Type::NORMAL;
204 params.request_time = base::Time::Now(); 204 params.request_time = base::Time::Now();
205 channel_->Send(new ViewMsg_Navigate(impl->routing_id(), params)); 205 channel_->Send(new ViewMsg_Navigate(impl->routing_id(), params));
206 message_loop_.Run(); 206 message_loop_.Run();
207 } 207 }
OLDNEW
« no previous file with comments | « content/public/common/webkit_param_traits.cc ('k') | net/url_request/url_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698