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

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

Issue 823133004: Cleanup: Update the path to gfx rect headers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rect_f.h Created 5 years, 11 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
« no previous file with comments | « ui/gfx/canvas_skia.cc ('k') | ui/gfx/display.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 <vector> 7 #include <vector>
8 8
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "third_party/skia/include/core/SkBitmap.h" 10 #include "third_party/skia/include/core/SkBitmap.h"
11 #include "third_party/skia/include/core/SkColor.h" 11 #include "third_party/skia/include/core/SkColor.h"
12 #include "ui/gfx/canvas.h" 12 #include "ui/gfx/canvas.h"
13 #include "ui/gfx/color_utils.h" 13 #include "ui/gfx/color_utils.h"
14 #include "ui/gfx/geometry/rect.h"
14 #include "ui/gfx/image/image.h" 15 #include "ui/gfx/image/image.h"
15 #include "ui/gfx/rect.h"
16 16
17 namespace color_utils { 17 namespace color_utils {
18 18
19 const unsigned char k1x1White[] = { 19 const unsigned char k1x1White[] = {
20 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 20 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a,
21 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 21 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
22 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 22 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
23 0x08, 0x02, 0x00, 0x00, 0x00, 0x90, 0x77, 0x53, 23 0x08, 0x02, 0x00, 0x00, 0x00, 0x90, 0x77, 0x53,
24 0xde, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 24 0xde, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47,
25 0x42, 0x00, 0xae, 0xce, 0x1c, 0xe9, 0x00, 0x00, 25 0x42, 0x00, 0xae, 0xce, 0x1c, 0xe9, 0x00, 0x00,
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 Calculate8bitBitmapMinMax(result, &min_gl, &max_gl); 495 Calculate8bitBitmapMinMax(result, &min_gl, &max_gl);
496 496
497 EXPECT_EQ(0, min_gl); 497 EXPECT_EQ(0, min_gl);
498 EXPECT_EQ(255, max_gl); 498 EXPECT_EQ(255, max_gl);
499 EXPECT_EQ(min_gl, SkColorGetA(result.getColor(0, 0))); 499 EXPECT_EQ(min_gl, SkColorGetA(result.getColor(0, 0)));
500 EXPECT_EQ(max_gl, SkColorGetA(result.getColor(299, 199))); 500 EXPECT_EQ(max_gl, SkColorGetA(result.getColor(299, 199)));
501 EXPECT_EQ(93U, SkColorGetA(result.getColor(150, 0))); 501 EXPECT_EQ(93U, SkColorGetA(result.getColor(150, 0)));
502 } 502 }
503 503
504 } // namespace color_utils 504 } // namespace color_utils
OLDNEW
« no previous file with comments | « ui/gfx/canvas_skia.cc ('k') | ui/gfx/display.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698