Chromium Code Reviews| Index: ash/wm/panels/panel_layout_manager_unittest.cc |
| diff --git a/ash/wm/panels/panel_layout_manager_unittest.cc b/ash/wm/panels/panel_layout_manager_unittest.cc |
| index f05e093e8accb044de061ef6f35ab29e5bf76594..b842d9176cda83341db5169dbc42a1751b388a26 100644 |
| --- a/ash/wm/panels/panel_layout_manager_unittest.cc |
| +++ b/ash/wm/panels/panel_layout_manager_unittest.cc |
| @@ -24,6 +24,7 @@ |
| #include "base/basictypes.h" |
| #include "base/command_line.h" |
| #include "base/compiler_specific.h" |
| +#include "base/i18n/rtl.h" |
| #include "base/run_loop.h" |
| #include "ui/aura/client/aura_constants.h" |
| #include "ui/aura/root_window.h" |
| @@ -268,6 +269,21 @@ class PanelLayoutManagerTest : public test::AshTestBase { |
| DISALLOW_COPY_AND_ASSIGN(PanelLayoutManagerTest); |
| }; |
| +class PanelLayoutManagerRTLTest : public PanelLayoutManagerTest { |
| + public: |
| + PanelLayoutManagerRTLTest() {} |
| + virtual ~PanelLayoutManagerRTLTest() {} |
| + |
| + virtual void SetUp() OVERRIDE { |
| + base::i18n::SetICUDefaultLocale("ar"); |
| + PanelLayoutManagerTest::SetUp(); |
| + ASSERT_TRUE(base::i18n::IsRTL()); |
| + } |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(PanelLayoutManagerRTLTest); |
| +}; |
| + |
|
varkha
2013/05/03 17:48:14
RTL could be a test parameter set up with INSTANTI
flackr
2013/05/17 20:31:14
This would be nice, however as far as I can tell i
|
| // Tests that a created panel window is successfully added to the panel |
| // layout manager. |
| TEST_F(PanelLayoutManagerTest, AddOnePanel) { |
| @@ -277,6 +293,15 @@ TEST_F(PanelLayoutManagerTest, AddOnePanel) { |
| EXPECT_NO_FATAL_FAILURE(IsPanelAboveLauncherIcon(window.get())); |
| } |
| +// Tests that a created panel window is above the launcher icon in RTL. |
| +TEST_F(PanelLayoutManagerRTLTest, AddOnePanel) { |
| + gfx::Rect bounds(0, 0, 201, 201); |
| + scoped_ptr<aura::Window> window(CreatePanelWindow(bounds)); |
| + EXPECT_EQ(GetPanelContainer(window.get()), window->parent()); |
| + EXPECT_NO_FATAL_FAILURE(IsPanelAboveLauncherIcon(window.get())); |
| + EXPECT_NO_FATAL_FAILURE(IsCalloutAboveLauncherIcon(window.get())); |
| +} |
| + |
| // Tests that a created panel window is successfully aligned over a hidden |
| // launcher icon. |
| TEST_F(PanelLayoutManagerTest, PanelAlignsToHiddenLauncherIcon) { |