| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/display/resolution_notification_controller.h" | 5 #include "ash/display/resolution_notification_controller.h" |
| 6 | 6 |
| 7 #include "ash/display/display_manager.h" | 7 #include "ash/display/display_manager.h" |
| 8 #include "ash/screen_util.h" | 8 #include "ash/screen_util.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/test/ash_test_base.h" | 10 #include "ash/test/ash_test_base.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 class ResolutionNotificationControllerTest : public ash::test::AshTestBase { | 48 class ResolutionNotificationControllerTest : public ash::test::AshTestBase { |
| 49 public: | 49 public: |
| 50 ResolutionNotificationControllerTest() | 50 ResolutionNotificationControllerTest() |
| 51 : accept_count_(0) { | 51 : accept_count_(0) { |
| 52 } | 52 } |
| 53 | 53 |
| 54 virtual ~ResolutionNotificationControllerTest() {} | 54 virtual ~ResolutionNotificationControllerTest() {} |
| 55 | 55 |
| 56 protected: | 56 protected: |
| 57 virtual void SetUp() OVERRIDE { | 57 virtual void SetUp() override { |
| 58 ash::test::AshTestBase::SetUp(); | 58 ash::test::AshTestBase::SetUp(); |
| 59 ResolutionNotificationController::SuppressTimerForTest(); | 59 ResolutionNotificationController::SuppressTimerForTest(); |
| 60 } | 60 } |
| 61 | 61 |
| 62 void SetDisplayResolutionAndNotifyWithResolution( | 62 void SetDisplayResolutionAndNotifyWithResolution( |
| 63 const gfx::Display& display, | 63 const gfx::Display& display, |
| 64 const gfx::Size& new_resolution, | 64 const gfx::Size& new_resolution, |
| 65 const gfx::Size& actual_new_resolution) { | 65 const gfx::Size& actual_new_resolution) { |
| 66 DisplayManager* display_manager = Shell::GetInstance()->display_manager(); | 66 DisplayManager* display_manager = Shell::GetInstance()->display_manager(); |
| 67 | 67 |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 ClickOnNotificationButton(0); | 414 ClickOnNotificationButton(0); |
| 415 RunAllPendingInMessageLoop(); | 415 RunAllPendingInMessageLoop(); |
| 416 EXPECT_FALSE(IsNotificationVisible()); | 416 EXPECT_FALSE(IsNotificationVisible()); |
| 417 EXPECT_EQ(0, accept_count()); | 417 EXPECT_EQ(0, accept_count()); |
| 418 EXPECT_TRUE(display_manager->GetSelectedModeForDisplayId(id2, &mode)); | 418 EXPECT_TRUE(display_manager->GetSelectedModeForDisplayId(id2, &mode)); |
| 419 EXPECT_EQ("250x250", mode.size.ToString()); | 419 EXPECT_EQ("250x250", mode.size.ToString()); |
| 420 EXPECT_EQ(58.0f, mode.refresh_rate); | 420 EXPECT_EQ(58.0f, mode.refresh_rate); |
| 421 } | 421 } |
| 422 | 422 |
| 423 } // namespace ash | 423 } // namespace ash |
| OLD | NEW |