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 #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> |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 std::string* response) WARN_UNUSED_RESULT; | 225 std::string* response) WARN_UNUSED_RESULT; |
226 | 226 |
227 // Gets the load times for all tabs started from the command line. | 227 // Gets the load times for all tabs started from the command line. |
228 // Puts the time of the first tab to start loading into |min_start_time|, | 228 // Puts the time of the first tab to start loading into |min_start_time|, |
229 // the time when loading stopped into |max_stop_time| (should be similar to | 229 // the time when loading stopped into |max_stop_time| (should be similar to |
230 // the delay that WaitForInitialLoads waits for), and a list of all | 230 // the delay that WaitForInitialLoads waits for), and a list of all |
231 // finished timestamps into |stop_times|. Returns true on success. | 231 // finished timestamps into |stop_times|. Returns true on success. |
232 bool GetInitialLoadTimes(float* min_start_time, float* max_stop_time, | 232 bool GetInitialLoadTimes(float* min_start_time, float* max_stop_time, |
233 std::vector<float>* stop_times); | 233 std::vector<float>* stop_times); |
234 | 234 |
| 235 // Begin a trace on the browser instance. |
| 236 // See base/event_trace.h for documentation of included/excluded categories. |
| 237 bool BeginTracing(const std::vector<std::string>& included_categories, |
| 238 const std::vector<std::string>& excluded_categories); |
| 239 |
| 240 // Helper method to begin trace on a single included category filter. |
| 241 // Example: BeginTracing("test_MyTest*"); |
| 242 bool BeginTracing(const std::string& included_categories); |
| 243 |
| 244 // End trace and collect the trace output as a json string. |
| 245 bool EndTracing(std::string* json_trace_output); |
235 | 246 |
236 protected: | 247 protected: |
237 virtual ~BrowserProxy() {} | 248 virtual ~BrowserProxy() {} |
238 private: | 249 private: |
239 DISALLOW_COPY_AND_ASSIGN(BrowserProxy); | 250 DISALLOW_COPY_AND_ASSIGN(BrowserProxy); |
240 }; | 251 }; |
241 | 252 |
242 #endif // CHROME_TEST_AUTOMATION_BROWSER_PROXY_H_ | 253 #endif // CHROME_TEST_AUTOMATION_BROWSER_PROXY_H_ |
OLD | NEW |