| 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_CAPABILITIES_H_ | 5 #ifndef CHROME_TEST_CHROMEDRIVER_CAPABILITIES_H_ |
| 6 #define CHROME_TEST_CHROMEDRIVER_CAPABILITIES_H_ | 6 #define CHROME_TEST_CHROMEDRIVER_CAPABILITIES_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 void AppendToCommandLine(base::CommandLine* command) const; | 53 void AppendToCommandLine(base::CommandLine* command) const; |
| 54 std::string ToString() const; | 54 std::string ToString() const; |
| 55 | 55 |
| 56 private: | 56 private: |
| 57 typedef std::map<std::string, NativeString> SwitchMap; | 57 typedef std::map<std::string, NativeString> SwitchMap; |
| 58 SwitchMap switch_map_; | 58 SwitchMap switch_map_; |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 typedef std::map<std::string, Log::Level> LoggingPrefs; | 61 typedef std::map<std::string, Log::Level> LoggingPrefs; |
| 62 | 62 |
| 63 struct PerfLoggingPrefs { |
| 64 PerfLoggingPrefs(); |
| 65 ~PerfLoggingPrefs(); |
| 66 |
| 67 // We must distinguish between a log domain being set by default and being |
| 68 // explicitly set. Otherwise, |PerformanceLogger| could only handle 3 of 4 |
| 69 // possible combinations (tracing enabled/disabled + Timeline on/off). |
| 70 enum InspectorDomainStatus { |
| 71 kDefaultEnabled, |
| 72 kDefaultDisabled, |
| 73 kExplicitlyEnabled, |
| 74 kExplicitlyDisabled |
| 75 }; |
| 76 |
| 77 InspectorDomainStatus network; |
| 78 InspectorDomainStatus page; |
| 79 InspectorDomainStatus timeline; |
| 80 |
| 81 std::string trace_categories; // Non-empty string enables tracing. |
| 82 }; |
| 83 |
| 63 struct Capabilities { | 84 struct Capabilities { |
| 64 Capabilities(); | 85 Capabilities(); |
| 65 ~Capabilities(); | 86 ~Capabilities(); |
| 66 | 87 |
| 67 // Return true if remote host:port session is to be used. | 88 // Return true if remote host:port session is to be used. |
| 68 bool IsRemoteBrowser() const; | 89 bool IsRemoteBrowser() const; |
| 69 | 90 |
| 70 // Return true if android package is specified. | 91 // Return true if android package is specified. |
| 71 bool IsAndroid() const; | 92 bool IsAndroid() const; |
| 72 | 93 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 128 |
| 108 scoped_ptr<base::DictionaryValue> local_state; | 129 scoped_ptr<base::DictionaryValue> local_state; |
| 109 | 130 |
| 110 std::string log_path; | 131 std::string log_path; |
| 111 | 132 |
| 112 LoggingPrefs logging_prefs; | 133 LoggingPrefs logging_prefs; |
| 113 | 134 |
| 114 // If set, enable minidump for chrome crashes and save to this directory. | 135 // If set, enable minidump for chrome crashes and save to this directory. |
| 115 std::string minidump_path; | 136 std::string minidump_path; |
| 116 | 137 |
| 138 PerfLoggingPrefs perf_logging_prefs; |
| 139 |
| 117 scoped_ptr<base::DictionaryValue> prefs; | 140 scoped_ptr<base::DictionaryValue> prefs; |
| 118 | 141 |
| 119 Switches switches; | 142 Switches switches; |
| 120 }; | 143 }; |
| 121 | 144 |
| 122 #endif // CHROME_TEST_CHROMEDRIVER_CAPABILITIES_H_ | 145 #endif // CHROME_TEST_CHROMEDRIVER_CAPABILITIES_H_ |
| OLD | NEW |