OLD | NEW |
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_BROWSER_EXTENSIONS_EXTENSION_APITEST_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_APITEST_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_APITEST_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_APITEST_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 // Similar to RunExtensionTest, except used for running tests in platform app | 151 // Similar to RunExtensionTest, except used for running tests in platform app |
152 // shell windows. | 152 // shell windows. |
153 bool RunPlatformAppTest(const char* extension_name); | 153 bool RunPlatformAppTest(const char* extension_name); |
154 // Similar to RunPlatformAppTest, except sets an additional string argument | 154 // Similar to RunPlatformAppTest, except sets an additional string argument |
155 // |customArg| to the test config object. | 155 // |customArg| to the test config object. |
156 bool RunPlatformAppTestWithArg( | 156 bool RunPlatformAppTestWithArg( |
157 const char* extension_name, const char* custom_arg); | 157 const char* extension_name, const char* custom_arg); |
158 | 158 |
159 // Start the test server, and store details of its state. Those details | 159 // Start the test server, and store details of its state. Those details |
160 // will be available to javascript tests using chrome.test.getConfig(). | 160 // will be available to javascript tests using chrome.test.getConfig(). |
161 bool StartTestServer(); | 161 bool StartEmbeddedTestServer(); |
162 | 162 |
163 // Start the test WebSocket server, and store details of its state. Those | 163 // Start the test WebSocket server, and store details of its state. Those |
164 // details will be available to javascript tests using | 164 // details will be available to javascript tests using |
165 // chrome.test.getConfig(). | 165 // chrome.test.getConfig(). |
166 bool StartWebSocketServer(const base::FilePath& root_directory); | 166 bool StartWebSocketServer(const base::FilePath& root_directory); |
167 | 167 |
168 // Test that exactly one extension loaded. If so, return a pointer to | 168 // Test that exactly one extension loaded. If so, return a pointer to |
169 // the extension. If not, return NULL and set message_. | 169 // the extension. If not, return NULL and set message_. |
170 const extensions::Extension* GetSingleLoadedExtension(); | 170 const extensions::Extension* GetSingleLoadedExtension(); |
171 | 171 |
(...skipping 11 matching lines...) Expand all Loading... |
183 | 183 |
184 // Hold details of the test, set in C++, which can be accessed by | 184 // Hold details of the test, set in C++, which can be accessed by |
185 // javascript using chrome.test.getConfig(). | 185 // javascript using chrome.test.getConfig(). |
186 scoped_ptr<DictionaryValue> test_config_; | 186 scoped_ptr<DictionaryValue> test_config_; |
187 | 187 |
188 // Hold the test WebSocket server. | 188 // Hold the test WebSocket server. |
189 scoped_ptr<net::SpawnedTestServer> websocket_server_; | 189 scoped_ptr<net::SpawnedTestServer> websocket_server_; |
190 }; | 190 }; |
191 | 191 |
192 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_APITEST_H_ | 192 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_APITEST_H_ |
OLD | NEW |