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

Side by Side Diff: content/public/test/render_view_test.cc

Issue 1245863003: Initialize CompositorDependencies in RenderWidget's constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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/public/test/render_view_test.h" 5 #include "content/public/test/render_view_test.h"
6 6
7 #include <cctype> 7 #include <cctype>
8 8
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 view_params.hidden = false; 250 view_params.hidden = false;
251 view_params.never_visible = false; 251 view_params.never_visible = false;
252 view_params.next_page_id = 1; 252 view_params.next_page_id = 1;
253 view_params.initial_size = *InitialSizeParams(); 253 view_params.initial_size = *InitialSizeParams();
254 view_params.enable_auto_resize = false; 254 view_params.enable_auto_resize = false;
255 view_params.min_size = gfx::Size(); 255 view_params.min_size = gfx::Size();
256 view_params.max_size = gfx::Size(); 256 view_params.max_size = gfx::Size();
257 257
258 // This needs to pass the mock render thread to the view. 258 // This needs to pass the mock render thread to the view.
259 RenderViewImpl* view = 259 RenderViewImpl* view =
260 RenderViewImpl::Create(view_params, compositor_deps_.get(), false); 260 RenderViewImpl::Create(compositor_deps_.get(), view_params, false);
261 view_ = view; 261 view_ = view;
262 } 262 }
263 263
264 void RenderViewTest::TearDown() { 264 void RenderViewTest::TearDown() {
265 // Try very hard to collect garbage before shutting down. 265 // Try very hard to collect garbage before shutting down.
266 // "5" was chosen following http://crbug.com/46571#c9 266 // "5" was chosen following http://crbug.com/46571#c9
267 const int kGCIterations = 5; 267 const int kGCIterations = 5;
268 for (int i = 0; i < kGCIterations; i++) 268 for (int i = 0; i < kGCIterations; i++)
269 GetMainFrame()->collectGarbage(); 269 GetMainFrame()->collectGarbage();
270 270
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 TestRenderFrame* frame = 577 TestRenderFrame* frame =
578 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); 578 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame());
579 frame->Navigate(common_params, StartNavigationParams(), request_params); 579 frame->Navigate(common_params, StartNavigationParams(), request_params);
580 580
581 // The load actually happens asynchronously, so we pump messages to process 581 // The load actually happens asynchronously, so we pump messages to process
582 // the pending continuation. 582 // the pending continuation.
583 FrameLoadWaiter(frame).Wait(); 583 FrameLoadWaiter(frame).Wait();
584 } 584 }
585 585
586 } // namespace content 586 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698