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

Unified Diff: chrome/browser/cocoa/cocoa_utils_unittest.mm

Issue 141037: Get our color channels straight. The reason why the color swap was required... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: ... Created 11 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/cocoa/cocoa_utils.mm ('k') | skia/config/SkUserConfig.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/cocoa_utils_unittest.mm
===================================================================
--- chrome/browser/cocoa/cocoa_utils_unittest.mm (revision 18890)
+++ chrome/browser/cocoa/cocoa_utils_unittest.mm (working copy)
@@ -14,12 +14,11 @@
// If not red, is blue.
// If not tfbit (twenty-four-bit), is 444.
- // If swap, swap R and B before testing (see TODOs in cocoa_utils.mm)
- void ShapeHelper(int width, int height, bool isred, bool tfbit, bool swap);
+ void ShapeHelper(int width, int height, bool isred, bool tfbit);
};
void CocoaUtilsTest::ShapeHelper(int width, int height,
- bool isred, bool tfbit, bool swap) {
+ bool isred, bool tfbit) {
SkBitmap thing;
if (tfbit)
@@ -48,12 +47,6 @@
[image unlockFocus];
[color getRed:&red green:&green blue:&blue alpha:&alpha];
- if (swap) {
- CGFloat tmp = red;
- red = blue;
- blue = tmp;
- }
-
// Be tolerant of floating point rounding, gamma, etc.
if (isred) {
EXPECT_GT(red, 0.8);
@@ -68,15 +61,15 @@
TEST_F(CocoaUtilsTest, BitmapToNSImage_RedSquare64x64) {
- ShapeHelper(64, 64, true, true, true);
+ ShapeHelper(64, 64, true, true);
}
TEST_F(CocoaUtilsTest, BitmapToNSImage_BlueRectangle199x19) {
- ShapeHelper(199, 19, false, true, true);
+ ShapeHelper(199, 19, false, true);
}
TEST_F(CocoaUtilsTest, BitmapToNSImage_BlueRectangle444) {
- ShapeHelper(200, 200, false, false, false);
+ ShapeHelper(200, 200, false, false);
}
« no previous file with comments | « chrome/browser/cocoa/cocoa_utils.mm ('k') | skia/config/SkUserConfig.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698