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

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

Issue 1135643002: Remove unneeded AddRef in RenderViewTest::SetUp (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | 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) 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/run_loop.h" 9 #include "base/run_loop.h"
10 #include "components/scheduler/renderer/renderer_scheduler.h" 10 #include "components/scheduler/renderer/renderer_scheduler.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 view_params.never_visible = false; 248 view_params.never_visible = false;
249 view_params.next_page_id = 1; 249 view_params.next_page_id = 1;
250 view_params.initial_size = *InitialSizeParams(); 250 view_params.initial_size = *InitialSizeParams();
251 view_params.enable_auto_resize = false; 251 view_params.enable_auto_resize = false;
252 view_params.min_size = gfx::Size(); 252 view_params.min_size = gfx::Size();
253 view_params.max_size = gfx::Size(); 253 view_params.max_size = gfx::Size();
254 254
255 // This needs to pass the mock render thread to the view. 255 // This needs to pass the mock render thread to the view.
256 RenderViewImpl* view = 256 RenderViewImpl* view =
257 RenderViewImpl::Create(view_params, compositor_deps_.get(), false); 257 RenderViewImpl::Create(view_params, compositor_deps_.get(), false);
258 view->AddRef();
259 view_ = view; 258 view_ = view;
260 } 259 }
261 260
262 void RenderViewTest::TearDown() { 261 void RenderViewTest::TearDown() {
263 // Try very hard to collect garbage before shutting down. 262 // Try very hard to collect garbage before shutting down.
264 // "5" was chosen following http://crbug.com/46571#c9 263 // "5" was chosen following http://crbug.com/46571#c9
265 const int kGCIterations = 5; 264 const int kGCIterations = 5;
266 for (int i = 0; i < kGCIterations; i++) 265 for (int i = 0; i < kGCIterations; i++)
267 GetMainFrame()->collectGarbage(); 266 GetMainFrame()->collectGarbage();
268 267
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 546
548 impl->GetMainRenderFrame()->OnNavigate(common_params, StartNavigationParams(), 547 impl->GetMainRenderFrame()->OnNavigate(common_params, StartNavigationParams(),
549 request_params); 548 request_params);
550 549
551 // The load actually happens asynchronously, so we pump messages to process 550 // The load actually happens asynchronously, so we pump messages to process
552 // the pending continuation. 551 // the pending continuation.
553 FrameLoadWaiter(view_->GetMainRenderFrame()).Wait(); 552 FrameLoadWaiter(view_->GetMainRenderFrame()).Wait();
554 } 553 }
555 554
556 } // namespace content 555 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698