| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <cctype> | 9 #include <cctype> |
| 10 | 10 |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 | 382 |
| 383 void RenderViewTest::TearDown() { | 383 void RenderViewTest::TearDown() { |
| 384 // Run the loop so the release task from the renderwidget executes. | 384 // Run the loop so the release task from the renderwidget executes. |
| 385 ProcessPendingMessages(); | 385 ProcessPendingMessages(); |
| 386 | 386 |
| 387 render_thread_->SendCloseMessage(); | 387 render_thread_->SendCloseMessage(); |
| 388 | 388 |
| 389 scoped_ptr<blink::WebLeakDetector> leak_detector = | 389 scoped_ptr<blink::WebLeakDetector> leak_detector = |
| 390 make_scoped_ptr(blink::WebLeakDetector::create(this)); | 390 make_scoped_ptr(blink::WebLeakDetector::create(this)); |
| 391 | 391 |
| 392 leak_detector->prepareForLeakDetection(); | 392 leak_detector->prepareForLeakDetection(view_->GetWebView()->mainFrame()); |
| 393 | 393 |
| 394 view_ = NULL; | 394 view_ = NULL; |
| 395 mock_process_.reset(); | 395 mock_process_.reset(); |
| 396 | 396 |
| 397 // After telling the view to close and resetting mock_process_ we may get | 397 // After telling the view to close and resetting mock_process_ we may get |
| 398 // some new tasks which need to be processed before shutting down WebKit | 398 // some new tasks which need to be processed before shutting down WebKit |
| 399 // (http://crbug.com/21508). | 399 // (http://crbug.com/21508). |
| 400 base::RunLoop().RunUntilIdle(); | 400 base::RunLoop().RunUntilIdle(); |
| 401 | 401 |
| 402 #if defined(OS_MACOSX) | 402 #if defined(OS_MACOSX) |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 722 TestRenderFrame* frame = | 722 TestRenderFrame* frame = |
| 723 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); | 723 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); |
| 724 frame->Navigate(common_params, StartNavigationParams(), request_params); | 724 frame->Navigate(common_params, StartNavigationParams(), request_params); |
| 725 | 725 |
| 726 // The load actually happens asynchronously, so we pump messages to process | 726 // The load actually happens asynchronously, so we pump messages to process |
| 727 // the pending continuation. | 727 // the pending continuation. |
| 728 FrameLoadWaiter(frame).Wait(); | 728 FrameLoadWaiter(frame).Wait(); |
| 729 } | 729 } |
| 730 | 730 |
| 731 } // namespace content | 731 } // namespace content |
| OLD | NEW |