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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 62 |
63 ExtensionApiTest(); | 63 ExtensionApiTest(); |
64 virtual ~ExtensionApiTest(); | 64 virtual ~ExtensionApiTest(); |
65 | 65 |
66 protected: | 66 protected: |
67 // Helper class that observes tests failing or passing. Observation starts | 67 // Helper class that observes tests failing or passing. Observation starts |
68 // when the class is constructed. Get the next result by calling | 68 // when the class is constructed. Get the next result by calling |
69 // GetNextResult() and message() if GetNextResult() return false. If there | 69 // GetNextResult() and message() if GetNextResult() return false. If there |
70 // are no results, this method will pump the UI message loop until one is | 70 // are no results, this method will pump the UI message loop until one is |
71 // received. | 71 // received. |
| 72 // DEPRECATED: Use extensions/test/result_catcher.h instead. |
72 class ResultCatcher : public content::NotificationObserver { | 73 class ResultCatcher : public content::NotificationObserver { |
73 public: | 74 public: |
74 ResultCatcher(); | 75 ResultCatcher(); |
75 virtual ~ResultCatcher(); | 76 virtual ~ResultCatcher(); |
76 | 77 |
77 // Pumps the UI loop until a notification is received that an API test | 78 // Pumps the UI loop until a notification is received that an API test |
78 // succeeded or failed. Returns true if the test succeeded, false otherwise. | 79 // succeeded or failed. Returns true if the test succeeded, false otherwise. |
79 bool GetNextResult(); | 80 bool GetNextResult(); |
80 | 81 |
81 void RestrictToProfile(Profile* profile) { profile_restriction_ = profile; } | 82 void RestrictToProfile(Profile* profile) { profile_restriction_ = profile; } |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 scoped_ptr<base::DictionaryValue> test_config_; | 205 scoped_ptr<base::DictionaryValue> test_config_; |
205 | 206 |
206 // Hold the test WebSocket server. | 207 // Hold the test WebSocket server. |
207 scoped_ptr<net::SpawnedTestServer> websocket_server_; | 208 scoped_ptr<net::SpawnedTestServer> websocket_server_; |
208 | 209 |
209 // Hold the test FTP server. | 210 // Hold the test FTP server. |
210 scoped_ptr<net::SpawnedTestServer> ftp_server_; | 211 scoped_ptr<net::SpawnedTestServer> ftp_server_; |
211 }; | 212 }; |
212 | 213 |
213 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_APITEST_H_ | 214 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_APITEST_H_ |
OLD | NEW |