Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(315)

Side by Side Diff: chrome/test/webdriver/webdriver_logging.h

Issue 10411031: Fixing loglevel in chrome driver to accept string rather than an integer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_WEBDRIVER_WEBDRIVER_LOGGING_H_ 5 #ifndef CHROME_TEST_WEBDRIVER_WEBDRIVER_LOGGING_H_
6 #define CHROME_TEST_WEBDRIVER_WEBDRIVER_LOGGING_H_ 6 #define CHROME_TEST_WEBDRIVER_WEBDRIVER_LOGGING_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 12 matching lines...) Expand all
23 // WebDriver logging levels. 23 // WebDriver logging levels.
24 enum LogLevel { 24 enum LogLevel {
25 kSevereLogLevel = 1000, 25 kSevereLogLevel = 1000,
26 kWarningLogLevel = 900, 26 kWarningLogLevel = 900,
27 kInfoLogLevel = 800, 27 kInfoLogLevel = 800,
28 kFineLogLevel = 500, 28 kFineLogLevel = 500,
29 kFinerLogLevel = 400, 29 kFinerLogLevel = 400,
30 kAllLogLevel = -1000 30 kAllLogLevel = -1000
31 }; 31 };
32 32
33 LogLevel LogLevelFromString(const std::string& name);
kkania 2012/05/21 17:46:46 Add a short comment here which mentions that the g
zori 2012/05/21 23:42:33 Done.
34
33 // Represents a type/source of a WebDriver log. 35 // Represents a type/source of a WebDriver log.
34 class LogType { 36 class LogType {
35 public: 37 public:
36 enum Type { 38 enum Type {
37 kInvalid = -1, 39 kInvalid = -1,
38 kDriver, 40 kDriver,
39 kNum // must be correct 41 kNum // must be correct
40 }; 42 };
41 43
42 static bool FromString(const std::string& name, LogType* log_type); 44 static bool FromString(const std::string& name, LogType* log_type);
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // Initializes logging for WebDriver. All logging below the given level 144 // Initializes logging for WebDriver. All logging below the given level
143 // will be discarded in the global file log. The file log will use the given 145 // will be discarded in the global file log. The file log will use the given
144 // log path. If the specified log path is empty, the log will write to 146 // log path. If the specified log path is empty, the log will write to
145 // 'chromedriver.log' in the current working directory, if writeable, or the 147 // 'chromedriver.log' in the current working directory, if writeable, or the
146 // system temp directory. Returns true on success. 148 // system temp directory. Returns true on success.
147 bool InitWebDriverLogging(const FilePath& log_path, LogLevel min_log_level); 149 bool InitWebDriverLogging(const FilePath& log_path, LogLevel min_log_level);
148 150
149 } // namespace webdriver 151 } // namespace webdriver
150 152
151 #endif // CHROME_TEST_WEBDRIVER_WEBDRIVER_LOGGING_H_ 153 #endif // CHROME_TEST_WEBDRIVER_WEBDRIVER_LOGGING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698