| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_CHROMEDRIVER_LOGGING_H_ | 5 #ifndef CHROME_TEST_CHROMEDRIVER_LOGGING_H_ |
| 6 #define CHROME_TEST_CHROMEDRIVER_LOGGING_H_ | 6 #define CHROME_TEST_CHROMEDRIVER_LOGGING_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 static const size_t kMaxReturnedEntries = 100000; | 25 static const size_t kMaxReturnedEntries = 100000; |
| 26 } // namespace internal | 26 } // namespace internal |
| 27 | 27 |
| 28 // Accumulates WebDriver Logging API entries of a given type and minimum level. | 28 // Accumulates WebDriver Logging API entries of a given type and minimum level. |
| 29 // See https://code.google.com/p/selenium/wiki/Logging. | 29 // See https://code.google.com/p/selenium/wiki/Logging. |
| 30 class WebDriverLog : public Log { | 30 class WebDriverLog : public Log { |
| 31 public: | 31 public: |
| 32 static const char kBrowserType[]; | 32 static const char kBrowserType[]; |
| 33 static const char kDriverType[]; | 33 static const char kDriverType[]; |
| 34 static const char kPerformanceType[]; | 34 static const char kPerformanceType[]; |
| 35 static const char kDevToolsType[]; |
| 35 | 36 |
| 36 // Converts WD wire protocol level name -> Level, false on bad name. | 37 // Converts WD wire protocol level name -> Level, false on bad name. |
| 37 static bool NameToLevel(const std::string& name, Level* out_level); | 38 static bool NameToLevel(const std::string& name, Level* out_level); |
| 38 | 39 |
| 39 // Creates a WebDriverLog with the given type and minimum level. | 40 // Creates a WebDriverLog with the given type and minimum level. |
| 40 WebDriverLog(const std::string& type, Level min_level); | 41 WebDriverLog(const std::string& type, Level min_level); |
| 41 ~WebDriverLog() override; | 42 ~WebDriverLog() override; |
| 42 | 43 |
| 43 // Returns entries accumulated so far, as a ListValue ready for serialization | 44 // Returns entries accumulated so far, as a ListValue ready for serialization |
| 44 // into the wire protocol response to the "/log" command. | 45 // into the wire protocol response to the "/log" command. |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 // Creates |Log|s, |DevToolsEventListener|s, and |CommandListener|s based on | 85 // Creates |Log|s, |DevToolsEventListener|s, and |CommandListener|s based on |
| 85 // logging preferences. | 86 // logging preferences. |
| 86 Status CreateLogs( | 87 Status CreateLogs( |
| 87 const Capabilities& capabilities, | 88 const Capabilities& capabilities, |
| 88 const Session* session, | 89 const Session* session, |
| 89 std::vector<std::unique_ptr<WebDriverLog>>* out_logs, | 90 std::vector<std::unique_ptr<WebDriverLog>>* out_logs, |
| 90 std::vector<std::unique_ptr<DevToolsEventListener>>* out_devtools_listeners, | 91 std::vector<std::unique_ptr<DevToolsEventListener>>* out_devtools_listeners, |
| 91 std::vector<std::unique_ptr<CommandListener>>* out_command_listeners); | 92 std::vector<std::unique_ptr<CommandListener>>* out_command_listeners); |
| 92 | 93 |
| 93 #endif // CHROME_TEST_CHROMEDRIVER_LOGGING_H_ | 94 #endif // CHROME_TEST_CHROMEDRIVER_LOGGING_H_ |
| OLD | NEW |