| 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 // server via InitializeEmbeddedTestServer(). | 165 // server via InitializeEmbeddedTestServer(). |
| 166 bool InitializeEmbeddedTestServer(); | 166 bool InitializeEmbeddedTestServer(); |
| 167 | 167 |
| 168 // Start accepting connections on the test server. Initialize the test server | 168 // Start accepting connections on the test server. Initialize the test server |
| 169 // before calling this method via InitializeEmbeddedTestServer(), or use | 169 // before calling this method via InitializeEmbeddedTestServer(), or use |
| 170 // StartEmbeddedTestServer() instead. | 170 // StartEmbeddedTestServer() instead. |
| 171 void EmbeddedTestServerAcceptConnections(); | 171 void EmbeddedTestServerAcceptConnections(); |
| 172 | 172 |
| 173 // Start the test WebSocket server, and store details of its state. Those | 173 // Start the test WebSocket server, and store details of its state. Those |
| 174 // details will be available to javascript tests using | 174 // details will be available to javascript tests using |
| 175 // chrome.test.getConfig(). | 175 // chrome.test.getConfig(). Enable HTTP basic authentication if needed. |
| 176 bool StartWebSocketServer(const base::FilePath& root_directory); | 176 bool StartWebSocketServer(const base::FilePath& root_directory, |
| 177 bool enable_basic_auth = false); |
| 177 | 178 |
| 178 // Start the test FTP server, and store details of its state. Those | 179 // Start the test FTP server, and store details of its state. Those |
| 179 // details will be available to JavaScript tests using | 180 // details will be available to JavaScript tests using |
| 180 // chrome.test.getConfig(). | 181 // chrome.test.getConfig(). |
| 181 bool StartFTPServer(const base::FilePath& root_directory); | 182 bool StartFTPServer(const base::FilePath& root_directory); |
| 182 | 183 |
| 183 // Test that exactly one extension loaded. If so, return a pointer to | 184 // Test that exactly one extension loaded. If so, return a pointer to |
| 184 // the extension. If not, return NULL and set message_. | 185 // the extension. If not, return NULL and set message_. |
| 185 const extensions::Extension* GetSingleLoadedExtension(); | 186 const extensions::Extension* GetSingleLoadedExtension(); |
| 186 | 187 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 201 std::unique_ptr<base::DictionaryValue> test_config_; | 202 std::unique_ptr<base::DictionaryValue> test_config_; |
| 202 | 203 |
| 203 // Hold the test WebSocket server. | 204 // Hold the test WebSocket server. |
| 204 std::unique_ptr<net::SpawnedTestServer> websocket_server_; | 205 std::unique_ptr<net::SpawnedTestServer> websocket_server_; |
| 205 | 206 |
| 206 // Hold the test FTP server. | 207 // Hold the test FTP server. |
| 207 std::unique_ptr<net::SpawnedTestServer> ftp_server_; | 208 std::unique_ptr<net::SpawnedTestServer> ftp_server_; |
| 208 }; | 209 }; |
| 209 | 210 |
| 210 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_APITEST_H_ | 211 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_APITEST_H_ |
| OLD | NEW |