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

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

Issue 22662005: Don't remember best resolution. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « ash/display/display_info.cc ('k') | ash/display/display_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_info.h" 5 #include "ash/display/display_info.h"
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace ash { 9 namespace ash {
10 namespace internal { 10 namespace internal {
(...skipping 25 matching lines...) Expand all
36 EXPECT_EQ("10,20 300x400", info.bounds_in_pixel().ToString()); 36 EXPECT_EQ("10,20 300x400", info.bounds_in_pixel().ToString());
37 EXPECT_EQ("380x288", info.size_in_pixel().ToString()); 37 EXPECT_EQ("380x288", info.size_in_pixel().ToString());
38 EXPECT_EQ(gfx::Display::ROTATE_90, info.rotation()); 38 EXPECT_EQ(gfx::Display::ROTATE_90, info.rotation());
39 // TODO(oshima): This should be rotated too. Fix this. 39 // TODO(oshima): This should be rotated too. Fix this.
40 EXPECT_EQ("5,3,5,3", info.overscan_insets_in_dip().ToString()); 40 EXPECT_EQ("5,3,5,3", info.overscan_insets_in_dip().ToString());
41 41
42 info = DisplayInfo::CreateFromSpecWithID("10+20-300x400*2/l@1.5", 10); 42 info = DisplayInfo::CreateFromSpecWithID("10+20-300x400*2/l@1.5", 10);
43 EXPECT_EQ("10,20 300x400", info.bounds_in_pixel().ToString()); 43 EXPECT_EQ("10,20 300x400", info.bounds_in_pixel().ToString());
44 EXPECT_EQ(gfx::Display::ROTATE_270, info.rotation()); 44 EXPECT_EQ(gfx::Display::ROTATE_270, info.rotation());
45 EXPECT_EQ(1.5f, info.ui_scale()); 45 EXPECT_EQ(1.5f, info.ui_scale());
46
47 info = DisplayInfo::CreateFromSpecWithID(
48 "200x200#300x200|200x200|100x100", 10);
49 EXPECT_EQ("0,0 200x200", info.bounds_in_pixel().ToString());
50 EXPECT_EQ(3u, info.resolutions().size());
51 EXPECT_EQ("300x200", info.resolutions()[0].size.ToString());
52 EXPECT_EQ("200x200", info.resolutions()[1].size.ToString());
53 EXPECT_EQ("100x100", info.resolutions()[2].size.ToString());
46 } 54 }
47 55
48 } // namespace internal 56 } // namespace internal
49 } // namespace ash 57 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/display_info.cc ('k') | ash/display/display_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698