OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_TEST_CHROMEDRIVER_CHROMEDRIVER_H_ | |
6 #define CHROME_TEST_CHROMEDRIVER_CHROMEDRIVER_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "base/memory/scoped_ptr.h" | |
11 | |
12 class CommandExecutor; | |
13 | |
14 // Inits the command executor. Must be called before |ExecuteCommand|. | |
15 // This may be called during DLL load on Windows. | |
16 void Init(scoped_ptr<CommandExecutor> executor); | |
17 | |
18 // Synchronously executes the given command. Thread safe. | |
19 // Command must be a JSON object: | |
20 // { | |
21 // "name": <string>, | |
22 // "parameters": <dictionary>, | |
23 // "sessionId": <string> | |
24 // } | |
25 // Response will always be a JSON object: | |
26 // { | |
27 // "status": <integer>, | |
28 // "value": <object>, | |
29 // "sessionId": <string> | |
30 // } | |
31 // If "status" is non-zero, "value" will be an object with a string "message" | |
32 // property which signifies the error message. | |
33 void ExecuteCommand(const std::string& command, std::string* response); | |
34 | |
35 // Shuts down the command executor. No commands must be currently executing. | |
36 void Shutdown(); | |
37 | |
38 #endif // CHROME_TEST_CHROMEDRIVER_CHROMEDRIVER_H_ | |
OLD | NEW |