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

Unified Diff: ui/gfx/blit_unittest.cc

Issue 390083002: ui: Add a minor unittest to check to work correctly with a empty clip in Blit.ScrollCanvas (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/blit_unittest.cc
diff --git a/ui/gfx/blit_unittest.cc b/ui/gfx/blit_unittest.cc
index f52272e2610d1ccda9dad04908a029a4b82ac591..dea0139b020478d7e7c3117867b871063da72bad 100644
--- a/ui/gfx/blit_unittest.cc
+++ b/ui/gfx/blit_unittest.cc
@@ -80,6 +80,11 @@ TEST(Blit, ScrollCanvas) {
gfx::Vector2d(0, 0));
VerifyCanvasValues<5, 5>(canvas.get(), initial_values);
+ // Scroll with a empty clip and make sure it's a NOP.
+ gfx::Rect empty_clip(1, 1, 0, 0);
+ gfx::ScrollCanvas(canvas.get(), empty_clip, gfx::Vector2d(0, 1));
+ VerifyCanvasValues<5, 5>(canvas.get(), initial_values);
+
// Scroll the center 3 pixels up one.
gfx::Rect center_three(1, 1, 3, 3);
gfx::ScrollCanvas(canvas.get(), center_three, gfx::Vector2d(0, -1));
« 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