| 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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 | 332 |
| 333 view_ = NULL; | 333 view_ = NULL; |
| 334 mock_process_.reset(); | 334 mock_process_.reset(); |
| 335 | 335 |
| 336 // After telling the view to close and resetting mock_process_ we may get | 336 // After telling the view to close and resetting mock_process_ we may get |
| 337 // some new tasks which need to be processed before shutting down WebKit | 337 // some new tasks which need to be processed before shutting down WebKit |
| 338 // (http://crbug.com/21508). | 338 // (http://crbug.com/21508). |
| 339 base::RunLoop().RunUntilIdle(); | 339 base::RunLoop().RunUntilIdle(); |
| 340 | 340 |
| 341 #if defined(OS_MACOSX) | 341 #if defined(OS_MACOSX) |
| 342 // Needs to run before blink::shutdown(). | |
| 343 autorelease_pool_.reset(NULL); | 342 autorelease_pool_.reset(NULL); |
| 344 #endif | 343 #endif |
| 345 | 344 |
| 346 leak_detector->collectGarbageAndReport(); | 345 leak_detector->collectGarbageAndReport(); |
| 347 | 346 |
| 348 base::RunLoop().RunUntilIdle(); | |
| 349 | |
| 350 blink_platform_impl_.Shutdown(); | 347 blink_platform_impl_.Shutdown(); |
| 351 blink::shutdown(); | |
| 352 | |
| 353 platform_->PlatformUninitialize(); | 348 platform_->PlatformUninitialize(); |
| 354 platform_.reset(); | 349 platform_.reset(); |
| 355 params_.reset(); | 350 params_.reset(); |
| 356 command_line_.reset(); | 351 command_line_.reset(); |
| 357 | 352 |
| 358 test_io_thread_.reset(); | 353 test_io_thread_.reset(); |
| 359 ipc_support_.reset(); | 354 ipc_support_.reset(); |
| 360 } | 355 } |
| 361 | 356 |
| 362 void RenderViewTest::onLeakDetectionComplete(const Result& result) { | 357 void RenderViewTest::onLeakDetectionComplete(const Result& result) { |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 667 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); | 662 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); |
| 668 frame->Navigate(common_params, StartNavigationParams(), request_params); | 663 frame->Navigate(common_params, StartNavigationParams(), request_params); |
| 669 | 664 |
| 670 // The load actually happens asynchronously, so we pump messages to process | 665 // The load actually happens asynchronously, so we pump messages to process |
| 671 // the pending continuation. | 666 // the pending continuation. |
| 672 FrameLoadWaiter(frame).Wait(); | 667 FrameLoadWaiter(frame).Wait(); |
| 673 view_->GetWebView()->updateAllLifecyclePhases(); | 668 view_->GetWebView()->updateAllLifecyclePhases(); |
| 674 } | 669 } |
| 675 | 670 |
| 676 } // namespace content | 671 } // namespace content |
| OLD | NEW |