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 "base/run_loop.h" | 7 #include "base/run_loop.h" |
8 #include "content/common/dom_storage/dom_storage_types.h" | 8 #include "content/common/dom_storage/dom_storage_types.h" |
9 #include "content/common/frame_messages.h" | 9 #include "content/common/frame_messages.h" |
10 #include "content/common/input_messages.h" | 10 #include "content/common/input_messages.h" |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 kRouteId, | 191 kRouteId, |
192 kMainFrameRouteId, | 192 kMainFrameRouteId, |
193 kSurfaceId, | 193 kSurfaceId, |
194 kInvalidSessionStorageNamespaceId, | 194 kInvalidSessionStorageNamespaceId, |
195 base::string16(), | 195 base::string16(), |
196 false, // is_renderer_created | 196 false, // is_renderer_created |
197 false, // swapped_out | 197 false, // swapped_out |
198 false, // hidden | 198 false, // hidden |
199 false, // never_visible | 199 false, // never_visible |
200 1, // next_page_id | 200 1, // next_page_id |
201 blink::WebScreenInfo(), | 201 blink::WebScreenInfo()); |
202 AccessibilityModeOff); | |
203 view->AddRef(); | 202 view->AddRef(); |
204 view_ = view; | 203 view_ = view; |
205 } | 204 } |
206 | 205 |
207 void RenderViewTest::TearDown() { | 206 void RenderViewTest::TearDown() { |
208 // Try very hard to collect garbage before shutting down. | 207 // Try very hard to collect garbage before shutting down. |
209 // "5" was chosen following http://crbug.com/46571#c9 | 208 // "5" was chosen following http://crbug.com/46571#c9 |
210 const int kGCIterations = 5; | 209 const int kGCIterations = 5; |
211 for (int i = 0; i < kGCIterations; i++) | 210 for (int i = 0; i < kGCIterations; i++) |
212 GetMainFrame()->collectGarbage(); | 211 GetMainFrame()->collectGarbage(); |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 FrameMsg_Navigate navigate_message(impl->main_render_frame()->GetRoutingID(), | 421 FrameMsg_Navigate navigate_message(impl->main_render_frame()->GetRoutingID(), |
423 navigate_params); | 422 navigate_params); |
424 impl->main_render_frame()->OnMessageReceived(navigate_message); | 423 impl->main_render_frame()->OnMessageReceived(navigate_message); |
425 | 424 |
426 // The load actually happens asynchronously, so we pump messages to process | 425 // The load actually happens asynchronously, so we pump messages to process |
427 // the pending continuation. | 426 // the pending continuation. |
428 FrameLoadWaiter(view_->GetMainRenderFrame()).Wait(); | 427 FrameLoadWaiter(view_->GetMainRenderFrame()).Wait(); |
429 } | 428 } |
430 | 429 |
431 } // namespace content | 430 } // namespace content |
OLD | NEW |