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

Unified Diff: third_party/WebKit/Source/platform/testing/PictureMatchers.cpp

Issue 2604093002: Add unittests for the bugs found in previous CL. (Closed)
Patch Set: none Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/testing/PictureMatchers.cpp
diff --git a/third_party/WebKit/Source/platform/testing/PictureMatchers.cpp b/third_party/WebKit/Source/platform/testing/PictureMatchers.cpp
index 5f04765aca098135d7a192fe40d54aaa5e83bf28..1f886fc138d70bfe596c589f1cae3ac2db1756e6 100644
--- a/third_party/WebKit/Source/platform/testing/PictureMatchers.cpp
+++ b/third_party/WebKit/Source/platform/testing/PictureMatchers.cpp
@@ -122,18 +122,9 @@ class DrawsRectanglesMatcher
for (unsigned index = 0; index < quads.size(); index++) {
const auto& quadWithColor = quads[index];
const auto& rectWithColor = m_rectsWithColor[index];
- if (!quadWithColor.quad.isRectilinear()) {
- if (listener->IsInterested()) {
- *listener << "at index " << index << " which draws ";
- PrintTo(quadWithColor.quad, listener->stream());
- *listener << " with color "
- << quadWithColor.color.serialized().ascii().data() << "\n";
- }
- return false;
- }
const FloatRect& rect = quadWithColor.quad.boundingBox();
- if (rect != rectWithColor.rect ||
+ if (enclosingIntRect(rect) != enclosingIntRect(rectWithColor.rect) ||
quadWithColor.color != rectWithColor.color) {
if (listener->IsInterested()) {
*listener << "at index " << index << " which draws ";
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698