OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ui/base/material_design/material_design_controller.h" | 5 #include "ui/base/material_design/material_design_controller.h" |
6 #include "ui/native_theme/native_theme_mac.h" | 6 #include "ui/native_theme/native_theme_mac.h" |
7 | 7 |
8 #include "base/mac/mac_util.h" | 8 #include "base/mac/mac_util.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 } | 34 } |
35 | 35 |
36 // Spot-check some system colours that can't be changed through System | 36 // Spot-check some system colours that can't be changed through System |
37 // Preferences. | 37 // Preferences. |
38 TEST_F(NativeThemeMacTest, SystemColorSpotChecks) { | 38 TEST_F(NativeThemeMacTest, SystemColorSpotChecks) { |
39 NativeTheme* native_theme = NativeThemeMac::instance(); | 39 NativeTheme* native_theme = NativeThemeMac::instance(); |
40 const SkColor kWindowColorCatsMavericks = SkColorSetARGB(255, 232, 232, 232); | 40 const SkColor kWindowColorCatsMavericks = SkColorSetARGB(255, 232, 232, 232); |
41 const SkColor kWindowColorYosemite = SkColorSetARGB(255, 236, 236, 236); | 41 const SkColor kWindowColorYosemite = SkColorSetARGB(255, 236, 236, 236); |
42 SkColor dialogColor = | 42 SkColor dialogColor = |
43 native_theme->GetSystemColor(NativeTheme::kColorId_WindowBackground); | 43 native_theme->GetSystemColor(NativeTheme::kColorId_WindowBackground); |
44 if (base::mac::IsOSYosemiteOrLater()) | 44 if (base::mac::IsAtLeastOS10_10()) |
45 EXPECT_EQ(dialogColor, kWindowColorYosemite); | 45 EXPECT_EQ(dialogColor, kWindowColorYosemite); |
46 else | 46 else |
47 EXPECT_EQ(dialogColor, kWindowColorCatsMavericks); | 47 EXPECT_EQ(dialogColor, kWindowColorCatsMavericks); |
48 } | 48 } |
49 | 49 |
50 } // namespace ui | 50 } // namespace ui |
OLD | NEW |