| 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 GoToOffset(-1, url, state); | 226 GoToOffset(-1, url, state); |
| 227 } | 227 } |
| 228 | 228 |
| 229 void RenderViewTest::GoForward(const GURL& url, const PageState& state) { | 229 void RenderViewTest::GoForward(const GURL& url, const PageState& state) { |
| 230 GoToOffset(1, url, state); | 230 GoToOffset(1, url, state); |
| 231 } | 231 } |
| 232 | 232 |
| 233 void RenderViewTest::SetUp() { | 233 void RenderViewTest::SetUp() { |
| 234 // Blink needs to be initialized before calling CreateContentRendererClient() | 234 // Blink needs to be initialized before calling CreateContentRendererClient() |
| 235 // because it uses blink internally. | 235 // because it uses blink internally. |
| 236 blink::initialize(blink_platform_impl_.Get()); | 236 blink::Platform::initialize(blink_platform_impl_.Get()); |
| 237 blink::initialize(); |
| 237 | 238 |
| 238 content_client_.reset(CreateContentClient()); | 239 content_client_.reset(CreateContentClient()); |
| 239 content_browser_client_.reset(CreateContentBrowserClient()); | 240 content_browser_client_.reset(CreateContentBrowserClient()); |
| 240 content_renderer_client_.reset(CreateContentRendererClient()); | 241 content_renderer_client_.reset(CreateContentRendererClient()); |
| 241 SetContentClient(content_client_.get()); | 242 SetContentClient(content_client_.get()); |
| 242 SetBrowserClientForTesting(content_browser_client_.get()); | 243 SetBrowserClientForTesting(content_browser_client_.get()); |
| 243 SetRendererClientForTesting(content_renderer_client_.get()); | 244 SetRendererClientForTesting(content_renderer_client_.get()); |
| 244 | 245 |
| 245 #if defined(OS_WIN) | 246 #if defined(OS_WIN) |
| 246 // This needs to happen sometime before PlatformInitialize. | 247 // This needs to happen sometime before PlatformInitialize. |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 // Needs to run before blink::shutdown(). | 344 // Needs to run before blink::shutdown(). |
| 344 autorelease_pool_.reset(NULL); | 345 autorelease_pool_.reset(NULL); |
| 345 #endif | 346 #endif |
| 346 | 347 |
| 347 leak_detector->collectGarbageAndReport(); | 348 leak_detector->collectGarbageAndReport(); |
| 348 | 349 |
| 349 base::RunLoop().RunUntilIdle(); | 350 base::RunLoop().RunUntilIdle(); |
| 350 | 351 |
| 351 blink_platform_impl_.Shutdown(); | 352 blink_platform_impl_.Shutdown(); |
| 352 blink::shutdown(); | 353 blink::shutdown(); |
| 354 blink::Platform::shutdown(); |
| 353 | 355 |
| 354 platform_->PlatformUninitialize(); | 356 platform_->PlatformUninitialize(); |
| 355 platform_.reset(); | 357 platform_.reset(); |
| 356 params_.reset(); | 358 params_.reset(); |
| 357 command_line_.reset(); | 359 command_line_.reset(); |
| 358 | 360 |
| 359 test_io_thread_.reset(); | 361 test_io_thread_.reset(); |
| 360 ipc_support_.reset(); | 362 ipc_support_.reset(); |
| 361 } | 363 } |
| 362 | 364 |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); | 670 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); |
| 669 frame->Navigate(common_params, StartNavigationParams(), request_params); | 671 frame->Navigate(common_params, StartNavigationParams(), request_params); |
| 670 | 672 |
| 671 // The load actually happens asynchronously, so we pump messages to process | 673 // The load actually happens asynchronously, so we pump messages to process |
| 672 // the pending continuation. | 674 // the pending continuation. |
| 673 FrameLoadWaiter(frame).Wait(); | 675 FrameLoadWaiter(frame).Wait(); |
| 674 view_->GetWebView()->updateAllLifecyclePhases(); | 676 view_->GetWebView()->updateAllLifecyclePhases(); |
| 675 } | 677 } |
| 676 | 678 |
| 677 } // namespace content | 679 } // namespace content |
| OLD | NEW |