| 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/base/render_view_test.h" | 5 #include "chrome/test/base/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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 WebScriptController::registerExtension(ExtensionProcessBindings::Get( | 120 WebScriptController::registerExtension(ExtensionProcessBindings::Get( |
| 121 extension_dispatcher_)); | 121 extension_dispatcher_)); |
| 122 WebScriptController::registerExtension(new ChromeV8Extension( | 122 WebScriptController::registerExtension(new ChromeV8Extension( |
| 123 "extensions/apitest.js", IDR_EXTENSION_APITEST_JS, NULL)); | 123 "extensions/apitest.js", IDR_EXTENSION_APITEST_JS, NULL)); |
| 124 | 124 |
| 125 mock_process_.reset(new MockRenderProcess); | 125 mock_process_.reset(new MockRenderProcess); |
| 126 | 126 |
| 127 render_thread_.set_routing_id(kRouteId); | 127 render_thread_.set_routing_id(kRouteId); |
| 128 | 128 |
| 129 // This needs to pass the mock render thread to the view. | 129 // This needs to pass the mock render thread to the view. |
| 130 view_ = RenderView::Create(0, | 130 view_ = RenderViewImpl::Create(0, |
| 131 kOpenerId, | 131 kOpenerId, |
| 132 RendererPreferences(), | 132 RendererPreferences(), |
| 133 WebPreferences(), | 133 WebPreferences(), |
| 134 new SharedRenderViewCounter(0), | 134 new SharedRenderViewCounter(0), |
| 135 kRouteId, | 135 kRouteId, |
| 136 kInvalidSessionStorageNamespaceId, | 136 kInvalidSessionStorageNamespaceId, |
| 137 string16()); | 137 string16()); |
| 138 | 138 |
| 139 // Attach a pseudo keyboard device to this object. | 139 // Attach a pseudo keyboard device to this object. |
| 140 mock_keyboard_.reset(new MockKeyboard()); | 140 mock_keyboard_.reset(new MockKeyboard()); |
| 141 | 141 |
| 142 // RenderView doesn't expose it's PasswordAutofillManager or | 142 // RenderView doesn't expose it's PasswordAutofillManager or |
| 143 // AutofillAgent objects, because it has no need to store them directly | 143 // AutofillAgent objects, because it has no need to store them directly |
| 144 // (they're stored as RenderViewObserver*). So just create another set. | 144 // (they're stored as RenderViewObserver*). So just create another set. |
| 145 password_autofill_ = new PasswordAutofillManager(view_); | 145 password_autofill_ = new PasswordAutofillManager(view_); |
| 146 autofill_agent_ = new AutofillAgent(view_, password_autofill_); | 146 autofill_agent_ = new AutofillAgent(view_, password_autofill_); |
| 147 } | 147 } |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 view_->OnMessageReceived(*input_message); | 320 view_->OnMessageReceived(*input_message); |
| 321 return true; | 321 return true; |
| 322 } | 322 } |
| 323 | 323 |
| 324 void RenderViewTest::ClearHistory() { | 324 void RenderViewTest::ClearHistory() { |
| 325 view_->page_id_ = -1; | 325 view_->page_id_ = -1; |
| 326 view_->history_list_offset_ = -1; | 326 view_->history_list_offset_ = -1; |
| 327 view_->history_list_length_ = 0; | 327 view_->history_list_length_ = 0; |
| 328 view_->history_page_ids_.clear(); | 328 view_->history_page_ids_.clear(); |
| 329 } | 329 } |
| OLD | NEW |