OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 #import "ios/chrome/browser/ui/uikit_ui_util.h" | 5 #import "ios/chrome/browser/ui/uikit_ui_util.h" |
6 | 6 |
7 #include "base/basictypes.h" | |
8 #include "base/mac/scoped_nsobject.h" | 7 #include "base/mac/scoped_nsobject.h" |
9 #include "base/strings/sys_string_conversions.h" | 8 #include "base/strings/sys_string_conversions.h" |
10 #import "ios/chrome/browser/ui/ui_util.h" | 9 #import "ios/chrome/browser/ui/ui_util.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
12 #import "third_party/ocmock/OCMock/OCMock.h" | 11 #import "third_party/ocmock/OCMock/OCMock.h" |
13 | 12 |
14 namespace { | 13 namespace { |
15 | 14 |
16 void ExpectInterpolatedColor(UIColor* firstColor, | 15 void ExpectInterpolatedColor(UIColor* firstColor, |
17 UIColor* secondColor, | 16 UIColor* secondColor, |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 ASSERT_EQ(kCGColorSpaceModelMonochrome, | 139 ASSERT_EQ(kCGColorSpaceModelMonochrome, |
141 CGColorSpaceGetModel(CGColorGetColorSpace(black.CGColor))); | 140 CGColorSpaceGetModel(CGColorGetColorSpace(black.CGColor))); |
142 | 141 |
143 // Interpolate between monochrome and rgb. | 142 // Interpolate between monochrome and rgb. |
144 ExpectInterpolatedColor(black, rgb, 0.5, 0.1); | 143 ExpectInterpolatedColor(black, rgb, 0.5, 0.1); |
145 // Interpolate between two monochrome colors. | 144 // Interpolate between two monochrome colors. |
146 ExpectInterpolatedColor(black, white, 0.3, 0.3); | 145 ExpectInterpolatedColor(black, white, 0.3, 0.3); |
147 } | 146 } |
148 | 147 |
149 } // namespace | 148 } // namespace |
OLD | NEW |