| Index: third_party/WebKit/Source/platform/testing/PictureMatchers.h
|
| diff --git a/third_party/WebKit/Source/platform/testing/PictureMatchers.h b/third_party/WebKit/Source/platform/testing/PictureMatchers.h
|
| index 01368f213e4fbadfb4a62eea47368736feeb1219..3f400a9eedd0c8a8468838a348df01f62358f5f8 100644
|
| --- a/third_party/WebKit/Source/platform/testing/PictureMatchers.h
|
| +++ b/third_party/WebKit/Source/platform/testing/PictureMatchers.h
|
| @@ -5,6 +5,7 @@
|
| #ifndef PictureMatchers_h
|
| #define PictureMatchers_h
|
|
|
| +#include "platform/geometry/FloatRect.h"
|
| #include "platform/graphics/Color.h"
|
| #include "testing/gmock/include/gmock/gmock.h"
|
|
|
| @@ -15,10 +16,25 @@ namespace blink {
|
| class FloatRect;
|
|
|
| // Matches if the picture draws exactly one rectangle, which (after accounting
|
| -// for the total transformation matrix) matches the rect provided, and whose
|
| -// paint has the color requested.
|
| +// for the total transformation matrix and applying any clips inside that
|
| +// transform) matches the rect provided, and whose paint has the color
|
| +// requested.
|
| +// Note that clips which appear outside of a transform are not currently
|
| +// supported.
|
| ::testing::Matcher<const SkPicture&> drawsRectangle(const FloatRect&, Color);
|
|
|
| +struct RectWithColor {
|
| + RectWithColor(const FloatRect& rectArg, const Color& colorArg)
|
| + : rect(rectArg), color(colorArg) {}
|
| + FloatRect rect;
|
| + Color color;
|
| +};
|
| +
|
| +// Same as above, but matches a number of rectangles equal to the size of the
|
| +// given vector.
|
| +::testing::Matcher<const SkPicture&> drawsRectangles(
|
| + const Vector<RectWithColor>&);
|
| +
|
| } // namespace blink
|
|
|
| #endif // PictureMatchers_h
|
|
|