| 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/input_messages.h" | 8 #include "content/common/input_messages.h" |
| 9 #include "content/common/view_messages.h" | 9 #include "content/common/view_messages.h" |
| 10 #include "content/public/browser/native_web_keyboard_event.h" | 10 #include "content/public/browser/native_web_keyboard_event.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 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 |
| 39 namespace { | 39 namespace { |
| 40 const int32 kOpenerId = -2; | 40 const int32 kOpenerId = -2; |
| 41 const int32 kRouteId = 5; | 41 const int32 kRouteId = 5; |
| 42 const int32 kNewWindowRouteId = 6; | 42 const int32 kMainFrameRouteId = 6; |
| 43 const int32 kNewWindowRouteId = 7; |
| 43 const int32 kSurfaceId = 42; | 44 const int32 kSurfaceId = 42; |
| 44 | 45 |
| 45 } // namespace | 46 } // namespace |
| 46 | 47 |
| 47 namespace content { | 48 namespace content { |
| 48 | 49 |
| 49 class RendererWebKitPlatformSupportImplNoSandboxImpl | 50 class RendererWebKitPlatformSupportImplNoSandboxImpl |
| 50 : public RendererWebKitPlatformSupportImpl { | 51 : public RendererWebKitPlatformSupportImpl { |
| 51 public: | 52 public: |
| 52 virtual WebKit::WebSandboxSupport* sandboxSupport() { | 53 virtual WebKit::WebSandboxSupport* sandboxSupport() { |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 | 164 |
| 164 mock_process_.reset(new MockRenderProcess); | 165 mock_process_.reset(new MockRenderProcess); |
| 165 | 166 |
| 166 // This needs to pass the mock render thread to the view. | 167 // This needs to pass the mock render thread to the view. |
| 167 RenderViewImpl* view = RenderViewImpl::Create( | 168 RenderViewImpl* view = RenderViewImpl::Create( |
| 168 kOpenerId, | 169 kOpenerId, |
| 169 RendererPreferences(), | 170 RendererPreferences(), |
| 170 WebPreferences(), | 171 WebPreferences(), |
| 171 new SharedRenderViewCounter(0), | 172 new SharedRenderViewCounter(0), |
| 172 kRouteId, | 173 kRouteId, |
| 174 kMainFrameRouteId, |
| 173 kSurfaceId, | 175 kSurfaceId, |
| 174 dom_storage::kInvalidSessionStorageNamespaceId, | 176 dom_storage::kInvalidSessionStorageNamespaceId, |
| 175 string16(), | 177 string16(), |
| 176 false, | 178 false, |
| 177 false, | 179 false, |
| 178 1, | 180 1, |
| 179 WebKit::WebScreenInfo(), | 181 WebKit::WebScreenInfo(), |
| 180 AccessibilityModeOff, | 182 AccessibilityModeOff, |
| 181 true); | 183 true); |
| 182 view->AddRef(); | 184 view->AddRef(); |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 | 371 |
| 370 ViewMsg_Navigate navigate_message(impl->GetRoutingID(), navigate_params); | 372 ViewMsg_Navigate navigate_message(impl->GetRoutingID(), navigate_params); |
| 371 OnMessageReceived(navigate_message); | 373 OnMessageReceived(navigate_message); |
| 372 | 374 |
| 373 // The load actually happens asynchronously, so we pump messages to process | 375 // The load actually happens asynchronously, so we pump messages to process |
| 374 // the pending continuation. | 376 // the pending continuation. |
| 375 ProcessPendingMessages(); | 377 ProcessPendingMessages(); |
| 376 } | 378 } |
| 377 | 379 |
| 378 } // namespace content | 380 } // namespace content |
| OLD | NEW |