| 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 "chrome/test/render_view_test.h" | 5 #include "chrome/test/render_view_test.h" |
| 6 | 6 |
| 7 #include "chrome/browser/extensions/extension_function_dispatcher.h" | 7 #include "chrome/browser/extensions/extension_function_dispatcher.h" |
| 8 #include "chrome/common/extensions/extension.h" | 8 #include "chrome/common/extensions/extension.h" |
| 9 #include "chrome/common/print_messages.h" | 9 #include "chrome/common/print_messages.h" |
| 10 #include "chrome/common/render_messages.h" | 10 #include "chrome/common/render_messages.h" |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 all_permissions.insert(Extension::kPermissions[i].name); | 127 all_permissions.insert(Extension::kPermissions[i].name); |
| 128 ExtensionProcessBindings::SetAPIPermissions("", all_permissions); | 128 ExtensionProcessBindings::SetAPIPermissions("", all_permissions); |
| 129 | 129 |
| 130 mock_process_.reset(new MockRenderProcess); | 130 mock_process_.reset(new MockRenderProcess); |
| 131 | 131 |
| 132 render_thread_.set_routing_id(kRouteId); | 132 render_thread_.set_routing_id(kRouteId); |
| 133 | 133 |
| 134 // This needs to pass the mock render thread to the view. | 134 // This needs to pass the mock render thread to the view. |
| 135 view_ = RenderView::Create(&render_thread_, | 135 view_ = RenderView::Create(&render_thread_, |
| 136 0, | 136 0, |
| 137 gfx::kNullPluginWindow, |
| 137 kOpenerId, | 138 kOpenerId, |
| 138 RendererPreferences(), | 139 RendererPreferences(), |
| 139 WebPreferences(), | 140 WebPreferences(), |
| 140 new SharedRenderViewCounter(0), | 141 new SharedRenderViewCounter(0), |
| 141 kRouteId, | 142 kRouteId, |
| 142 kInvalidSessionStorageNamespaceId, | 143 kInvalidSessionStorageNamespaceId, |
| 143 string16()); | 144 string16()); |
| 144 | 145 |
| 145 // Attach a pseudo keyboard device to this object. | 146 // Attach a pseudo keyboard device to this object. |
| 146 mock_keyboard_.reset(new MockKeyboard()); | 147 mock_keyboard_.reset(new MockKeyboard()); |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 mouse_event.x = bounds.CenterPoint().x(); | 358 mouse_event.x = bounds.CenterPoint().x(); |
| 358 mouse_event.y = bounds.CenterPoint().y(); | 359 mouse_event.y = bounds.CenterPoint().y(); |
| 359 mouse_event.clickCount = 1; | 360 mouse_event.clickCount = 1; |
| 360 ViewMsg_HandleInputEvent input_event(0); | 361 ViewMsg_HandleInputEvent input_event(0); |
| 361 scoped_ptr<IPC::Message> input_message(new ViewMsg_HandleInputEvent(0)); | 362 scoped_ptr<IPC::Message> input_message(new ViewMsg_HandleInputEvent(0)); |
| 362 input_message->WriteData(reinterpret_cast<const char*>(&mouse_event), | 363 input_message->WriteData(reinterpret_cast<const char*>(&mouse_event), |
| 363 sizeof(WebMouseEvent)); | 364 sizeof(WebMouseEvent)); |
| 364 view_->OnMessageReceived(*input_message); | 365 view_->OnMessageReceived(*input_message); |
| 365 return true; | 366 return true; |
| 366 } | 367 } |
| OLD | NEW |