diff options
author | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-10 07:50:06 +0000 |
---|---|---|
committer | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-10 07:50:06 +0000 |
commit | 53a7d2d2c5965e08c0df74e349e85f38a1553a24 (patch) | |
tree | ea7947435c1e12ff2b9fe5ef1255b2fa5760e2f8 /chrome/test/ui_test_utils.cc | |
parent | 66700d449400266dbfc47c35e1e360efd57e4206 (diff) | |
download | chromium_src-53a7d2d2c5965e08c0df74e349e85f38a1553a24.zip chromium_src-53a7d2d2c5965e08c0df74e349e85f38a1553a24.tar.gz chromium_src-53a7d2d2c5965e08c0df74e349e85f38a1553a24.tar.bz2 |
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
Diffstat (limited to 'chrome/test/ui_test_utils.cc')
-rw-r--r-- | chrome/test/ui_test_utils.cc | 7 |
1 files changed, 7 insertions, 0 deletions
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<ExtensionAction> + observer(NotificationType::EXTENSION_BROWSER_ACTION_UPDATED, + browser_action); +} + void WaitForLoadStop(NavigationController* controller) { SimpleNotificationObserver<NavigationController> new_tab_observer(NotificationType::LOAD_STOP, controller); |