| 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_TEST_AUTOMATION_AUTOMATION_PROXY_H_ | 5 #ifndef CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H_ |
| 6 #define CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H_ | 6 #define CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 | 146 |
| 147 // Gets the next extension test result in |result|. Returns false if there | 147 // Gets the next extension test result in |result|. Returns false if there |
| 148 // was a problem sending the result querying RPC. | 148 // was a problem sending the result querying RPC. |
| 149 bool GetExtensionTestResult(bool* result, std::string* message); | 149 bool GetExtensionTestResult(bool* result, std::string* message); |
| 150 | 150 |
| 151 // Generic pattern for sending automation requests. | 151 // Generic pattern for sending automation requests. |
| 152 bool SendJSONRequest(const std::string& request, | 152 bool SendJSONRequest(const std::string& request, |
| 153 int timeout_ms, | 153 int timeout_ms, |
| 154 std::string* response) WARN_UNUSED_RESULT; | 154 std::string* response) WARN_UNUSED_RESULT; |
| 155 | 155 |
| 156 // Begin tracing specified categories on the browser instance. Blocks until | 156 // Begin tracing specified tag_patterns on the browser instance. Blocks until |
| 157 // browser acknowledges that tracing has begun (or failed if false is | 157 // browser acknowledges that tracing has begun (or failed if false is |
| 158 // returned). |categories| is a comma-delimited list of category wildcards. | 158 // returned). |tag_patterns| is a comma-delimited list of category tag |
| 159 // A category can have an optional '-' prefix to make it an excluded category. | 159 // wildcards. |
| 160 // Either all categories must be included or all must be excluded. | 160 // A tag pattern can have an optional '-' prefix to exclude categories that |
| 161 // contain matching tags. |
| 162 // Either all tag_patterns must be included or all must be excluded. |
| 161 // | 163 // |
| 162 // Example: BeginTracing("test_MyTest*"); | 164 // Example: BeginTracing("test_MyTest*"); |
| 163 // Example: BeginTracing("test_MyTest*,test_OtherStuff"); | 165 // Example: BeginTracing("test_MyTest*,test_OtherStuff"); |
| 164 // Example: BeginTracing("-excluded_category1,-excluded_category2"); | 166 // Example: BeginTracing("-excluded_tag1,-excluded_tag2"); |
| 165 // | 167 // |
| 166 // See base/event_trace.h for documentation of included and excluded | 168 // See base/event_trace.h for documentation of included and excluded |
| 167 // categories. | 169 // tag_patterns. |
| 168 bool BeginTracing(const std::string& categories) WARN_UNUSED_RESULT; | 170 bool BeginTracing(const std::string& tag_patterns) WARN_UNUSED_RESULT; |
| 169 | 171 |
| 170 // End trace and collect the trace output as a json string. | 172 // End trace and collect the trace output as a json string. |
| 171 bool EndTracing(std::string* json_trace_output) WARN_UNUSED_RESULT; | 173 bool EndTracing(std::string* json_trace_output) WARN_UNUSED_RESULT; |
| 172 | 174 |
| 173 IPC::SyncChannel* channel(); | 175 IPC::SyncChannel* channel(); |
| 174 | 176 |
| 175 // AutomationMessageSender implementation. | 177 // AutomationMessageSender implementation. |
| 176 virtual bool Send(IPC::Message* message) WARN_UNUSED_RESULT; | 178 virtual bool Send(IPC::Message* message) WARN_UNUSED_RESULT; |
| 177 virtual bool Send(IPC::Message* message, int timeout_ms) WARN_UNUSED_RESULT; | 179 virtual bool Send(IPC::Message* message, int timeout_ms) WARN_UNUSED_RESULT; |
| 178 | 180 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 | 261 |
| 260 // Delay to let the browser execute the command. | 262 // Delay to let the browser execute the command. |
| 261 base::TimeDelta action_timeout_; | 263 base::TimeDelta action_timeout_; |
| 262 | 264 |
| 263 base::PlatformThreadId listener_thread_id_; | 265 base::PlatformThreadId listener_thread_id_; |
| 264 | 266 |
| 265 DISALLOW_COPY_AND_ASSIGN(AutomationProxy); | 267 DISALLOW_COPY_AND_ASSIGN(AutomationProxy); |
| 266 }; | 268 }; |
| 267 | 269 |
| 268 #endif // CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H_ | 270 #endif // CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H_ |
| OLD | NEW |