| 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 ASSERT_EQ(NULL, tab_.get()); | 162 ASSERT_EQ(NULL, tab_.get()); |
| 163 tab_ = new TabProxy(&dummy_sender_, tracker_.get(), tab_handle_); | 163 tab_ = new TabProxy(&dummy_sender_, tracker_.get(), tab_handle_); |
| 164 } | 164 } |
| 165 | 165 |
| 166 // Easy methods to set expectations. | 166 // Easy methods to set expectations. |
| 167 void SetAutomationServerOk(int times); | 167 void SetAutomationServerOk(int times); |
| 168 void Set_CFD_LaunchFailed(AutomationLaunchResult result); | 168 void Set_CFD_LaunchFailed(AutomationLaunchResult result); |
| 169 | 169 |
| 170 protected: | 170 protected: |
| 171 CFACMockTest() | 171 CFACMockTest() |
| 172 : tracker_(NULL), timeout_(500), | 172 : timeout_(500), |
| 173 returned_proxy_(static_cast<ChromeFrameAutomationProxy*>(&mock_proxy_)) { | 173 returned_proxy_(static_cast<ChromeFrameAutomationProxy*>(&mock_proxy_)) { |
| 174 GetChromeFrameProfilePath(L"Adam.N.Epilinter", &profile_path_); | 174 GetChromeFrameProfilePath(L"Adam.N.Epilinter", &profile_path_); |
| 175 id_ = reinterpret_cast<void*>(5); | 175 id_ = reinterpret_cast<void*>(5); |
| 176 tab_handle_ = 3; | 176 tab_handle_ = 3; |
| 177 } | 177 } |
| 178 | 178 |
| 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 |