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/browser/extensions/browser_action_test_util.h | |
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/browser/extensions/browser_action_test_util.h')
-rw-r--r-- | chrome/browser/extensions/browser_action_test_util.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/browser/extensions/browser_action_test_util.h b/chrome/browser/extensions/browser_action_test_util.h index df3e2cf..ab04013 100644 --- a/chrome/browser/extensions/browser_action_test_util.h +++ b/chrome/browser/extensions/browser_action_test_util.h @@ -24,7 +24,12 @@ class BrowserActionTestUtil { // Returns the number of browser action currently visible. int VisibleBrowserActions(); - // Returns whether the browser action at |index| has a non-null icon. + // Waits for a browser action at |index| to get updated. + void WaitForBrowserActionUpdated(int index); + + // Returns whether the browser action at |index| has a non-null icon. Note + // that the icon is loaded asynchronously, in which case you can wait for it + // to load by calling WaitForBrowserActionUpdated. bool HasIcon(int index); // Simulates a user click on the browser action button at |index|. |