Index: ash/wm/panels/panel_window_resizer_unittest.cc |
diff --git a/ash/wm/panels/panel_window_resizer_unittest.cc b/ash/wm/panels/panel_window_resizer_unittest.cc |
index ed28b763da7572258a08995e9fc1213d4b8ad551..055a6b0dcc2d0dfc82ca33e57fbfb2da4f35c091 100644 |
--- a/ash/wm/panels/panel_window_resizer_unittest.cc |
+++ b/ash/wm/panels/panel_window_resizer_unittest.cc |
@@ -22,6 +22,7 @@ |
#include "ui/aura/client/aura_constants.h" |
#include "ui/aura/root_window.h" |
#include "ui/base/hit_test.h" |
+#include "ui/base/l10n/l10n_util.h" |
#include "ui/base/ui_base_types.h" |
#include "ui/views/widget/widget.h" |
@@ -194,6 +195,34 @@ class PanelWindowResizerTest : public test::AshTestBase { |
DISALLOW_COPY_AND_ASSIGN(PanelWindowResizerTest); |
}; |
+class PanelWindowResizerTextDirectionTest |
+ : public PanelWindowResizerTest, |
+ public testing::WithParamInterface<bool> { |
+ public: |
+ PanelWindowResizerTextDirectionTest() : is_rtl_(GetParam()) {} |
+ virtual ~PanelWindowResizerTextDirectionTest() {} |
+ |
+ virtual void SetUp() OVERRIDE { |
+ original_locale = l10n_util::GetApplicationLocale(std::string()); |
+ if (is_rtl_) |
+ base::i18n::SetICUDefaultLocale("he"); |
+ PanelWindowResizerTest::SetUp(); |
+ ASSERT_EQ(is_rtl_, base::i18n::IsRTL()); |
+ } |
+ |
+ virtual void TearDown() OVERRIDE { |
+ if (is_rtl_) |
+ base::i18n::SetICUDefaultLocale(original_locale); |
+ PanelWindowResizerTest::TearDown(); |
+ } |
+ |
+ private: |
+ bool is_rtl_; |
+ std::string original_locale; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(PanelWindowResizerTextDirectionTest); |
+}; |
+ |
// Verifies a window can be dragged from the panel and detached and then |
// reattached. |
TEST_F(PanelWindowResizerTest, PanelDetachReattachBottom) { |
@@ -411,8 +440,8 @@ TEST_F(PanelWindowResizerTest, DragMovesToPanelLayer) { |
window->parent()->id()); |
} |
-TEST_F(PanelWindowResizerTest, DragReordersPanelsHorizontal) { |
- DragAlongShelfReorder(-1, 0); |
+TEST_P(PanelWindowResizerTextDirectionTest, DragReordersPanelsHorizontal) { |
+ DragAlongShelfReorder(base::i18n::IsRTL() ? 1 : -1, 0); |
} |
TEST_F(PanelWindowResizerTest, DragReordersPanelsVertical) { |
@@ -421,5 +450,8 @@ TEST_F(PanelWindowResizerTest, DragReordersPanelsVertical) { |
DragAlongShelfReorder(0, -1); |
} |
+INSTANTIATE_TEST_CASE_P(LtrRtl, PanelWindowResizerTextDirectionTest, |
+ testing::Bool()); |
+ |
} // namespace internal |
} // namespace ash |