| 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 #ifndef CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_UITEST_H_ | 5 #ifndef CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_UITEST_H_ |
| 6 #define CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_UITEST_H_ | 6 #define CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_UITEST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 } | 28 } |
| 29 }; | 29 }; |
| 30 | 30 |
| 31 // Used to implement external tab UI tests. | 31 // Used to implement external tab UI tests. |
| 32 // | 32 // |
| 33 // We have to derive from AutomationProxy in order to hook up | 33 // We have to derive from AutomationProxy in order to hook up |
| 34 // OnMessageReceived callbacks. | 34 // OnMessageReceived callbacks. |
| 35 class ExternalTabUITestMockClient : public AutomationProxy { | 35 class ExternalTabUITestMockClient : public AutomationProxy { |
| 36 public: | 36 public: |
| 37 explicit ExternalTabUITestMockClient(int execution_timeout); | 37 explicit ExternalTabUITestMockClient(int execution_timeout); |
| 38 ~ExternalTabUITestMockClient() { | 38 virtual ~ExternalTabUITestMockClient(); |
| 39 EXPECT_TRUE(host_window_ == NULL); | |
| 40 } | |
| 41 | 39 |
| 42 MOCK_METHOD2(OnDidNavigate, void(int tab_handle, | 40 MOCK_METHOD2(OnDidNavigate, void(int tab_handle, |
| 43 const IPC::NavigationInfo& nav_info)); | 41 const IPC::NavigationInfo& nav_info)); |
| 44 MOCK_METHOD4(OnForwardMessageToExternalHost, void(int handle, | 42 MOCK_METHOD4(OnForwardMessageToExternalHost, void(int handle, |
| 45 const std::string& message, const std::string& origin, | 43 const std::string& message, const std::string& origin, |
| 46 const std::string& target)); | 44 const std::string& target)); |
| 47 MOCK_METHOD3(OnRequestStart, void(int tab_handle, int request_id, | 45 MOCK_METHOD3(OnRequestStart, void(int tab_handle, int request_id, |
| 48 const IPC::AutomationURLRequest& request)); | 46 const IPC::AutomationURLRequest& request)); |
| 49 MOCK_METHOD3(OnRequestRead, void(int tab_handle, int request_id, | 47 MOCK_METHOD3(OnRequestRead, void(int tab_handle, int request_id, |
| 50 int bytes_to_read)); | 48 int bytes_to_read)); |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 virtual AutomationProxy* CreateAutomationProxy(int execution_timeout); | 116 virtual AutomationProxy* CreateAutomationProxy(int execution_timeout); |
| 119 protected: | 117 protected: |
| 120 // Filtered Inet will override automation callbacks for network resources. | 118 // Filtered Inet will override automation callbacks for network resources. |
| 121 virtual bool ShouldFilterInet() { | 119 virtual bool ShouldFilterInet() { |
| 122 return false; | 120 return false; |
| 123 } | 121 } |
| 124 ExternalTabUITestMockClient* mock_; | 122 ExternalTabUITestMockClient* mock_; |
| 125 }; | 123 }; |
| 126 | 124 |
| 127 #endif // CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_UITEST_H_ | 125 #endif // CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_UITEST_H_ |
| OLD | NEW |