From 53a7d2d2c5965e08c0df74e349e85f38a1553a24 Mon Sep 17 00:00:00 2001 From: "finnur@chromium.org" Date: Wed, 10 Mar 2010 07:50:06 +0000 Subject: Icons are loaded asynchronously for browser actions, so the test must wait on the extension being updated if no icon is found. I think this should fix the flakiness in the test. BUG=None TEST=Fixing a browser test (hopefully). Review URL: http://codereview.chromium.org/772001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41144 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/test/ui_test_utils.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'chrome/test/ui_test_utils.cc') diff --git a/chrome/test/ui_test_utils.cc b/chrome/test/ui_test_utils.cc index fb1ec65..4ea680f 100644 --- a/chrome/test/ui_test_utils.cc +++ b/chrome/test/ui_test_utils.cc @@ -22,6 +22,7 @@ #include "chrome/browser/tab_contents/navigation_entry.h" #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/common/chrome_paths.h" +#include "chrome/common/extensions/extension_action.h" #include "chrome/common/notification_registrar.h" #include "chrome/common/notification_service.h" #if defined(TOOLKIT_VIEWS) @@ -419,6 +420,12 @@ void WaitForTabParented() { TabParentedNotificationObserver new_tab_observer; } +void WaitForBrowserActionUpdated(ExtensionAction* browser_action) { + SimpleNotificationObserver + observer(NotificationType::EXTENSION_BROWSER_ACTION_UPDATED, + browser_action); +} + void WaitForLoadStop(NavigationController* controller) { SimpleNotificationObserver new_tab_observer(NotificationType::LOAD_STOP, controller); -- cgit v1.1