[SyncFS] Build indexes from FileTracker entries on disk.
[chromium-blink-merge.git] / ui / gfx / test / gfx_util.h
blobf5e9d9d0f8942f97b8553dba155deff2609d7f18
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
3 // found in the LICENSE file.
5 #ifndef UI_GFX_TEST_GFX_UTIL_H_
6 #define UI_GFX_TEST_GFX_UTIL_H_
8 #include <iosfwd>
9 #include <string>
11 #include "testing/gtest/include/gtest/gtest.h"
12 #include "third_party/skia/include/core/SkColor.h"
13 #include "ui/gfx/box_f.h"
14 #include "ui/gfx/geometry/rect_f.h"
16 namespace gfx {
18 // Checks that the box coordinates are each almost equal floats.
19 #define EXPECT_BOXF_EQ(a, b) \
20 EXPECT_PRED_FORMAT2(::gfx::AssertBoxFloatEqual, a, b)
22 ::testing::AssertionResult AssertBoxFloatEqual(const char* lhs_expr,
23 const char* rhs_expr,
24 const BoxF& lhs,
25 const BoxF& rhs);
27 #define EXPECT_RECTF_EQ(a, b) \
28 EXPECT_PRED_FORMAT2(::gfx::AssertRectFloatEqual, a, b)
30 ::testing::AssertionResult AssertRectFloatEqual(const char* lhs_expr,
31 const char* rhs_expr,
32 const RectF& lhs,
33 const RectF& rhs);
35 #define EXPECT_SKCOLOR_EQ(a, b) \
36 EXPECT_PRED_FORMAT2(::gfx::AssertSkColorsEqual, a, b)
38 ::testing::AssertionResult AssertSkColorsEqual(const char* lhs_expr,
39 const char* rhs_expr,
40 SkColor lhs,
41 SkColor rhs);
43 } // namespace gfx
45 #endif // UI_GFX_TEST_GFX_UTIL_H_