Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: chrome/browser/cocoa/translate/translate_infobar_unittest.mm

Issue 2804035: Clean up mac translate bars. (Closed)
Patch Set: Fixes. Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/cocoa/translate/translate_infobar_unittest.mm
diff --git a/chrome/browser/cocoa/translate/translate_infobar_unittest.mm b/chrome/browser/cocoa/translate/translate_infobar_unittest.mm
index 646039f3df1c4ab6db2e7edc8258c423cbd6d0b3..3b8ee658bff782e6944e81941301f079a5c83412 100644
--- a/chrome/browser/cocoa/translate/translate_infobar_unittest.mm
+++ b/chrome/browser/cocoa/translate/translate_infobar_unittest.mm
@@ -103,7 +103,10 @@ class TranslationInfoBarTest : public CocoaTest {
infobar_controller.reset(
reinterpret_cast<TranslateInfoBarControllerBase*>(
infobar->controller()));
- // Need to call this to get the view to load from nib.
+ // We need to set the window to be wide so that the options button
+ // doesn't overlap the other buttons.
+ [test_window() setContentSize:NSMakeSize(2000, 500)];
+ [[infobar_controller view] setFrame:NSMakeRect(0, 0, 2000, 500)];
[[test_window() contentView] addSubview:[infobar_controller view]];
}
};
@@ -145,7 +148,7 @@ TEST_F(TranslationInfoBarTest, OptionsMenuItemsHookedUp) {
EXPECT_CALL(*infobar_delegate, Translate())
.Times(0);
- [infobar_controller rebuildOptionsMenu];
+ [infobar_controller rebuildOptionsMenu:NO];
NSMenu* optionsMenu = [infobar_controller optionsMenu];
NSArray* optionsMenuItems = [optionsMenu itemArray];

Powered by Google App Engine
This is Rietveld 408576698