| 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/input_messages.h" | 9 #include "content/common/input_messages.h" |
| 9 #include "content/common/view_messages.h" | 10 #include "content/common/view_messages.h" |
| 10 #include "content/public/browser/native_web_keyboard_event.h" | 11 #include "content/public/browser/native_web_keyboard_event.h" |
| 11 #include "content/public/common/renderer_preferences.h" | 12 #include "content/public/common/renderer_preferences.h" |
| 12 #include "content/public/renderer/history_item_serialization.h" | 13 #include "content/public/renderer/history_item_serialization.h" |
| 13 #include "content/renderer/render_thread_impl.h" | 14 #include "content/renderer/render_thread_impl.h" |
| 14 #include "content/renderer/render_view_impl.h" | 15 #include "content/renderer/render_view_impl.h" |
| 15 #include "content/renderer/renderer_main_platform_delegate.h" | 16 #include "content/renderer/renderer_main_platform_delegate.h" |
| 16 #include "content/renderer/renderer_webkitplatformsupport_impl.h" | 17 #include "content/renderer/renderer_webkitplatformsupport_impl.h" |
| 17 #include "content/test/mock_render_process.h" | 18 #include "content/test/mock_render_process.h" |
| 18 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 19 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
| 19 #include "third_party/WebKit/public/web/WebFrame.h" | 20 #include "third_party/WebKit/public/web/WebFrame.h" |
| 20 #include "third_party/WebKit/public/web/WebHistoryItem.h" | 21 #include "third_party/WebKit/public/web/WebHistoryItem.h" |
| 21 #include "third_party/WebKit/public/web/WebInputEvent.h" | 22 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| 22 #include "third_party/WebKit/public/web/WebKit.h" | 23 #include "third_party/WebKit/public/web/WebKit.h" |
| 23 #include "third_party/WebKit/public/web/WebScreenInfo.h" | 24 #include "third_party/WebKit/public/web/WebScreenInfo.h" |
| 24 #include "third_party/WebKit/public/web/WebScriptController.h" | 25 #include "third_party/WebKit/public/web/WebScriptController.h" |
| 25 #include "third_party/WebKit/public/web/WebScriptSource.h" | 26 #include "third_party/WebKit/public/web/WebScriptSource.h" |
| 26 #include "third_party/WebKit/public/web/WebView.h" | 27 #include "third_party/WebKit/public/web/WebView.h" |
| 27 #include "ui/base/resource/resource_bundle.h" | 28 #include "ui/base/resource/resource_bundle.h" |
| 28 #include "webkit/common/dom_storage/dom_storage_types.h" | |
| 29 #include "webkit/glue/webkit_glue.h" | 29 #include "webkit/glue/webkit_glue.h" |
| 30 | 30 |
| 31 using WebKit::WebFrame; | 31 using WebKit::WebFrame; |
| 32 using WebKit::WebInputEvent; | 32 using WebKit::WebInputEvent; |
| 33 using WebKit::WebMouseEvent; | 33 using WebKit::WebMouseEvent; |
| 34 using WebKit::WebScriptController; | 34 using WebKit::WebScriptController; |
| 35 using WebKit::WebScriptSource; | 35 using WebKit::WebScriptSource; |
| 36 using WebKit::WebString; | 36 using WebKit::WebString; |
| 37 using WebKit::WebURLRequest; | 37 using WebKit::WebURLRequest; |
| 38 | 38 |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 | 166 |
| 167 // This needs to pass the mock render thread to the view. | 167 // This needs to pass the mock render thread to the view. |
| 168 RenderViewImpl* view = RenderViewImpl::Create( | 168 RenderViewImpl* view = RenderViewImpl::Create( |
| 169 kOpenerId, | 169 kOpenerId, |
| 170 RendererPreferences(), | 170 RendererPreferences(), |
| 171 WebPreferences(), | 171 WebPreferences(), |
| 172 new SharedRenderViewCounter(0), | 172 new SharedRenderViewCounter(0), |
| 173 kRouteId, | 173 kRouteId, |
| 174 kMainFrameRouteId, | 174 kMainFrameRouteId, |
| 175 kSurfaceId, | 175 kSurfaceId, |
| 176 dom_storage::kInvalidSessionStorageNamespaceId, | 176 kInvalidSessionStorageNamespaceId, |
| 177 string16(), | 177 string16(), |
| 178 false, | 178 false, |
| 179 false, | 179 false, |
| 180 1, | 180 1, |
| 181 WebKit::WebScreenInfo(), | 181 WebKit::WebScreenInfo(), |
| 182 AccessibilityModeOff, | 182 AccessibilityModeOff, |
| 183 true); | 183 true); |
| 184 view->AddRef(); | 184 view->AddRef(); |
| 185 view_ = view; | 185 view_ = view; |
| 186 } | 186 } |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 | 371 |
| 372 ViewMsg_Navigate navigate_message(impl->GetRoutingID(), navigate_params); | 372 ViewMsg_Navigate navigate_message(impl->GetRoutingID(), navigate_params); |
| 373 OnMessageReceived(navigate_message); | 373 OnMessageReceived(navigate_message); |
| 374 | 374 |
| 375 // The load actually happens asynchronously, so we pump messages to process | 375 // The load actually happens asynchronously, so we pump messages to process |
| 376 // the pending continuation. | 376 // the pending continuation. |
| 377 ProcessPendingMessages(); | 377 ProcessPendingMessages(); |
| 378 } | 378 } |
| 379 | 379 |
| 380 } // namespace content | 380 } // namespace content |
| OLD | NEW |