OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/renderer_preferences.h" | |
9 #include "content/common/view_messages.h" | 8 #include "content/common/view_messages.h" |
10 #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" |
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/WebScriptController.h
" | 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h
" |
18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h" | 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h" |
19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h" | 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h" |
20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 // hacky, but this is the world we live in... | 105 // hacky, but this is the world we live in... |
106 webkit_glue::SetJavaScriptFlags(" --expose-gc"); | 106 webkit_glue::SetJavaScriptFlags(" --expose-gc"); |
107 WebKit::initialize(&webkit_platform_support_); | 107 WebKit::initialize(&webkit_platform_support_); |
108 | 108 |
109 mock_process_.reset(new MockRenderProcess); | 109 mock_process_.reset(new MockRenderProcess); |
110 | 110 |
111 // This needs to pass the mock render thread to the view. | 111 // This needs to pass the mock render thread to the view. |
112 RenderViewImpl* view = RenderViewImpl::Create( | 112 RenderViewImpl* view = RenderViewImpl::Create( |
113 0, | 113 0, |
114 kOpenerId, | 114 kOpenerId, |
115 RendererPreferences(), | 115 content::RendererPreferences(), |
116 WebPreferences(), | 116 WebPreferences(), |
117 new SharedRenderViewCounter(0), | 117 new SharedRenderViewCounter(0), |
118 kRouteId, | 118 kRouteId, |
119 kInvalidSessionStorageNamespaceId, | 119 kInvalidSessionStorageNamespaceId, |
120 string16()); | 120 string16()); |
121 view->AddRef(); | 121 view->AddRef(); |
122 view_ = view; | 122 view_ = view; |
123 | 123 |
124 // Attach a pseudo keyboard device to this object. | 124 // Attach a pseudo keyboard device to this object. |
125 mock_keyboard_.reset(new MockKeyboard()); | 125 mock_keyboard_.reset(new MockKeyboard()); |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); | 336 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); |
337 impl->set_send_content_state_immediately(true); | 337 impl->set_send_content_state_immediately(true); |
338 } | 338 } |
339 | 339 |
340 WebKit::WebWidget* RenderViewTest::GetWebWidget() { | 340 WebKit::WebWidget* RenderViewTest::GetWebWidget() { |
341 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); | 341 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); |
342 return impl->webwidget(); | 342 return impl->webwidget(); |
343 } | 343 } |
344 | 344 |
345 } // namespace content | 345 } // namespace content |
OLD | NEW |