OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/system/tray/system_tray.h" | 5 #include "ash/system/tray/system_tray.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "ash/accessibility_delegate.h" | 9 #include "ash/accessibility_delegate.h" |
10 #include "ash/root_window_controller.h" | 10 #include "ash/root_window_controller.h" |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 | 358 |
359 // Test in bottom alignment. | 359 // Test in bottom alignment. |
360 manager->SetAlignment(SHELF_ALIGNMENT_BOTTOM); | 360 manager->SetAlignment(SHELF_ALIGNMENT_BOTTOM); |
361 gfx::Rect window_bounds = widget->GetWindowBoundsInScreen(); | 361 gfx::Rect window_bounds = widget->GetWindowBoundsInScreen(); |
362 gfx::Rect tray_bounds = tray->GetBoundsInScreen(); | 362 gfx::Rect tray_bounds = tray->GetBoundsInScreen(); |
363 EXPECT_TRUE(window_bounds.bottom() >= tray_bounds.bottom()); | 363 EXPECT_TRUE(window_bounds.bottom() >= tray_bounds.bottom()); |
364 EXPECT_TRUE(window_bounds.right() >= tray_bounds.right()); | 364 EXPECT_TRUE(window_bounds.right() >= tray_bounds.right()); |
365 EXPECT_TRUE(window_bounds.x() >= tray_bounds.x()); | 365 EXPECT_TRUE(window_bounds.x() >= tray_bounds.x()); |
366 EXPECT_TRUE(window_bounds.y() >= tray_bounds.y()); | 366 EXPECT_TRUE(window_bounds.y() >= tray_bounds.y()); |
367 | 367 |
| 368 // Test in locked alignment. |
| 369 manager->SetAlignment(SHELF_ALIGNMENT_BOTTOM_LOCKED); |
| 370 window_bounds = widget->GetWindowBoundsInScreen(); |
| 371 tray_bounds = tray->GetBoundsInScreen(); |
| 372 EXPECT_TRUE(window_bounds.bottom() >= tray_bounds.bottom()); |
| 373 EXPECT_TRUE(window_bounds.right() >= tray_bounds.right()); |
| 374 EXPECT_TRUE(window_bounds.x() >= tray_bounds.x()); |
| 375 EXPECT_TRUE(window_bounds.y() >= tray_bounds.y()); |
| 376 |
368 // Test in the left alignment. | 377 // Test in the left alignment. |
369 manager->SetAlignment(SHELF_ALIGNMENT_LEFT); | 378 manager->SetAlignment(SHELF_ALIGNMENT_LEFT); |
370 window_bounds = widget->GetWindowBoundsInScreen(); | 379 window_bounds = widget->GetWindowBoundsInScreen(); |
371 tray_bounds = tray->GetBoundsInScreen(); | 380 tray_bounds = tray->GetBoundsInScreen(); |
372 EXPECT_TRUE(window_bounds.bottom() >= tray_bounds.bottom()); | 381 EXPECT_TRUE(window_bounds.bottom() >= tray_bounds.bottom()); |
373 EXPECT_TRUE(window_bounds.right() >= tray_bounds.right()); | 382 EXPECT_TRUE(window_bounds.right() >= tray_bounds.right()); |
374 EXPECT_TRUE(window_bounds.x() >= tray_bounds.x()); | 383 EXPECT_TRUE(window_bounds.x() >= tray_bounds.x()); |
375 EXPECT_TRUE(window_bounds.y() >= tray_bounds.y()); | 384 EXPECT_TRUE(window_bounds.y() >= tray_bounds.y()); |
376 | 385 |
377 // Test in the right alignment. | 386 // Test in the right alignment. |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 EXPECT_FALSE(view->active()); | 544 EXPECT_FALSE(view->active()); |
536 | 545 |
537 generator.set_current_location(move_point); | 546 generator.set_current_location(move_point); |
538 generator.ReleaseTouch(); | 547 generator.ReleaseTouch(); |
539 EXPECT_FALSE(view->active()); | 548 EXPECT_FALSE(view->active()); |
540 } | 549 } |
541 #endif // OS_CHROMEOS | 550 #endif // OS_CHROMEOS |
542 | 551 |
543 } // namespace test | 552 } // namespace test |
544 } // namespace ash | 553 } // namespace ash |
OLD | NEW |