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 #include <chrome/browser/extensions/chrome_extension_test_notification_observer.
h> | 5 #include <chrome/browser/extensions/chrome_extension_test_notification_observer.
h> |
6 #include "base/scoped_observer.h" | 6 #include "base/scoped_observer.h" |
7 #include "chrome/browser/extensions/extension_action_test_util.h" | 7 #include "chrome/browser/extensions/extension_action_test_util.h" |
8 #include "chrome/browser/extensions/extension_util.h" | 8 #include "chrome/browser/extensions/extension_util.h" |
9 #include "chrome/browser/profiles/profile_manager.h" | 9 #include "chrome/browser/profiles/profile_manager.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 WaitForCondition(base::Bind( | 108 WaitForCondition(base::Bind( |
109 [](const std::string& extension_id, | 109 [](const std::string& extension_id, |
110 content::BrowserContext* context) -> bool { | 110 content::BrowserContext* context) -> bool { |
111 return !util::IsExtensionIdle(extension_id, context); | 111 return !util::IsExtensionIdle(extension_id, context); |
112 }, | 112 }, |
113 extension_id, GetBrowserContext()), | 113 extension_id, GetBrowserContext()), |
114 ¬ification_set); | 114 ¬ification_set); |
115 return true; | 115 return true; |
116 } | 116 } |
117 | 117 |
118 void ChromeExtensionTestNotificationObserver::WaitForExtensionAndViewLoad() { | |
119 WaitForExtensionLoad(); | |
120 WaitForExtensionViewsToLoad(); | |
121 } | |
122 | |
123 void ChromeExtensionTestNotificationObserver::OnPageActionsUpdated( | 118 void ChromeExtensionTestNotificationObserver::OnPageActionsUpdated( |
124 content::WebContents* web_contents) { | 119 content::WebContents* web_contents) { |
125 MaybeQuit(); | 120 MaybeQuit(); |
126 } | 121 } |
127 | 122 |
128 } // namespace extensions | 123 } // namespace extensions |
OLD | NEW |