| 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 bool RunExtensionSubtest(const char* extension_name, | 141 bool RunExtensionSubtest(const char* extension_name, |
| 142 const std::string& page_url, | 142 const std::string& page_url, |
| 143 int flags); | 143 int flags); |
| 144 | 144 |
| 145 // Load |page_url| and wait for pass / fail notification from the extension | 145 // Load |page_url| and wait for pass / fail notification from the extension |
| 146 // API on the page. | 146 // API on the page. |
| 147 bool RunPageTest(const std::string& page_url); | 147 bool RunPageTest(const std::string& page_url); |
| 148 bool RunPageTest(const std::string& page_url, int flags); | 148 bool RunPageTest(const std::string& page_url, int flags); |
| 149 | 149 |
| 150 // Similar to RunExtensionTest, except used for running tests in platform app | 150 // Similar to RunExtensionTest, except used for running tests in platform app |
| 151 // shell windows. After running the test will close all shell windows and wait | 151 // shell windows. |
| 152 // for the background page to be unloaded. | |
| 153 bool RunPlatformAppTest(const char* extension_name); | 152 bool RunPlatformAppTest(const char* extension_name); |
| 154 | 153 |
| 155 // Similar to RunPlatformAppTest, except after running the test returns | |
| 156 // without closing shell windows or waiting for the background page to be | |
| 157 // unloaded. | |
| 158 bool RunPlatformAppTestReturnImmediately(const char* extension_name); | |
| 159 | |
| 160 // Start the test server, and store details of its state. Those details | 154 // Start the test server, and store details of its state. Those details |
| 161 // will be available to javascript tests using chrome.test.getConfig(). | 155 // will be available to javascript tests using chrome.test.getConfig(). |
| 162 bool StartTestServer(); | 156 bool StartTestServer(); |
| 163 | 157 |
| 164 // Start the test WebSocket server, and store details of its state. Those | 158 // Start the test WebSocket server, and store details of its state. Those |
| 165 // details will be available to javascript tests using | 159 // details will be available to javascript tests using |
| 166 // chrome.test.getConfig(). | 160 // chrome.test.getConfig(). |
| 167 bool StartWebSocketServer(const FilePath& root_directory); | 161 bool StartWebSocketServer(const FilePath& root_directory); |
| 168 | 162 |
| 169 // Test that exactly one extension loaded. If so, return a pointer to | 163 // Test that exactly one extension loaded. If so, return a pointer to |
| (...skipping 13 matching lines...) Expand all Loading... |
| 183 | 177 |
| 184 // Hold details of the test, set in C++, which can be accessed by | 178 // Hold details of the test, set in C++, which can be accessed by |
| 185 // javascript using chrome.test.getConfig(). | 179 // javascript using chrome.test.getConfig(). |
| 186 scoped_ptr<DictionaryValue> test_config_; | 180 scoped_ptr<DictionaryValue> test_config_; |
| 187 | 181 |
| 188 // Hold the test WebSocket server. | 182 // Hold the test WebSocket server. |
| 189 scoped_ptr<net::TestServer> websocket_server_; | 183 scoped_ptr<net::TestServer> websocket_server_; |
| 190 }; | 184 }; |
| 191 | 185 |
| 192 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_APITEST_H_ | 186 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_APITEST_H_ |
| OLD | NEW |