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 CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_TEST_NOTIFICATION_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_TEST_NOTIFICATION_OBSERVER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_TEST_NOTIFICATION_OBSERVER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_TEST_NOTIFICATION_OBSERVER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 public ExtensionActionAPI::Observer { | 25 public ExtensionActionAPI::Observer { |
26 public: | 26 public: |
27 explicit ChromeExtensionTestNotificationObserver(Browser* browser); | 27 explicit ChromeExtensionTestNotificationObserver(Browser* browser); |
28 explicit ChromeExtensionTestNotificationObserver( | 28 explicit ChromeExtensionTestNotificationObserver( |
29 content::BrowserContext* browser_context); | 29 content::BrowserContext* browser_context); |
30 ~ChromeExtensionTestNotificationObserver() override; | 30 ~ChromeExtensionTestNotificationObserver() override; |
31 | 31 |
32 // Waits for the number of visible page actions to change to |count|. | 32 // Waits for the number of visible page actions to change to |count|. |
33 bool WaitForPageActionVisibilityChangeTo(int count); | 33 bool WaitForPageActionVisibilityChangeTo(int count); |
34 | 34 |
35 // Waits until an extension is loaded and all view have loaded. | |
36 void WaitForExtensionAndViewLoad(); | |
37 | |
38 // Waits for all extension views to load. | 35 // Waits for all extension views to load. |
39 bool WaitForExtensionViewsToLoad(); | 36 bool WaitForExtensionViewsToLoad(); |
40 | 37 |
41 // Waits for extension to be idle. | 38 // Waits for extension to be idle. |
42 bool WaitForExtensionIdle(const std::string& extension_id); | 39 bool WaitForExtensionIdle(const std::string& extension_id); |
43 | 40 |
44 // Waits for extension to be not idle. | 41 // Waits for extension to be not idle. |
45 bool WaitForExtensionNotIdle(const std::string& extension_id); | 42 bool WaitForExtensionNotIdle(const std::string& extension_id); |
46 | 43 |
47 private: | 44 private: |
48 content::BrowserContext* GetBrowserContext(); | 45 content::BrowserContext* GetBrowserContext(); |
49 | 46 |
50 // ExtensionActionAPI::Observer: | 47 // ExtensionActionAPI::Observer: |
51 void OnPageActionsUpdated(content::WebContents* contents) override; | 48 void OnPageActionsUpdated(content::WebContents* contents) override; |
52 | 49 |
53 Browser* browser_; | 50 Browser* browser_; |
54 | 51 |
55 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionTestNotificationObserver); | 52 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionTestNotificationObserver); |
56 }; | 53 }; |
57 | 54 |
58 } // namespace extensions | 55 } // namespace extensions |
59 | 56 |
60 #endif // CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_TEST_NOTIFICATION_OBSERVER
_H_ | 57 #endif // CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_TEST_NOTIFICATION_OBSERVER
_H_ |
OLD | NEW |