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

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

Issue 2191233002: Add platform/geometry pretty printers for logging and testing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adjust tests to work around uninteresting cross-platform differences Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
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 5b84442d9babee1bb297df6a1b075b02b5206022..ebb98bc0b87e0abb95a3a8518efe7736f052a9e4 100644
--- a/third_party/WebKit/Source/platform/testing/PictureMatchers.cpp
+++ b/third_party/WebKit/Source/platform/testing/PictureMatchers.cpp
@@ -50,9 +50,8 @@ public:
const FloatQuad& quad = quads[0].first;
if (!quad.isRectilinear()) {
if (listener->IsInterested()) {
- *listener << "which draws ";
- PrintTo(quad, listener->stream());
- *listener << " with color " << quads[0].second.serialized().ascii().data();
+ *listener << "which draws " << quad
+ << " with color " << quads[0].second.serialized().ascii().data();
}
return false;
}
@@ -60,9 +59,8 @@ public:
const FloatRect& rect = quad.boundingBox();
if (rect != m_rect || quads[0].second != m_color) {
if (listener->IsInterested()) {
- *listener << "which draws ";
- PrintTo(rect, listener->stream());
- *listener << " with color " << quads[0].second.serialized().ascii().data();
+ *listener << "which draws " << rect
+ << " with color " << quads[0].second.serialized().ascii().data();
}
return false;
}
@@ -72,9 +70,8 @@ public:
void DescribeTo(::std::ostream* os) const override
{
- *os << "draws ";
- PrintTo(m_rect, os);
- *os << " with color " << m_color.serialized().ascii().data();
+ *os << "draws " << m_rect
+ << " with color " << m_color.serialized().ascii().data();
}
private:

Powered by Google App Engine
This is Rietveld 408576698