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

Unified Diff: third_party/WebKit/Source/core/paint/NinePieceImageGridTest.cpp

Issue 1901103002: Compensate for source scaling in hidpi mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add DOCTYPE to added test. Created 4 years, 8 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/core/paint/NinePieceImageGridTest.cpp
diff --git a/third_party/WebKit/Source/core/paint/NinePieceImageGridTest.cpp b/third_party/WebKit/Source/core/paint/NinePieceImageGridTest.cpp
index 5244aab8e29047dca3cac30c85be47bb489ab643..ca6a5283d280127325ee85f9717ef046dab099da 100644
--- a/third_party/WebKit/Source/core/paint/NinePieceImageGridTest.cpp
+++ b/third_party/WebKit/Source/core/paint/NinePieceImageGridTest.cpp
@@ -42,7 +42,7 @@ TEST_F(NinePieceImageGridTest, NinePieceImagePainting_NoDrawables)
NinePieceImageGrid grid = NinePieceImageGrid(ninePiece, imageSize, borderImageArea, borderWidths);
for (NinePiece piece = MinPiece; piece < MaxPiece; ++piece) {
- NinePieceImageGrid::NinePieceDrawInfo drawInfo = grid.getNinePieceDrawInfo(piece);
+ NinePieceImageGrid::NinePieceDrawInfo drawInfo = grid.getNinePieceDrawInfo(piece, 1);
EXPECT_FALSE(drawInfo.isDrawable);
}
}
@@ -60,7 +60,7 @@ TEST_F(NinePieceImageGridTest, NinePieceImagePainting_AllDrawable)
NinePieceImageGrid grid = NinePieceImageGrid(ninePiece, imageSize, borderImageArea, borderWidths);
for (NinePiece piece = MinPiece; piece < MaxPiece; ++piece) {
- NinePieceImageGrid::NinePieceDrawInfo drawInfo = grid.getNinePieceDrawInfo(piece);
+ NinePieceImageGrid::NinePieceDrawInfo drawInfo = grid.getNinePieceDrawInfo(piece, 1);
EXPECT_TRUE(drawInfo.isDrawable);
}
}
@@ -78,7 +78,7 @@ TEST_F(NinePieceImageGridTest, NinePieceImagePainting_NoFillMiddleNotDrawable)
NinePieceImageGrid grid = NinePieceImageGrid(ninePiece, imageSize, borderImageArea, borderWidths);
for (NinePiece piece = MinPiece; piece < MaxPiece; ++piece) {
- NinePieceImageGrid::NinePieceDrawInfo drawInfo = grid.getNinePieceDrawInfo(piece);
+ NinePieceImageGrid::NinePieceDrawInfo drawInfo = grid.getNinePieceDrawInfo(piece, 1);
if (piece != MiddlePiece)
EXPECT_TRUE(drawInfo.isDrawable);
else
@@ -109,7 +109,7 @@ TEST_F(NinePieceImageGridTest, NinePieceImagePainting_TopLeftDrawable)
for (const auto& testCase : testCases) {
NinePieceImageGrid grid = NinePieceImageGrid(ninePiece, imageSize, borderImageArea, testCase.borderWidths);
for (NinePiece piece = MinPiece; piece < MaxPiece; ++piece) {
- NinePieceImageGrid::NinePieceDrawInfo drawInfo = grid.getNinePieceDrawInfo(piece);
+ NinePieceImageGrid::NinePieceDrawInfo drawInfo = grid.getNinePieceDrawInfo(piece, 1);
if (piece == TopLeftPiece)
EXPECT_EQ(drawInfo.isDrawable, testCase.expectedIsDrawable);
}
@@ -132,7 +132,7 @@ TEST_F(NinePieceImageGridTest, NinePieceImagePainting_ScaleDownBorder)
NinePieceImageGrid grid = NinePieceImageGrid(ninePiece, imageSize, borderImageArea, borderWidths);
for (NinePiece piece = MinPiece; piece < MaxPiece; ++piece) {
- NinePieceImageGrid::NinePieceDrawInfo drawInfo = grid.getNinePieceDrawInfo(piece);
+ NinePieceImageGrid::NinePieceDrawInfo drawInfo = grid.getNinePieceDrawInfo(piece, 1);
if (drawInfo.isCornerPiece)
EXPECT_EQ(drawInfo.destination.size(), FloatSize(50, 50));
else
@@ -239,7 +239,7 @@ TEST_F(NinePieceImageGridTest, NinePieceImagePainting)
NinePieceImageGrid grid = NinePieceImageGrid(ninePiece, testCase.imageSize, testCase.borderImageArea, testCase.borderWidths);
for (NinePiece piece = MinPiece; piece < MaxPiece; ++piece) {
- NinePieceImageGrid::NinePieceDrawInfo drawInfo = grid.getNinePieceDrawInfo(piece);
+ NinePieceImageGrid::NinePieceDrawInfo drawInfo = grid.getNinePieceDrawInfo(piece, 1);
EXPECT_EQ(testCase.pieces[piece].isDrawable, drawInfo.isDrawable);
if (!testCase.pieces[piece].isDrawable)
continue;

Powered by Google App Engine
This is Rietveld 408576698