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

Unified Diff: ui/gfx/geometry/rect.h

Issue 368903003: Provide gtest printers for ui/gfx geometry types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add gfx_test_support dep to video_encode_accelerator_unittest Created 6 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
« no previous file with comments | « ui/gfx/geometry/quad_unittest.cc ('k') | ui/gfx/geometry/rect_f.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/geometry/rect.h
diff --git a/ui/gfx/geometry/rect.h b/ui/gfx/geometry/rect.h
index 28d37bc31b3013dcdc9ee96a325a4f8c1012b9f5..83258fd7e143252c17bffe779f5119af911c74ea 100644
--- a/ui/gfx/geometry/rect.h
+++ b/ui/gfx/geometry/rect.h
@@ -13,6 +13,7 @@
#define UI_GFX_GEOMETRY_RECT_H_
#include <cmath>
+#include <iosfwd>
#include <string>
#include "ui/gfx/geometry/point.h"
@@ -134,6 +135,11 @@ inline Rect ScaleToEnclosedRect(const Rect& rect, float scale) {
extern template class RectBase<Rect, Point, Size, Insets, Vector2d, int>;
#endif
+// This is declared here for use in gtest-based unit tests but is defined in
+// the gfx_test_support target. Depend on that to use this in your unit test.
+// This should not be used in production code - call ToString() instead.
+void PrintTo(const Rect& rect, ::std::ostream* os);
+
} // namespace gfx
#endif // UI_GFX_GEOMETRY_RECT_H_
« no previous file with comments | « ui/gfx/geometry/quad_unittest.cc ('k') | ui/gfx/geometry/rect_f.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698