OLD | NEW |
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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 | 292 |
293 void RenderViewTest::TearDown() { | 293 void RenderViewTest::TearDown() { |
294 // Run the loop so the release task from the renderwidget executes. | 294 // Run the loop so the release task from the renderwidget executes. |
295 ProcessPendingMessages(); | 295 ProcessPendingMessages(); |
296 | 296 |
297 render_thread_->SendCloseMessage(); | 297 render_thread_->SendCloseMessage(); |
298 | 298 |
299 scoped_ptr<blink::WebLeakDetector> leak_detector = | 299 scoped_ptr<blink::WebLeakDetector> leak_detector = |
300 make_scoped_ptr(blink::WebLeakDetector::create(this)); | 300 make_scoped_ptr(blink::WebLeakDetector::create(this)); |
301 | 301 |
302 leak_detector->prepareForLeakDetection(GetMainFrame()); | 302 leak_detector->prepareForLeakDetection(); |
303 | 303 |
304 view_ = NULL; | 304 view_ = NULL; |
305 mock_process_.reset(); | 305 mock_process_.reset(); |
306 | 306 |
307 // After telling the view to close and resetting mock_process_ we may get | 307 // After telling the view to close and resetting mock_process_ we may get |
308 // some new tasks which need to be processed before shutting down WebKit | 308 // some new tasks which need to be processed before shutting down WebKit |
309 // (http://crbug.com/21508). | 309 // (http://crbug.com/21508). |
310 base::RunLoop().RunUntilIdle(); | 310 base::RunLoop().RunUntilIdle(); |
311 | 311 |
312 #if defined(OS_MACOSX) | 312 #if defined(OS_MACOSX) |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 TestRenderFrame* frame = | 623 TestRenderFrame* frame = |
624 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); | 624 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); |
625 frame->Navigate(common_params, StartNavigationParams(), request_params); | 625 frame->Navigate(common_params, StartNavigationParams(), request_params); |
626 | 626 |
627 // The load actually happens asynchronously, so we pump messages to process | 627 // The load actually happens asynchronously, so we pump messages to process |
628 // the pending continuation. | 628 // the pending continuation. |
629 FrameLoadWaiter(frame).Wait(); | 629 FrameLoadWaiter(frame).Wait(); |
630 } | 630 } |
631 | 631 |
632 } // namespace content | 632 } // namespace content |
OLD | NEW |