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

Unified Diff: ash/wm/panels/panel_window_resizer_unittest.cc

Issue 14574009: Use correctly mirrored points for ideal bounds of launcher item icons. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Use INSTANTIATE_TEST_CASE_P Created 7 years, 7 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
« no previous file with comments | « ash/wm/panels/panel_layout_manager_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ash/wm/panels/panel_layout_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698