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" | 7 #include "content/common/dom_storage_common.h" |
8 #include "content/common/view_messages.h" | 8 #include "content/common/view_messages.h" |
9 #include "content/public/browser/native_web_keyboard_event.h" | 9 #include "content/public/browser/native_web_keyboard_event.h" |
10 #include "content/public/common/renderer_preferences.h" | 10 #include "content/public/common/renderer_preferences.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/WebInputEvent.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" |
| 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" |
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h
" | 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h
" |
18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h" | 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h" |
19 #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" |
20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
21 #include "webkit/glue/webkit_glue.h" | 22 #include "webkit/glue/webkit_glue.h" |
22 | 23 |
23 #if defined(OS_LINUX) && !defined(USE_AURA) | 24 #if defined(OS_LINUX) && !defined(USE_AURA) |
24 #include "ui/base/gtk/event_synthesis_gtk.h" | 25 #include "ui/base/gtk/event_synthesis_gtk.h" |
25 #endif | 26 #endif |
26 | 27 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 RenderViewImpl* view = RenderViewImpl::Create( | 150 RenderViewImpl* view = RenderViewImpl::Create( |
150 0, | 151 0, |
151 kOpenerId, | 152 kOpenerId, |
152 content::RendererPreferences(), | 153 content::RendererPreferences(), |
153 WebPreferences(), | 154 WebPreferences(), |
154 new SharedRenderViewCounter(0), | 155 new SharedRenderViewCounter(0), |
155 kRouteId, | 156 kRouteId, |
156 kSurfaceId, | 157 kSurfaceId, |
157 kInvalidSessionStorageNamespaceId, | 158 kInvalidSessionStorageNamespaceId, |
158 string16(), | 159 string16(), |
159 1); | 160 1, |
| 161 WebKit::WebScreenInfo()); |
160 view->AddRef(); | 162 view->AddRef(); |
161 view_ = view; | 163 view_ = view; |
162 | 164 |
163 // Attach a pseudo keyboard device to this object. | 165 // Attach a pseudo keyboard device to this object. |
164 mock_keyboard_.reset(new MockKeyboard()); | 166 mock_keyboard_.reset(new MockKeyboard()); |
165 } | 167 } |
166 | 168 |
167 void RenderViewTest::TearDown() { | 169 void RenderViewTest::TearDown() { |
168 // Try very hard to collect garbage before shutting down. | 170 // Try very hard to collect garbage before shutting down. |
169 GetMainFrame()->collectGarbage(); | 171 GetMainFrame()->collectGarbage(); |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); | 446 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); |
445 impl->set_send_content_state_immediately(true); | 447 impl->set_send_content_state_immediately(true); |
446 } | 448 } |
447 | 449 |
448 WebKit::WebWidget* RenderViewTest::GetWebWidget() { | 450 WebKit::WebWidget* RenderViewTest::GetWebWidget() { |
449 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); | 451 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); |
450 return impl->webwidget(); | 452 return impl->webwidget(); |
451 } | 453 } |
452 | 454 |
453 } // namespace content | 455 } // namespace content |
OLD | NEW |