Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Unified Diff: chrome/browser/ui/views/browser_actions_container_browsertest.cc

Issue 10592022: Get rid of the multiple includes of browser_action_test_util files in browser.lib and browser_tests… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/browser_action_test_util_views.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/browser_actions_container_browsertest.cc
===================================================================
--- chrome/browser/ui/views/browser_actions_container_browsertest.cc (revision 143189)
+++ chrome/browser/ui/views/browser_actions_container_browsertest.cc (working copy)
@@ -8,8 +8,10 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/views/browser_actions_container.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension_action.h"
#include "chrome/common/extensions/extension_resource.h"
+#include "chrome/test/base/ui_test_utils.h"
using extensions::Extension;
@@ -32,7 +34,13 @@
if (!browser_actions_bar_->HasIcon(extension_index)) {
// The icon is loaded asynchronously and a notification is then sent to
// observers. So we wait on it.
- browser_actions_bar_->WaitForBrowserActionUpdated(extension_index);
+ ExtensionAction* browser_action =
+ browser_actions_bar_->GetExtensionAction(extension_index);
+
+ ui_test_utils::WindowedNotificationObserver observer(
+ chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED,
+ content::Source<ExtensionAction>(browser_action));
+ observer.Wait();
}
EXPECT_TRUE(browser_actions_bar()->HasIcon(extension_index));
}
« no previous file with comments | « chrome/browser/ui/views/browser_action_test_util_views.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698