| 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 #ifndef CHROME_FRAME_TEST_AUTOMATION_CLIENT_MOCK_H_ | 5 #ifndef CHROME_FRAME_TEST_AUTOMATION_CLIENT_MOCK_H_ |
| 6 #define CHROME_FRAME_TEST_AUTOMATION_CLIENT_MOCK_H_ | 6 #define CHROME_FRAME_TEST_AUTOMATION_CLIENT_MOCK_H_ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 // So we have a mock that is used as the default for the returned_proxy_ | 142 // So we have a mock that is used as the default for the returned_proxy_ |
| 143 // pointer, but tests can set their own pointer in there as needed. | 143 // pointer, but tests can set their own pointer in there as needed. |
| 144 StrictMock<MockAutomationProxy> mock_proxy_; | 144 StrictMock<MockAutomationProxy> mock_proxy_; |
| 145 ChromeFrameAutomationProxy* returned_proxy_; | 145 ChromeFrameAutomationProxy* returned_proxy_; |
| 146 scoped_ptr<AutomationHandleTracker> tracker_; | 146 scoped_ptr<AutomationHandleTracker> tracker_; |
| 147 MockAutomationMessageSender dummy_sender_; | 147 MockAutomationMessageSender dummy_sender_; |
| 148 scoped_refptr<TabProxy> tab_; | 148 scoped_refptr<TabProxy> tab_; |
| 149 // the victim of all tests | 149 // the victim of all tests |
| 150 scoped_refptr<ChromeFrameAutomationClient> client_; | 150 scoped_refptr<ChromeFrameAutomationClient> client_; |
| 151 | 151 |
| 152 FilePath profile_path_; | 152 base::FilePath profile_path_; |
| 153 int timeout_; | 153 int timeout_; |
| 154 void* id_; // Automation server id we are going to return | 154 void* id_; // Automation server id we are going to return |
| 155 int tab_handle_; // Tab handle. Any non-zero value is Ok. | 155 int tab_handle_; // Tab handle. Any non-zero value is Ok. |
| 156 | 156 |
| 157 inline ChromeFrameAutomationProxy* get_proxy() { | 157 inline ChromeFrameAutomationProxy* get_proxy() { |
| 158 return returned_proxy_; | 158 return returned_proxy_; |
| 159 } | 159 } |
| 160 | 160 |
| 161 inline void CreateTab() { | 161 inline void CreateTab() { |
| 162 ASSERT_EQ(NULL, tab_.get()); | 162 ASSERT_EQ(NULL, tab_.get()); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 179 virtual void SetUp() { | 179 virtual void SetUp() { |
| 180 dummy_sender_.ForwardTo(&mock_proxy_); | 180 dummy_sender_.ForwardTo(&mock_proxy_); |
| 181 tracker_.reset(new AutomationHandleTracker()); | 181 tracker_.reset(new AutomationHandleTracker()); |
| 182 | 182 |
| 183 client_ = new ChromeFrameAutomationClient; | 183 client_ = new ChromeFrameAutomationClient; |
| 184 client_->set_proxy_factory(&factory_); | 184 client_->set_proxy_factory(&factory_); |
| 185 } | 185 } |
| 186 }; | 186 }; |
| 187 | 187 |
| 188 #endif // CHROME_FRAME_TEST_AUTOMATION_CLIENT_MOCK_H_ | 188 #endif // CHROME_FRAME_TEST_AUTOMATION_CLIENT_MOCK_H_ |
| OLD | NEW |