summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/toolbar_controller_unittest.mm
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-11 02:13:45 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-11 02:13:45 +0000
commit943d8120c51e2ed0146d85a15298d7fa30f316e0 (patch)
tree74d94e42c0590d308074ad8262cbf36656b2e708 /chrome/browser/cocoa/toolbar_controller_unittest.mm
parent8e0049d83d792dec1d2981d4f95369ca8a7b0558 (diff)
downloadchromium_src-943d8120c51e2ed0146d85a15298d7fa30f316e0.zip
chromium_src-943d8120c51e2ed0146d85a15298d7fa30f316e0.tar.gz
chromium_src-943d8120c51e2ed0146d85a15298d7fa30f316e0.tar.bz2
Detach reload from omnibox, combine with stop, and eliminate go.
This does the basic surgery on all three OSes without trying to fix up the visual appearance. As a result, things look pretty ugly. My intent is to at least put endcaps on the omnibox in a subsequent patch. BUG=45745,45762,45763 TEST=Reload and stop should be combined; go should be gone. Review URL: http://codereview.chromium.org/2677003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49492 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/toolbar_controller_unittest.mm')
-rw-r--r--chrome/browser/cocoa/toolbar_controller_unittest.mm20
1 files changed, 8 insertions, 12 deletions
diff --git a/chrome/browser/cocoa/toolbar_controller_unittest.mm b/chrome/browser/cocoa/toolbar_controller_unittest.mm
index b02ec0f..b892759 100644
--- a/chrome/browser/cocoa/toolbar_controller_unittest.mm
+++ b/chrome/browser/cocoa/toolbar_controller_unittest.mm
@@ -43,9 +43,8 @@ class ToolbarControllerTest : public CocoaTest {
// Indexes that match the ordering returned by the private ToolbarController
// |-toolbarViews| method.
enum {
- kBackIndex, kForwardIndex, kReloadIndex, kHomeIndex, kGoIndex,
- kPageIndex, kWrenchIndex, kLocationIndex,
- kBrowserActionContainerViewIndex
+ kBackIndex, kForwardIndex, kReloadIndex, kHomeIndex, kPageIndex,
+ kWrenchIndex, kLocationIndex, kBrowserActionContainerViewIndex
};
ToolbarControllerTest() {
@@ -151,14 +150,14 @@ TEST_F(ToolbarControllerTest, FocusLocation) {
}
TEST_F(ToolbarControllerTest, LoadingState) {
- // In its initial state, the go button has a tag of IDC_GO. When loading,
- // it should be IDC_STOP.
- NSButton* go = [[bar_ toolbarViews] objectAtIndex:kGoIndex];
- EXPECT_EQ([go tag], IDC_GO);
+ // In its initial state, the reload button has a tag of
+ // IDC_RELOAD. When loading, it should be IDC_STOP.
+ NSButton* reload = [[bar_ toolbarViews] objectAtIndex:kReloadIndex];
+ EXPECT_EQ([reload tag], IDC_RELOAD);
[bar_ setIsLoading:YES];
- EXPECT_EQ([go tag], IDC_STOP);
+ EXPECT_EQ([reload tag], IDC_STOP);
[bar_ setIsLoading:NO];
- EXPECT_EQ([go tag], IDC_GO);
+ EXPECT_EQ([reload tag], IDC_RELOAD);
}
// Check that toggling the state of the home button changes the visible
@@ -191,9 +190,7 @@ TEST_F(ToolbarControllerTest, TogglePageWrench) {
EXPECT_EQ(showButtons, ![pageButton isHidden]);
EXPECT_EQ(showButtons, ![wrenchButton isHidden]);
- NSView* goButton = [[bar_ toolbarViews] objectAtIndex:kGoIndex];
NSView* locationBar = [[bar_ toolbarViews] objectAtIndex:kLocationIndex];
- NSRect originalGoFrame = [goButton frame];
NSRect originalLocationBarFrame = [locationBar frame];
// Toggle the pref and make sure the buttons changed state and the other
@@ -201,7 +198,6 @@ TEST_F(ToolbarControllerTest, TogglePageWrench) {
prefs->SetBoolean(prefs::kShowPageOptionsButtons, !showButtons);
EXPECT_EQ(showButtons, [pageButton isHidden]);
EXPECT_EQ(showButtons, [wrenchButton isHidden]);
- EXPECT_NE(NSMinX(originalGoFrame), NSMinX([goButton frame]));
EXPECT_NE(NSWidth(originalLocationBarFrame), NSWidth([locationBar frame]));
}