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

Unified Diff: ui/gfx/paint_vector_icon_unittest.cc

Issue 2739533003: Revert of Make cc/paint have concrete types (Closed)
Patch Set: Created 3 years, 9 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 | « third_party/WebKit/Source/platform/graphics/paint/PaintCanvas.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/paint_vector_icon_unittest.cc
diff --git a/ui/gfx/paint_vector_icon_unittest.cc b/ui/gfx/paint_vector_icon_unittest.cc
index 1adbb3fe3c8f14603d8020eeb83756871b73debd..6786bf12d0187affcaf2952c4352264efdd1f08e 100644
--- a/ui/gfx/paint_vector_icon_unittest.cc
+++ b/ui/gfx/paint_vector_icon_unittest.cc
@@ -7,8 +7,6 @@
#include <gtest/gtest.h>
#include <vector>
-#include "cc/paint/paint_record.h"
-#include "cc/paint/paint_recorder.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkPath.h"
#include "ui/gfx/canvas.h"
@@ -38,8 +36,8 @@
// Tests that a relative move to command (R_MOVE_TO) after a close command
// (CLOSE) uses the correct starting point. See crbug.com/697497
TEST(VectorIconTest, RelativeMoveToAfterClose) {
- cc::PaintRecorder recorder;
- Canvas canvas(recorder.beginRecording(100, 100), 1.0f);
+ MockCanvas mock(100, 100);
+ Canvas canvas(&mock, 1.0f);
const PathElement elements[] = {
MOVE_TO, 4, 5,
@@ -53,11 +51,6 @@
const VectorIcon icon = {elements, nullptr};
PaintVectorIcon(&canvas, icon, 100, SK_ColorMAGENTA);
- sk_sp<cc::PaintRecord> record = recorder.finishRecordingAsPicture();
-
- MockCanvas mock(100, 100);
- record->playback(&mock);
-
ASSERT_EQ(1U, mock.paths().size());
SkPoint last_point;
EXPECT_TRUE(mock.paths()[0].getLastPt(&last_point));
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/paint/PaintCanvas.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698