OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_CAPABILITIES_PARSER_H_ | 5 #ifndef CHROME_TEST_WEBDRIVER_WEBDRIVER_CAPABILITIES_PARSER_H_ |
6 #define CHROME_TEST_WEBDRIVER_WEBDRIVER_CAPABILITIES_PARSER_H_ | 6 #define CHROME_TEST_WEBDRIVER_WEBDRIVER_CAPABILITIES_PARSER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 // List of paths for extensions to install on startup. | 42 // List of paths for extensions to install on startup. |
43 std::vector<FilePath> extensions; | 43 std::vector<FilePath> extensions; |
44 | 44 |
45 // Whether Chrome should not block when loading. | 45 // Whether Chrome should not block when loading. |
46 bool load_async; | 46 bool load_async; |
47 | 47 |
48 // Whether Chrome should simulate input events using OS APIs instead of | 48 // Whether Chrome should simulate input events using OS APIs instead of |
49 // WebKit APIs. | 49 // WebKit APIs. |
50 bool native_events; | 50 bool native_events; |
51 | 51 |
| 52 // By default, ChromeDriver configures Chrome in such a way as convenient |
| 53 // for website testing. E.g., it configures Chrome so that sites are allowed |
| 54 // to use the geolocation API without requesting the user's consent. |
| 55 // If this is set to true, ChromeDriver will not modify Chrome's default |
| 56 // behavior. |
| 57 bool no_website_testing_defaults; |
| 58 |
52 // Path to a custom profile to use. | 59 // Path to a custom profile to use. |
53 FilePath profile; | 60 FilePath profile; |
54 | 61 |
55 // Whether ChromeDriver should log verbosely. | 62 // Whether ChromeDriver should log verbosely. |
56 bool verbose; | 63 bool verbose; |
57 }; | 64 }; |
58 | 65 |
59 // Parses the given capabilities dictionary to produce a |Capabilities| | 66 // Parses the given capabilities dictionary to produce a |Capabilities| |
60 // instance. | 67 // instance. |
61 // See webdriver's desired capabilities for more info. | 68 // See webdriver's desired capabilities for more info. |
(...skipping 14 matching lines...) Expand all Loading... |
76 | 83 |
77 private: | 84 private: |
78 Error* ParseArgs(const base::Value* option); | 85 Error* ParseArgs(const base::Value* option); |
79 Error* ParseBinary(const base::Value* option); | 86 Error* ParseBinary(const base::Value* option); |
80 Error* ParseChannel(const base::Value* option); | 87 Error* ParseChannel(const base::Value* option); |
81 Error* ParseDetach(const base::Value* option); | 88 Error* ParseDetach(const base::Value* option); |
82 Error* ParseExtensions(const base::Value* option); | 89 Error* ParseExtensions(const base::Value* option); |
83 Error* ParseLoadAsync(const base::Value* option); | 90 Error* ParseLoadAsync(const base::Value* option); |
84 Error* ParseNativeEvents(const base::Value* option); | 91 Error* ParseNativeEvents(const base::Value* option); |
85 Error* ParseProfile(const base::Value* option); | 92 Error* ParseProfile(const base::Value* option); |
| 93 Error* ParseNoWebsiteTestingDefaults(const base::Value* option); |
86 Error* ParseVerbose(const base::Value* option); | 94 Error* ParseVerbose(const base::Value* option); |
87 // Decodes the given base64-encoded string, optionally unzips it, and | 95 // Decodes the given base64-encoded string, optionally unzips it, and |
88 // writes the result to |path|. | 96 // writes the result to |path|. |
89 // On error, false will be returned and |error_msg| will be set. | 97 // On error, false will be returned and |error_msg| will be set. |
90 bool DecodeAndWriteFile(const FilePath& path, | 98 bool DecodeAndWriteFile(const FilePath& path, |
91 const std::string& base64, | 99 const std::string& base64, |
92 bool unzip, | 100 bool unzip, |
93 std::string* error_msg); | 101 std::string* error_msg); |
94 | 102 |
95 // The capabilities dictionary to parse. | 103 // The capabilities dictionary to parse. |
96 const base::DictionaryValue* dict_; | 104 const base::DictionaryValue* dict_; |
97 | 105 |
98 // The root directory under which to write all files. | 106 // The root directory under which to write all files. |
99 const FilePath root_; | 107 const FilePath root_; |
100 | 108 |
101 // A pointer to the capabilities to modify while parsing. | 109 // A pointer to the capabilities to modify while parsing. |
102 Capabilities* caps_; | 110 Capabilities* caps_; |
103 | 111 |
104 DISALLOW_COPY_AND_ASSIGN(CapabilitiesParser); | 112 DISALLOW_COPY_AND_ASSIGN(CapabilitiesParser); |
105 }; | 113 }; |
106 | 114 |
107 } // namespace webdriver | 115 } // namespace webdriver |
108 | 116 |
109 #endif // CHROME_TEST_WEBDRIVER_WEBDRIVER_CAPABILITIES_PARSER_H_ | 117 #endif // CHROME_TEST_WEBDRIVER_WEBDRIVER_CAPABILITIES_PARSER_H_ |
OLD | NEW |