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

Side by Side Diff: remoting/host/screen_resolution_unittest.cc

Issue 1547473005: Switch to standard integer types in remoting/host/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « remoting/host/screen_resolution.cc ('k') | remoting/host/server_log_entry_host_unittest.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 "remoting/host/screen_resolution.h" 5 #include "remoting/host/screen_resolution.h"
6 6
7 #include <stdint.h>
8
7 #include <limits> 9 #include <limits>
8 10
9 #include "testing/gmock/include/gmock/gmock.h" 11 #include "testing/gmock/include/gmock/gmock.h"
10 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
11 13
12 namespace remoting { 14 namespace remoting {
13 15
14 TEST(ScreenResolutionTest, Empty) { 16 TEST(ScreenResolutionTest, Empty) {
15 ScreenResolution resolution1( 17 ScreenResolution resolution1(
16 webrtc::DesktopSize(100, 100), webrtc::DesktopVector(10, 10)); 18 webrtc::DesktopSize(100, 100), webrtc::DesktopVector(10, 10));
(...skipping 16 matching lines...) Expand all
33 resolution.ScaleDimensionsToDpi(webrtc::DesktopVector(5, 5)))); 35 resolution.ScaleDimensionsToDpi(webrtc::DesktopVector(5, 5))));
34 36
35 EXPECT_TRUE(webrtc::DesktopSize(200, 200).equals( 37 EXPECT_TRUE(webrtc::DesktopSize(200, 200).equals(
36 resolution.ScaleDimensionsToDpi(webrtc::DesktopVector(20, 20)))); 38 resolution.ScaleDimensionsToDpi(webrtc::DesktopVector(20, 20))));
37 } 39 }
38 40
39 TEST(ScreenResolutionTest, ScalingSaturation) { 41 TEST(ScreenResolutionTest, ScalingSaturation) {
40 ScreenResolution resolution( 42 ScreenResolution resolution(
41 webrtc::DesktopSize(10000000, 1000000), webrtc::DesktopVector(1, 1)); 43 webrtc::DesktopSize(10000000, 1000000), webrtc::DesktopVector(1, 1));
42 44
43 int32 max_int = std::numeric_limits<int32>::max(); 45 int32_t max_int = std::numeric_limits<int32_t>::max();
44 EXPECT_TRUE(webrtc::DesktopSize(max_int, max_int).equals( 46 EXPECT_TRUE(webrtc::DesktopSize(max_int, max_int).equals(
45 resolution.ScaleDimensionsToDpi( 47 resolution.ScaleDimensionsToDpi(
46 webrtc::DesktopVector(1000000, 1000000)))); 48 webrtc::DesktopVector(1000000, 1000000))));
47 } 49 }
48 50
49 } // namespace remoting 51 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/screen_resolution.cc ('k') | remoting/host/server_log_entry_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698