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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura_unittest.cc

Issue 1178423008: Provision to start base::SimpleTestTickClock at initial ticks Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 11 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 2262 matching lines...) Expand 10 before | Expand all | Expand 10 after
2273 view_rect_.size(), 2273 view_rect_.size(),
2274 base::Bind(&RenderWidgetHostViewAuraCopyRequestTest::CallbackMethod, 2274 base::Bind(&RenderWidgetHostViewAuraCopyRequestTest::CallbackMethod,
2275 base::Unretained(this))); 2275 base::Unretained(this)));
2276 view_->BeginFrameSubscription(make_scoped_ptr(frame_subscriber_)); 2276 view_->BeginFrameSubscription(make_scoped_ptr(frame_subscriber_));
2277 ASSERT_EQ(0, callback_count_); 2277 ASSERT_EQ(0, callback_count_);
2278 ASSERT_FALSE(view_->last_copy_request_); 2278 ASSERT_FALSE(view_->last_copy_request_);
2279 } 2279 }
2280 2280
2281 void InstallFakeTickClock() { 2281 void InstallFakeTickClock() {
2282 // Create a fake tick clock and transfer ownership to the frame host. 2282 // Create a fake tick clock and transfer ownership to the frame host.
2283 tick_clock_ = new base::SimpleTestTickClock(); 2283 tick_clock_ = new base::SimpleTestTickClock(base::TimeTicks());
2284 view_->GetDelegatedFrameHost()->tick_clock_ = make_scoped_ptr(tick_clock_); 2284 view_->GetDelegatedFrameHost()->tick_clock_ = make_scoped_ptr(tick_clock_);
2285 } 2285 }
2286 2286
2287 void OnSwapCompositorFrame() { 2287 void OnSwapCompositorFrame() {
2288 view_->OnSwapCompositorFrame( 2288 view_->OnSwapCompositorFrame(
2289 1, MakeDelegatedFrame(1.f, view_rect_.size(), view_rect_)); 2289 1, MakeDelegatedFrame(1.f, view_rect_.size(), view_rect_));
2290 cc::SurfaceId surface_id = 2290 cc::SurfaceId surface_id =
2291 view_->GetDelegatedFrameHost()->SurfaceIdForTesting(); 2291 view_->GetDelegatedFrameHost()->SurfaceIdForTesting();
2292 if (!surface_id.is_null()) 2292 if (!surface_id.is_null())
2293 view_->GetDelegatedFrameHost()->WillDrawSurface(surface_id, view_rect_); 2293 view_->GetDelegatedFrameHost()->WillDrawSurface(surface_id, view_rect_);
(...skipping 1344 matching lines...) Expand 10 before | Expand all | Expand 10 after
3638 ViewMsg_SetSurfaceIdNamespace::Read(msg, &params); 3638 ViewMsg_SetSurfaceIdNamespace::Read(msg, &params);
3639 view_->InitAsChild(NULL); 3639 view_->InitAsChild(NULL);
3640 view_->Show(); 3640 view_->Show();
3641 view_->SetSize(size); 3641 view_->SetSize(size);
3642 view_->OnSwapCompositorFrame(0, 3642 view_->OnSwapCompositorFrame(0,
3643 MakeDelegatedFrame(1.f, size, gfx::Rect(size))); 3643 MakeDelegatedFrame(1.f, size, gfx::Rect(size)));
3644 EXPECT_EQ(view_->GetSurfaceIdNamespace(), base::get<0>(params)); 3644 EXPECT_EQ(view_->GetSurfaceIdNamespace(), base::get<0>(params));
3645 } 3645 }
3646 3646
3647 } // namespace content 3647 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/media/capture/cursor_renderer_aura_unittest.cc ('k') | content/renderer/media/render_media_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698