OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <deque> | 9 #include <deque> |
10 #include <string> | 10 #include <string> |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 // Pumps the UI loop until a notification is received that an API test | 43 // Pumps the UI loop until a notification is received that an API test |
44 // succeeded or failed. Returns true if the test succeeded, false otherwise. | 44 // succeeded or failed. Returns true if the test succeeded, false otherwise. |
45 bool GetNextResult(); | 45 bool GetNextResult(); |
46 | 46 |
47 void RestrictToProfile(Profile* profile) { profile_restriction_ = profile; } | 47 void RestrictToProfile(Profile* profile) { profile_restriction_ = profile; } |
48 | 48 |
49 const std::string& message() { return message_; } | 49 const std::string& message() { return message_; } |
50 | 50 |
51 private: | 51 private: |
52 virtual void Observe(NotificationType type, | 52 virtual void Observe(int type, |
53 const NotificationSource& source, | 53 const NotificationSource& source, |
54 const NotificationDetails& details); | 54 const NotificationDetails& details); |
55 | 55 |
56 NotificationRegistrar registrar_; | 56 NotificationRegistrar registrar_; |
57 | 57 |
58 // A sequential list of pass/fail notifications from the test extension(s). | 58 // A sequential list of pass/fail notifications from the test extension(s). |
59 std::deque<bool> results_; | 59 std::deque<bool> results_; |
60 | 60 |
61 // If it failed, what was the error message? | 61 // If it failed, what was the error message? |
62 std::deque<std::string> messages_; | 62 std::deque<std::string> messages_; |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 bool enable_incognito, | 125 bool enable_incognito, |
126 bool enable_fileaccess, | 126 bool enable_fileaccess, |
127 bool load_as_component); | 127 bool load_as_component); |
128 | 128 |
129 // Hold details of the test, set in C++, which can be accessed by | 129 // Hold details of the test, set in C++, which can be accessed by |
130 // javascript using chrome.test.getConfig(). | 130 // javascript using chrome.test.getConfig(). |
131 scoped_ptr<DictionaryValue> test_config_; | 131 scoped_ptr<DictionaryValue> test_config_; |
132 }; | 132 }; |
133 | 133 |
134 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_APITEST_H_ | 134 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_APITEST_H_ |
OLD | NEW |