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/test/render_view_test.h" | 5 #include "content/test/render_view_test.h" |
6 | 6 |
7 #include "content/common/view_messages.h" | 7 #include "content/common/view_messages.h" |
8 #include "content/public/browser/native_web_keyboard_event.h" | 8 #include "content/public/browser/native_web_keyboard_event.h" |
9 #include "content/public/common/renderer_preferences.h" | 9 #include "content/public/common/renderer_preferences.h" |
10 #include "content/renderer/render_thread_impl.h" | 10 #include "content/renderer/render_thread_impl.h" |
11 #include "content/renderer/render_view_impl.h" | 11 #include "content/renderer/render_view_impl.h" |
12 #include "content/renderer/renderer_main_platform_delegate.h" | 12 #include "content/renderer/renderer_main_platform_delegate.h" |
13 #include "content/test/mock_render_process.h" | 13 #include "content/test/mock_render_process.h" |
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h" |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" | 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" |
18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" | |
19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h
" | 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h
" |
20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h" | 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h" |
21 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLReques
t.h" | 20 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLReques
t.h" |
22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
23 #include "webkit/dom_storage/dom_storage_types.h" | 22 #include "webkit/dom_storage/dom_storage_types.h" |
24 #include "webkit/glue/glue_serialize.h" | 23 #include "webkit/glue/glue_serialize.h" |
25 #include "webkit/glue/webkit_glue.h" | 24 #include "webkit/glue/webkit_glue.h" |
26 | 25 |
27 #if defined(OS_LINUX) && !defined(USE_AURA) | 26 #if defined(OS_LINUX) && !defined(USE_AURA) |
28 #include "ui/base/gtk/event_synthesis_gtk.h" | 27 #include "ui/base/gtk/event_synthesis_gtk.h" |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 content::RendererPreferences(), | 171 content::RendererPreferences(), |
173 webkit_glue::WebPreferences(), | 172 webkit_glue::WebPreferences(), |
174 new SharedRenderViewCounter(0), | 173 new SharedRenderViewCounter(0), |
175 kRouteId, | 174 kRouteId, |
176 kSurfaceId, | 175 kSurfaceId, |
177 dom_storage::kInvalidSessionStorageNamespaceId, | 176 dom_storage::kInvalidSessionStorageNamespaceId, |
178 string16(), | 177 string16(), |
179 false, | 178 false, |
180 false, | 179 false, |
181 1, | 180 1, |
182 WebKit::WebScreenInfo(), | |
183 NULL, | 181 NULL, |
184 AccessibilityModeOff); | 182 AccessibilityModeOff); |
185 view->AddRef(); | 183 view->AddRef(); |
186 view_ = view; | 184 view_ = view; |
187 | 185 |
188 // Attach a pseudo keyboard device to this object. | 186 // Attach a pseudo keyboard device to this object. |
189 mock_keyboard_.reset(new MockKeyboard()); | 187 mock_keyboard_.reset(new MockKeyboard()); |
190 } | 188 } |
191 | 189 |
192 void RenderViewTest::TearDown() { | 190 void RenderViewTest::TearDown() { |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 | 493 |
496 ViewMsg_Navigate navigate_message(impl->GetRoutingID(), navigate_params); | 494 ViewMsg_Navigate navigate_message(impl->GetRoutingID(), navigate_params); |
497 OnMessageReceived(navigate_message); | 495 OnMessageReceived(navigate_message); |
498 | 496 |
499 // The load actually happens asynchronously, so we pump messages to process | 497 // The load actually happens asynchronously, so we pump messages to process |
500 // the pending continuation. | 498 // the pending continuation. |
501 ProcessPendingMessages(); | 499 ProcessPendingMessages(); |
502 } | 500 } |
503 | 501 |
504 } // namespace content | 502 } // namespace content |
OLD | NEW |