| OLD | NEW |
| 1 // Copyright (c) 2010 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 #ifndef CHROME_TEST_AUTOMATION_BROWSER_PROXY_H_ | 5 #ifndef CHROME_TEST_AUTOMATION_BROWSER_PROXY_H_ |
| 6 #define CHROME_TEST_AUTOMATION_BROWSER_PROXY_H_ | 6 #define CHROME_TEST_AUTOMATION_BROWSER_PROXY_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 // three-step process: | 216 // three-step process: |
| 217 // 1. Call StartTrackingPopupMenus. | 217 // 1. Call StartTrackingPopupMenus. |
| 218 // 2. Call an automation method that results in opening the popup menu. | 218 // 2. Call an automation method that results in opening the popup menu. |
| 219 // 3. Call WaitForPopupMenuToOpen and check for success. | 219 // 3. Call WaitForPopupMenuToOpen and check for success. |
| 220 // Both methods return true on success. | 220 // Both methods return true on success. |
| 221 bool StartTrackingPopupMenus() WARN_UNUSED_RESULT; | 221 bool StartTrackingPopupMenus() WARN_UNUSED_RESULT; |
| 222 bool WaitForPopupMenuToOpen() WARN_UNUSED_RESULT; | 222 bool WaitForPopupMenuToOpen() WARN_UNUSED_RESULT; |
| 223 | 223 |
| 224 // Generic pattern for sending automation requests. | 224 // Generic pattern for sending automation requests. |
| 225 bool SendJSONRequest(const std::string& request, | 225 bool SendJSONRequest(const std::string& request, |
| 226 int timeout_ms, |
| 226 std::string* response) WARN_UNUSED_RESULT; | 227 std::string* response) WARN_UNUSED_RESULT; |
| 227 | 228 |
| 228 // Gets the load times for all tabs started from the command line. | 229 // Gets the load times for all tabs started from the command line. |
| 229 // Puts the time of the first tab to start loading into |min_start_time|, | 230 // Puts the time of the first tab to start loading into |min_start_time|, |
| 230 // the time when loading stopped into |max_stop_time| (should be similar to | 231 // the time when loading stopped into |max_stop_time| (should be similar to |
| 231 // the delay that WaitForInitialLoads waits for), and a list of all | 232 // the delay that WaitForInitialLoads waits for), and a list of all |
| 232 // finished timestamps into |stop_times|. Returns true on success. | 233 // finished timestamps into |stop_times|. Returns true on success. |
| 233 bool GetInitialLoadTimes(float* min_start_time, float* max_stop_time, | 234 bool GetInitialLoadTimes(float* min_start_time, float* max_stop_time, |
| 234 std::vector<float>* stop_times); | 235 std::vector<float>* stop_times); |
| 235 | 236 |
| 236 | 237 |
| 237 protected: | 238 protected: |
| 238 virtual ~BrowserProxy() {} | 239 virtual ~BrowserProxy() {} |
| 239 private: | 240 private: |
| 240 DISALLOW_COPY_AND_ASSIGN(BrowserProxy); | 241 DISALLOW_COPY_AND_ASSIGN(BrowserProxy); |
| 241 }; | 242 }; |
| 242 | 243 |
| 243 #endif // CHROME_TEST_AUTOMATION_BROWSER_PROXY_H_ | 244 #endif // CHROME_TEST_AUTOMATION_BROWSER_PROXY_H_ |
| OLD | NEW |