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

Side by Side Diff: chrome/browser/extensions/extension_apitest.h

Issue 166793003: Allow FTP requests by Chromium extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 9 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
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_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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 166
167 // Start the test server, and store details of its state. Those details 167 // Start the test server, and store details of its state. Those details
168 // will be available to javascript tests using chrome.test.getConfig(). 168 // will be available to javascript tests using chrome.test.getConfig().
169 bool StartEmbeddedTestServer(); 169 bool StartEmbeddedTestServer();
170 170
171 // Start the test WebSocket server, and store details of its state. Those 171 // Start the test WebSocket server, and store details of its state. Those
172 // details will be available to javascript tests using 172 // details will be available to javascript tests using
173 // chrome.test.getConfig(). 173 // chrome.test.getConfig().
174 bool StartWebSocketServer(const base::FilePath& root_directory); 174 bool StartWebSocketServer(const base::FilePath& root_directory);
175 175
176 // Start the test FTP server, and store details of its state. Those
177 // details will be available to JavaScript tests using
178 // chrome.test.getConfig().
179 bool StartFTPServer(const base::FilePath& root_directory);
180
176 // Start the spawned test server, and store details of its state. Those 181 // Start the spawned test server, and store details of its state. Those
177 // details will be available to javascript tests using 182 // details will be available to javascript tests using
178 // chrome.test.getConfig(). 183 // chrome.test.getConfig().
179 bool StartSpawnedTestServer(); 184 bool StartSpawnedTestServer();
180 185
181 // Test that exactly one extension loaded. If so, return a pointer to 186 // Test that exactly one extension loaded. If so, return a pointer to
182 // the extension. If not, return NULL and set message_. 187 // the extension. If not, return NULL and set message_.
183 const extensions::Extension* GetSingleLoadedExtension(); 188 const extensions::Extension* GetSingleLoadedExtension();
184 189
185 // All extensions tested by ExtensionApiTest are in the "api_test" dir. 190 // All extensions tested by ExtensionApiTest are in the "api_test" dir.
186 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; 191 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE;
187 192
188 // If it failed, what was the error message? 193 // If it failed, what was the error message?
189 std::string message_; 194 std::string message_;
190 195
191 private: 196 private:
192 bool RunExtensionTestImpl(const std::string& extension_name, 197 bool RunExtensionTestImpl(const std::string& extension_name,
193 const std::string& test_page, 198 const std::string& test_page,
194 const char* custom_arg, 199 const char* custom_arg,
195 int flags); 200 int flags);
196 201
197 // Hold details of the test, set in C++, which can be accessed by 202 // Hold details of the test, set in C++, which can be accessed by
198 // javascript using chrome.test.getConfig(). 203 // javascript using chrome.test.getConfig().
199 scoped_ptr<base::DictionaryValue> test_config_; 204 scoped_ptr<base::DictionaryValue> test_config_;
200 205
201 // Hold the test WebSocket server. 206 // Hold the test WebSocket server.
202 scoped_ptr<net::SpawnedTestServer> websocket_server_; 207 scoped_ptr<net::SpawnedTestServer> websocket_server_;
208
209 // Hold the test FTP server.
210 scoped_ptr<net::SpawnedTestServer> ftp_server_;
203 }; 211 };
204 212
205 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_APITEST_H_ 213 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_APITEST_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/cross_origin_xhr_apitest.cc ('k') | chrome/browser/extensions/extension_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698