OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/native_web_keyboard_event.h" | 9 #include "chrome/common/native_web_keyboard_event.h" |
10 #include "chrome/common/render_messages.h" | 10 #include "chrome/common/render_messages.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 std::vector<std::string> permissions( | 84 std::vector<std::string> permissions( |
85 Extension::kPermissionNames, | 85 Extension::kPermissionNames, |
86 Extension::kPermissionNames + Extension::kNumPermissions); | 86 Extension::kPermissionNames + Extension::kNumPermissions); |
87 ExtensionProcessBindings::SetAPIPermissions("", permissions); | 87 ExtensionProcessBindings::SetAPIPermissions("", permissions); |
88 | 88 |
89 mock_process_.reset(new MockProcess()); | 89 mock_process_.reset(new MockProcess()); |
90 | 90 |
91 render_thread_.set_routing_id(kRouteId); | 91 render_thread_.set_routing_id(kRouteId); |
92 | 92 |
93 // This needs to pass the mock render thread to the view. | 93 // This needs to pass the mock render thread to the view. |
94 view_ = RenderView::Create(&render_thread_, 0, NULL, kOpenerId, | 94 view_ = RenderView::Create(&render_thread_, NULL, NULL, kOpenerId, |
95 RendererPreferences(), WebPreferences(), | 95 RendererPreferences(), WebPreferences(), |
96 new SharedRenderViewCounter(0), kRouteId); | 96 new SharedRenderViewCounter(0), kRouteId); |
97 | 97 |
98 // Attach a pseudo keyboard device to this object. | 98 // Attach a pseudo keyboard device to this object. |
99 mock_keyboard_.reset(new MockKeyboard()); | 99 mock_keyboard_.reset(new MockKeyboard()); |
100 } | 100 } |
101 void RenderViewTest::TearDown() { | 101 void RenderViewTest::TearDown() { |
102 render_thread_.SendCloseMessage(); | 102 render_thread_.SendCloseMessage(); |
103 | 103 |
104 // Run the loop so the release task from the renderwidget executes. | 104 // Run the loop so the release task from the renderwidget executes. |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 keyup_message->WriteData(reinterpret_cast<const char*>(&keyup_event), | 161 keyup_message->WriteData(reinterpret_cast<const char*>(&keyup_event), |
162 sizeof(WebKit::WebKeyboardEvent)); | 162 sizeof(WebKit::WebKeyboardEvent)); |
163 view_->OnHandleInputEvent(*keyup_message); | 163 view_->OnHandleInputEvent(*keyup_message); |
164 | 164 |
165 return length; | 165 return length; |
166 #else | 166 #else |
167 NOTIMPLEMENTED(); | 167 NOTIMPLEMENTED(); |
168 return L'\0'; | 168 return L'\0'; |
169 #endif | 169 #endif |
170 } | 170 } |
OLD | NEW |