diff options
author | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-12 21:44:45 +0000 |
---|---|---|
committer | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-12 21:44:45 +0000 |
commit | 7d9ad0b30c0775a7345e965294c9f86bb0d543e5 (patch) | |
tree | 8b5d69fbff00af703b0d330ffe5ca719db9696e5 /chrome/browser/extensions/browser_action_test_util.h | |
parent | 60050d0da7ca869e9c5ffe887cc2c51bc4b51deb (diff) | |
download | chromium_src-7d9ad0b30c0775a7345e965294c9f86bb0d543e5.zip chromium_src-7d9ad0b30c0775a7345e965294c9f86bb0d543e5.tar.gz chromium_src-7d9ad0b30c0775a7345e965294c9f86bb0d543e5.tar.bz2 |
Browser Action Container should not shrink when visible extension is disabled.
We now calculate the visible actions before removing them from the vector
so we can maintain the same number after deletion occurs.
Also added unit tests and fixed a bug in GetTooltip where we were hard-coding
the index to be 0.
BUG=35349
TEST=Covered by new unit test.
Review URL: http://codereview.chromium.org/606008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38959 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 | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/chrome/browser/extensions/browser_action_test_util.h b/chrome/browser/extensions/browser_action_test_util.h index 6af89b4..df3e2cf 100644 --- a/chrome/browser/extensions/browser_action_test_util.h +++ b/chrome/browser/extensions/browser_action_test_util.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -21,12 +21,18 @@ class BrowserActionTestUtil { // Returns the number of browser action buttons in the window toolbar. int NumberOfBrowserActions(); + // Returns the number of browser action currently visible. + int VisibleBrowserActions(); + // Returns whether the browser action at |index| has a non-null icon. bool HasIcon(int index); // Simulates a user click on the browser action button at |index|. void Press(int index); + // Returns the extension id of the extension at |index|. + std::string GetExtensionId(int index); + // Returns the current tooltip for the browser action button. std::string GetTooltip(int index); @@ -39,6 +45,9 @@ class BrowserActionTestUtil { // Hides the given popup and returns whether the hide was successful. bool HidePopup(); + // Set how many icons should be visible. + void SetIconVisibilityCount(size_t icons); + // Returns the minimum allowed size of an extension popup. static gfx::Size GetMinPopupSize(); |