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

Unified Diff: third_party/WebKit/Source/core/page/PrintContextTest.cpp

Issue 1766723003: revise unittest for annotations in preparation for skia change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/page/PrintContextTest.cpp
diff --git a/third_party/WebKit/Source/core/page/PrintContextTest.cpp b/third_party/WebKit/Source/core/page/PrintContextTest.cpp
index d8bc7ea41ed25249ee45f1ca8e555c4f3b0db52d..5fb07b17ddd64980920797befca2816bb27a7708 100644
--- a/third_party/WebKit/Source/core/page/PrintContextTest.cpp
+++ b/third_party/WebKit/Source/core/page/PrintContextTest.cpp
@@ -18,6 +18,7 @@
#include "platform/scroll/ScrollbarTheme.h"
#include "platform/text/TextStream.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/skia/include/core/SkAnnotation.h"
#include "third_party/skia/include/core/SkCanvas.h"
namespace blink {
@@ -52,12 +53,11 @@ public:
#ifdef SK_SUPPORT_NEW_ANNOTATION_CANVAS_VIRTUAL
void onDrawAnnotation(const SkRect& rect, const char key[], SkData* value) override
{
- if (rect.width() == 0 && rect.height()) {
- ASSERT_EQ(1u, count);
+ if (rect.width() == 0 && rect.height() == 0) {
SkPoint point = getTotalMatrix().mapXY(rect.x(), rect.y());
Operation operation = {
DrawPoint, SkRect::MakeXYWH(point.x(), point.y(), 0, 0) };
- m_recordedOperations.append(operation);
+ m_recordedOperations.append(operation);
} else {
Operation operation = { DrawRect, rect };
getTotalMatrix().mapRect(&operation.rect);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698