| Index: chrome/browser/ui/cocoa/profiles/profile_chooser_controller_unittest.mm
|
| diff --git a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller_unittest.mm b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller_unittest.mm
|
| index 4c5db4f0904bff13b729722b4af3b8a3de096143..6d16600f829e7f77aeff414d88729b61e8e33d40 100644
|
| --- a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller_unittest.mm
|
| +++ b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller_unittest.mm
|
| @@ -25,7 +25,10 @@
|
| #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
|
| #include "chrome/browser/signin/signin_manager_factory.h"
|
| #include "chrome/browser/ui/browser.h"
|
| +#import "chrome/browser/ui/cocoa/info_bubble_view.h"
|
| +#include "chrome/browser/ui/cocoa/l10n_util.h"
|
| #include "chrome/browser/ui/cocoa/test/cocoa_profile_test.h"
|
| +#include "chrome/browser/ui/cocoa/test/scoped_force_rtl_mac.h"
|
| #include "chrome/common/chrome_switches.h"
|
| #include "chrome/common/pref_names.h"
|
| #include "components/signin/core/browser/fake_account_fetcher_service.h"
|
| @@ -251,6 +254,25 @@ TEST_F(ProfileChooserControllerTest, InitialLayoutWithNewMenu) {
|
| EXPECT_GT([[promo stringValue] length], 0U);
|
| }
|
|
|
| +// Check to see if the bubble is aligned properly in LTR and RTL format.
|
| +TEST_F(ProfileChooserControllerTest, BubbleAlignment) {
|
| + // Test the LTR format.
|
| + StartProfileChooserController();
|
| + EXPECT_EQ(info_bubble::kAlignTrailingEdgeToAnchorEdge,
|
| + [[controller() bubble] alignment]);
|
| + [controller() close];
|
| +
|
| + // Force to RTL format
|
| + cocoa_l10n_util::ScopedForceRTLMac rtl;
|
| + StartProfileChooserController();
|
| + info_bubble::BubbleAlignment expected_alignment =
|
| + cocoa_l10n_util::ShouldFlipWindowControlsInRTL()
|
| + ? info_bubble::kAlignTrailingEdgeToAnchorEdge
|
| + : info_bubble::kAlignLeadingEdgeToAnchorEdge;
|
| + EXPECT_EQ(expected_alignment, [[controller() bubble] alignment]);
|
| + [controller() close];
|
| +}
|
| +
|
| TEST_F(ProfileChooserControllerTest, RightClickTutorialShownAfterWelcome) {
|
| // The welcome upgrade tutorial takes precedence so show it then dismiss it.
|
| // The right click tutorial should be shown right away.
|
|
|