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

Side by Side Diff: chrome/browser/chromeos/arc/settings_bridge_unittest.cc

Issue 1843563003: Move arc_intent_helper_bridge.h from c/b/chromeos/ to components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address a comment Created 4 years, 8 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
(Empty)
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/chromeos/arc/settings_bridge.h"
6
7 #include "testing/gtest/include/gtest/gtest.h"
8
9 namespace arc {
10
11 namespace fontsizes {
12
13 TEST(SettingsBridgeTest, FontSizeConvertChromeToAndroid) {
14 // Does not return a value smaller than Small.
15 EXPECT_DOUBLE_EQ(kAndroidFontScaleSmall,
16 ConvertFontSizeChromeToAndroid(0, 0, 0));
17
18 // Does not return a value larger than Huge
19 EXPECT_DOUBLE_EQ(kAndroidFontScaleHuge,
20 ConvertFontSizeChromeToAndroid(100, 100, 100));
21
22 // The max of any Chrome values is what determines the Android value.
23 EXPECT_DOUBLE_EQ(kAndroidFontScaleLarge,
24 ConvertFontSizeChromeToAndroid(20, 0, 0));
25 EXPECT_DOUBLE_EQ(kAndroidFontScaleLarge,
26 ConvertFontSizeChromeToAndroid(0, 20, 0));
27 EXPECT_DOUBLE_EQ(kAndroidFontScaleLarge,
28 ConvertFontSizeChromeToAndroid(0, 0, 20));
29
30 // default fixed font size is adjusted up three pixels
31 EXPECT_DOUBLE_EQ(kAndroidFontScaleLarge,
32 ConvertFontSizeChromeToAndroid(0, 17, 0));
33
34 // Small converts properly.
35 EXPECT_DOUBLE_EQ(kAndroidFontScaleSmall,
36 ConvertFontSizeChromeToAndroid(12, 0, 0));
37
38 // Normal converts properly.
39 EXPECT_DOUBLE_EQ(kAndroidFontScaleNormal,
40 ConvertFontSizeChromeToAndroid(16, 0, 0));
41
42 // Large converts properly.
43 EXPECT_DOUBLE_EQ(kAndroidFontScaleLarge,
44 ConvertFontSizeChromeToAndroid(20, 0, 0));
45
46 // Very large converts properly.
47 EXPECT_DOUBLE_EQ(kAndroidFontScaleHuge,
48 ConvertFontSizeChromeToAndroid(24, 0, 0));
49 }
50
51 } // namespace fontsizes
52
53 } // namespace arc
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/arc/settings_bridge.cc ('k') | chrome/browser/ui/ash/chrome_shell_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698