| 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/display_change_observer_chromeos.h" | 5 #include "ash/display/display_change_observer_chromeos.h" |
| 6 | 6 |
| 7 #include "ash/display/display_info.h" | 7 #include "ash/display/display_info.h" |
| 8 #include "chromeos/display/output_configurator.h" | |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 #include "ui/display/chromeos/output_configurator.h" |
| 10 | 10 |
| 11 using chromeos::OutputConfigurator; | 11 using ui::OutputConfigurator; |
| 12 | 12 |
| 13 typedef testing::Test DisplayChangeObserverTest; | 13 typedef testing::Test DisplayChangeObserverTest; |
| 14 | 14 |
| 15 namespace ash { | 15 namespace ash { |
| 16 namespace internal { | 16 namespace internal { |
| 17 | 17 |
| 18 TEST_F(DisplayChangeObserverTest, GetDisplayModeList) { | 18 TEST_F(DisplayChangeObserverTest, GetDisplayModeList) { |
| 19 OutputConfigurator::OutputSnapshot output; | 19 OutputConfigurator::OutputSnapshot output; |
| 20 output.mode_infos[11] = OutputConfigurator::ModeInfo(1920, 1200, false, 60); | 20 output.mode_infos[11] = OutputConfigurator::ModeInfo(1920, 1200, false, 60); |
| 21 | 21 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 EXPECT_EQ(display_modes[5].refresh_rate, 60); | 68 EXPECT_EQ(display_modes[5].refresh_rate, 60); |
| 69 | 69 |
| 70 // Outputs without any modes shouldn't cause a crash. | 70 // Outputs without any modes shouldn't cause a crash. |
| 71 output.mode_infos.clear(); | 71 output.mode_infos.clear(); |
| 72 display_modes = DisplayChangeObserver::GetDisplayModeList(output); | 72 display_modes = DisplayChangeObserver::GetDisplayModeList(output); |
| 73 EXPECT_EQ(0u, display_modes.size()); | 73 EXPECT_EQ(0u, display_modes.size()); |
| 74 } | 74 } |
| 75 | 75 |
| 76 } // namespace internal | 76 } // namespace internal |
| 77 } // namespace ash | 77 } // namespace ash |
| OLD | NEW |