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/dom_storage_common.h" | |
8 #include "content/common/view_messages.h" | 7 #include "content/common/view_messages.h" |
9 #include "content/public/browser/native_web_keyboard_event.h" | 8 #include "content/public/browser/native_web_keyboard_event.h" |
10 #include "content/public/common/renderer_preferences.h" | 9 #include "content/public/common/renderer_preferences.h" |
11 #include "content/renderer/render_thread_impl.h" | 10 #include "content/renderer/render_thread_impl.h" |
12 #include "content/renderer/render_view_impl.h" | 11 #include "content/renderer/render_view_impl.h" |
13 #include "content/renderer/renderer_main_platform_delegate.h" | 12 #include "content/renderer/renderer_main_platform_delegate.h" |
14 #include "content/test/mock_render_process.h" | 13 #include "content/test/mock_render_process.h" |
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" |
18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" | 17 #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" |
| 22 #include "webkit/dom_storage/dom_storage_types.h" |
23 #include "webkit/glue/webkit_glue.h" | 23 #include "webkit/glue/webkit_glue.h" |
24 | 24 |
25 #if defined(OS_LINUX) && !defined(USE_AURA) | 25 #if defined(OS_LINUX) && !defined(USE_AURA) |
26 #include "ui/base/gtk/event_synthesis_gtk.h" | 26 #include "ui/base/gtk/event_synthesis_gtk.h" |
27 #endif | 27 #endif |
28 | 28 |
29 #if defined(USE_AURA) | 29 #if defined(USE_AURA) |
30 #include "ui/aura/event.h" | 30 #include "ui/aura/event.h" |
31 #endif | 31 #endif |
32 | 32 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 155 |
156 // This needs to pass the mock render thread to the view. | 156 // This needs to pass the mock render thread to the view. |
157 RenderViewImpl* view = RenderViewImpl::Create( | 157 RenderViewImpl* view = RenderViewImpl::Create( |
158 0, | 158 0, |
159 kOpenerId, | 159 kOpenerId, |
160 content::RendererPreferences(), | 160 content::RendererPreferences(), |
161 WebPreferences(), | 161 WebPreferences(), |
162 new SharedRenderViewCounter(0), | 162 new SharedRenderViewCounter(0), |
163 kRouteId, | 163 kRouteId, |
164 kSurfaceId, | 164 kSurfaceId, |
165 kInvalidSessionStorageNamespaceId, | 165 dom_storage::kInvalidSessionStorageNamespaceId, |
166 string16(), | 166 string16(), |
167 1, | 167 1, |
168 WebKit::WebScreenInfo(), | 168 WebKit::WebScreenInfo(), |
169 false); | 169 false); |
170 view->AddRef(); | 170 view->AddRef(); |
171 view_ = view; | 171 view_ = view; |
172 | 172 |
173 // Attach a pseudo keyboard device to this object. | 173 // Attach a pseudo keyboard device to this object. |
174 mock_keyboard_.reset(new MockKeyboard()); | 174 mock_keyboard_.reset(new MockKeyboard()); |
175 } | 175 } |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); | 454 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); |
455 impl->set_send_content_state_immediately(true); | 455 impl->set_send_content_state_immediately(true); |
456 } | 456 } |
457 | 457 |
458 WebKit::WebWidget* RenderViewTest::GetWebWidget() { | 458 WebKit::WebWidget* RenderViewTest::GetWebWidget() { |
459 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); | 459 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); |
460 return impl->webwidget(); | 460 return impl->webwidget(); |
461 } | 461 } |
462 | 462 |
463 } // namespace content | 463 } // namespace content |
OLD | NEW |