OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ash/wm/panels/panel_window_resizer.h" | 5 #include "ash/wm/panels/panel_window_resizer.h" |
6 | 6 |
7 #include "ash/launcher/launcher.h" | 7 #include "ash/launcher/launcher.h" |
8 #include "ash/launcher/launcher_model.h" | 8 #include "ash/launcher/launcher_model.h" |
9 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
10 #include "ash/shelf/shelf_layout_manager.h" | 10 #include "ash/shelf/shelf_layout_manager.h" |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
186 } | 186 } |
187 | 187 |
188 private: | 188 private: |
189 scoped_ptr<PanelWindowResizer> resizer_; | 189 scoped_ptr<PanelWindowResizer> resizer_; |
190 internal::PanelLayoutManager* panel_layout_manager_; | 190 internal::PanelLayoutManager* panel_layout_manager_; |
191 LauncherModel* model_; | 191 LauncherModel* model_; |
192 | 192 |
193 DISALLOW_COPY_AND_ASSIGN(PanelWindowResizerTest); | 193 DISALLOW_COPY_AND_ASSIGN(PanelWindowResizerTest); |
194 }; | 194 }; |
195 | 195 |
196 class PanelWindowResizerRTLTest : public PanelWindowResizerTest { | |
197 public: | |
198 PanelWindowResizerRTLTest() {} | |
199 virtual ~PanelWindowResizerRTLTest() {} | |
200 | |
201 virtual void SetUp() OVERRIDE { | |
202 base::i18n::SetICUDefaultLocale("ar"); | |
203 PanelWindowResizerTest::SetUp(); | |
204 ASSERT_TRUE(base::i18n::IsRTL()); | |
205 } | |
206 | |
207 private: | |
208 DISALLOW_COPY_AND_ASSIGN(PanelWindowResizerRTLTest); | |
209 }; | |
210 | |
varkha
2013/05/03 17:48:14
RTL could be a test parameter set up with INSTANTI
| |
196 // Verifies a window can be dragged from the panel and detached and then | 211 // Verifies a window can be dragged from the panel and detached and then |
197 // reattached. | 212 // reattached. |
198 TEST_F(PanelWindowResizerTest, PanelDetachReattachBottom) { | 213 TEST_F(PanelWindowResizerTest, PanelDetachReattachBottom) { |
199 scoped_ptr<aura::Window> window( | 214 scoped_ptr<aura::Window> window( |
200 CreatePanelWindow(gfx::Rect(0, 0, 201, 201))); | 215 CreatePanelWindow(gfx::Rect(0, 0, 201, 201))); |
201 DetachReattachTest(window.get(), 0, -1); | 216 DetachReattachTest(window.get(), 0, -1); |
202 } | 217 } |
203 | 218 |
204 TEST_F(PanelWindowResizerTest, PanelDetachReattachLeft) { | 219 TEST_F(PanelWindowResizerTest, PanelDetachReattachLeft) { |
205 ash::Shell* shell = ash::Shell::GetInstance(); | 220 ash::Shell* shell = ash::Shell::GetInstance(); |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
407 | 422 |
408 // When dropped it should return to the default container. | 423 // When dropped it should return to the default container. |
409 EXPECT_EQ(internal::kShellWindowId_WorkspaceContainer, | 424 EXPECT_EQ(internal::kShellWindowId_WorkspaceContainer, |
410 window->parent()->id()); | 425 window->parent()->id()); |
411 } | 426 } |
412 | 427 |
413 TEST_F(PanelWindowResizerTest, DragReordersPanelsHorizontal) { | 428 TEST_F(PanelWindowResizerTest, DragReordersPanelsHorizontal) { |
414 DragAlongShelfReorder(-1, 0); | 429 DragAlongShelfReorder(-1, 0); |
415 } | 430 } |
416 | 431 |
432 TEST_F(PanelWindowResizerRTLTest, DragReordersPanelsHorizontal) { | |
433 DragAlongShelfReorder(1, 0); | |
434 } | |
435 | |
417 TEST_F(PanelWindowResizerTest, DragReordersPanelsVertical) { | 436 TEST_F(PanelWindowResizerTest, DragReordersPanelsVertical) { |
418 ash::Shell* shell = ash::Shell::GetInstance(); | 437 ash::Shell* shell = ash::Shell::GetInstance(); |
419 shell->SetShelfAlignment(SHELF_ALIGNMENT_LEFT, shell->GetPrimaryRootWindow()); | 438 shell->SetShelfAlignment(SHELF_ALIGNMENT_LEFT, shell->GetPrimaryRootWindow()); |
420 DragAlongShelfReorder(0, -1); | 439 DragAlongShelfReorder(0, -1); |
421 } | 440 } |
422 | 441 |
423 } // namespace internal | 442 } // namespace internal |
424 } // namespace ash | 443 } // namespace ash |
OLD | NEW |