OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 EXTENSIONS_TEST_EXTENSION_TEST_NOTIFICATION_OBSERVER_H_ | 5 #ifndef EXTENSIONS_TEST_EXTENSION_TEST_NOTIFICATION_OBSERVER_H_ |
6 #define EXTENSIONS_TEST_EXTENSION_TEST_NOTIFICATION_OBSERVER_H_ | 6 #define EXTENSIONS_TEST_EXTENSION_TEST_NOTIFICATION_OBSERVER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 void WaitForExtensionLoad(); | 39 void WaitForExtensionLoad(); |
40 | 40 |
41 // Waits for an extension load error. Returns true if the error really | 41 // Waits for an extension load error. Returns true if the error really |
42 // happened. | 42 // happened. |
43 bool WaitForExtensionLoadError(); | 43 bool WaitForExtensionLoadError(); |
44 | 44 |
45 // Wait for the specified extension to crash. Returns true if it really | 45 // Wait for the specified extension to crash. Returns true if it really |
46 // crashed. | 46 // crashed. |
47 bool WaitForExtensionCrash(const std::string& extension_id); | 47 bool WaitForExtensionCrash(const std::string& extension_id); |
48 | 48 |
49 // Wait for the crx installer to be done. Returns true if it really is done. | 49 // Wait for the crx installer to be done. Returns true if it has finished |
| 50 // successfully. |
50 bool WaitForCrxInstallerDone(); | 51 bool WaitForCrxInstallerDone(); |
51 | 52 |
52 // Watch for the given event type from the given source. | 53 // Watch for the given event type from the given source. |
53 // After calling this method, call Wait() to ensure that RunMessageLoop() is | 54 // After calling this method, call Wait() to ensure that RunMessageLoop() is |
54 // called appropriately and cleanup is performed. | 55 // called appropriately and cleanup is performed. |
55 void Watch(int type, const content::NotificationSource& source); | 56 void Watch(int type, const content::NotificationSource& source); |
56 | 57 |
57 // After registering one or more event types with Watch(), call | 58 // After registering one or more event types with Watch(), call |
58 // this method to run the message loop and perform cleanup. | 59 // this method to run the message loop and perform cleanup. |
59 void Wait(); | 60 void Wait(); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 | 135 |
135 // The closure to quit the currently-running message loop. | 136 // The closure to quit the currently-running message loop. |
136 base::Closure quit_closure_; | 137 base::Closure quit_closure_; |
137 | 138 |
138 DISALLOW_COPY_AND_ASSIGN(ExtensionTestNotificationObserver); | 139 DISALLOW_COPY_AND_ASSIGN(ExtensionTestNotificationObserver); |
139 }; | 140 }; |
140 | 141 |
141 } // namespace extensions | 142 } // namespace extensions |
142 | 143 |
143 #endif // EXTENSIONS_TEST_EXTENSION_TEST_NOTIFICATION_OBSERVER_H_ | 144 #endif // EXTENSIONS_TEST_EXTENSION_TEST_NOTIFICATION_OBSERVER_H_ |
OLD | NEW |