| 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/display/display_controller.h" | 5 #include "ash/display/display_controller.h" |
| 6 #include "ash/display/display_manager.h" | 6 #include "ash/display/display_manager.h" |
| 7 #include "ash/screen_ash.h" | 7 #include "ash/screen_ash.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
| 10 #include "ash/system/tray/system_tray.h" | 10 #include "ash/system/tray/system_tray.h" |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 p.SetPoint(0, 0); | 570 p.SetPoint(0, 0); |
| 571 aura::Window::ConvertPointToTarget(root_windows[0], root_windows[1], &p); | 571 aura::Window::ConvertPointToTarget(root_windows[0], root_windows[1], &p); |
| 572 EXPECT_EQ("0,-600", p.ToString()); | 572 EXPECT_EQ("0,-600", p.ToString()); |
| 573 p.SetPoint(0, 0); | 573 p.SetPoint(0, 0); |
| 574 aura::Window::ConvertPointToTarget(d1, d2, &p); | 574 aura::Window::ConvertPointToTarget(d1, d2, &p); |
| 575 EXPECT_EQ("-10,-610", p.ToString()); | 575 EXPECT_EQ("-10,-610", p.ToString()); |
| 576 } | 576 } |
| 577 | 577 |
| 578 TEST_F(ExtendedDesktopTest, OpenSystemTray) { | 578 TEST_F(ExtendedDesktopTest, OpenSystemTray) { |
| 579 UpdateDisplay("500x600,600x400"); | 579 UpdateDisplay("500x600,600x400"); |
| 580 SystemTray* tray = ash::Shell::GetInstance()->system_tray(); | 580 SystemTray* tray = ash::Shell::GetInstance()->GetPrimarySystemTray(); |
| 581 ASSERT_FALSE(tray->HasSystemBubble()); | 581 ASSERT_FALSE(tray->HasSystemBubble()); |
| 582 | 582 |
| 583 // Opens the tray by a dummy click event and makes sure that adding/removing | 583 // Opens the tray by a dummy click event and makes sure that adding/removing |
| 584 // displays doesn't break anything. | 584 // displays doesn't break anything. |
| 585 aura::test::EventGenerator event_generator( | 585 aura::test::EventGenerator event_generator( |
| 586 ash::Shell::GetInstance()->GetPrimaryRootWindow(), | 586 ash::Shell::GetInstance()->GetPrimaryRootWindow(), |
| 587 tray->GetWidget()->GetNativeWindow()); | 587 tray->GetWidget()->GetNativeWindow()); |
| 588 event_generator.ClickLeftButton(); | 588 event_generator.ClickLeftButton(); |
| 589 EXPECT_TRUE(tray->HasSystemBubble()); | 589 EXPECT_TRUE(tray->HasSystemBubble()); |
| 590 | 590 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 | 689 |
| 690 aura::test::EventGenerator generator22(root_windows[1]); | 690 aura::test::EventGenerator generator22(root_windows[1]); |
| 691 generator22.PressKey(ui::VKEY_E, 0); | 691 generator22.PressKey(ui::VKEY_E, 0); |
| 692 generator22.ReleaseKey(ui::VKEY_E, 0); | 692 generator22.ReleaseKey(ui::VKEY_E, 0); |
| 693 EXPECT_EQ(lock_widget->GetNativeView(), focus_client->GetFocusedWindow()); | 693 EXPECT_EQ(lock_widget->GetNativeView(), focus_client->GetFocusedWindow()); |
| 694 EXPECT_EQ("abcde", UTF16ToASCII(textfield->text())); | 694 EXPECT_EQ("abcde", UTF16ToASCII(textfield->text())); |
| 695 } | 695 } |
| 696 | 696 |
| 697 } // namespace internal | 697 } // namespace internal |
| 698 } // namespace ash | 698 } // namespace ash |
| OLD | NEW |