Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: ash/display/display_change_observer_chromeos_unittest.cc

Issue 558253003: display: Move ui/display/types/chromeos/* to ui/display/types/* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "ui/display/chromeos/display_configurator.h" 10 #include "ui/display/chromeos/display_configurator.h"
11 #include "ui/display/chromeos/test/test_display_snapshot.h" 11 #include "ui/display/chromeos/test/test_display_snapshot.h"
12 #include "ui/display/types/chromeos/display_mode.h" 12 #include "ui/display/types/display_mode.h"
13 13
14 using ui::DisplayConfigurator; 14 using ui::DisplayConfigurator;
15 15
16 typedef testing::Test DisplayChangeObserverTest; 16 typedef testing::Test DisplayChangeObserverTest;
17 17
18 namespace ash { 18 namespace ash {
19 19
20 TEST_F(DisplayChangeObserverTest, GetExternalDisplayModeList) { 20 TEST_F(DisplayChangeObserverTest, GetExternalDisplayModeList) {
21 ScopedVector<const ui::DisplayMode> modes; 21 ScopedVector<const ui::DisplayMode> modes;
22 modes.push_back(new ui::DisplayMode(gfx::Size(1920, 1200), false, 60)); 22 modes.push_back(new ui::DisplayMode(gfx::Size(1920, 1200), false, 60));
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 // 12.85" 2560x1700 337 // 12.85" 2560x1700
338 EXPECT_EQ(2.0f, DisplayChangeObserver::FindDeviceScaleFactor(239.15f)); 338 EXPECT_EQ(2.0f, DisplayChangeObserver::FindDeviceScaleFactor(239.15f));
339 339
340 // Erroneous values should still work. 340 // Erroneous values should still work.
341 EXPECT_EQ(1.0f, DisplayChangeObserver::FindDeviceScaleFactor(-100.0f)); 341 EXPECT_EQ(1.0f, DisplayChangeObserver::FindDeviceScaleFactor(-100.0f));
342 EXPECT_EQ(1.0f, DisplayChangeObserver::FindDeviceScaleFactor(0.0f)); 342 EXPECT_EQ(1.0f, DisplayChangeObserver::FindDeviceScaleFactor(0.0f));
343 EXPECT_EQ(2.0f, DisplayChangeObserver::FindDeviceScaleFactor(10000.0f)); 343 EXPECT_EQ(2.0f, DisplayChangeObserver::FindDeviceScaleFactor(10000.0f));
344 } 344 }
345 345
346 } // namespace ash 346 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/display_change_observer_chromeos.cc ('k') | ash/display/projecting_observer_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698