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

Side by Side Diff: ui/gfx/color_analysis_unittest.cc

Issue 1543183002: Switch to standard integer types in ui/gfx/. (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 | « ui/gfx/color_analysis.h ('k') | ui/gfx/color_profile.h » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "ui/gfx/color_analysis.h" 5 #include "ui/gfx/color_analysis.h"
6 6
7 #include <stddef.h>
8 #include <stdint.h>
9
7 #include <vector> 10 #include <vector>
8 11
9 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
10 #include "third_party/skia/include/core/SkBitmap.h" 13 #include "third_party/skia/include/core/SkBitmap.h"
11 #include "third_party/skia/include/core/SkColor.h" 14 #include "third_party/skia/include/core/SkColor.h"
12 #include "ui/gfx/canvas.h" 15 #include "ui/gfx/canvas.h"
13 #include "ui/gfx/color_utils.h" 16 #include "ui/gfx/color_utils.h"
14 #include "ui/gfx/geometry/rect.h" 17 #include "ui/gfx/geometry/rect.h"
15 #include "ui/gfx/image/image.h" 18 #include "ui/gfx/image/image.h"
16 19
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 Calculate8bitBitmapMinMax(result, &min_gl, &max_gl); 494 Calculate8bitBitmapMinMax(result, &min_gl, &max_gl);
492 495
493 EXPECT_EQ(0, min_gl); 496 EXPECT_EQ(0, min_gl);
494 EXPECT_EQ(255, max_gl); 497 EXPECT_EQ(255, max_gl);
495 EXPECT_EQ(min_gl, SkColorGetA(result.getColor(0, 0))); 498 EXPECT_EQ(min_gl, SkColorGetA(result.getColor(0, 0)));
496 EXPECT_EQ(max_gl, SkColorGetA(result.getColor(299, 199))); 499 EXPECT_EQ(max_gl, SkColorGetA(result.getColor(299, 199)));
497 EXPECT_EQ(93U, SkColorGetA(result.getColor(150, 0))); 500 EXPECT_EQ(93U, SkColorGetA(result.getColor(150, 0)));
498 } 501 }
499 502
500 } // namespace color_utils 503 } // namespace color_utils
OLDNEW
« no previous file with comments | « ui/gfx/color_analysis.h ('k') | ui/gfx/color_profile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698