ui: Add a minor unittest to check to work correctly with a empty clip in Blit.ScrollCanvas

BUG=none

Review URL: https://codereview.chromium.org/390083002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284039 0039d316-1c4b-4281-b951-d872f2087c98
parent 5f6ac1f8
...@@ -80,6 +80,11 @@ TEST(Blit, ScrollCanvas) { ...@@ -80,6 +80,11 @@ TEST(Blit, ScrollCanvas) {
gfx::Vector2d(0, 0)); gfx::Vector2d(0, 0));
VerifyCanvasValues<5, 5>(canvas.get(), initial_values); 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. // Scroll the center 3 pixels up one.
gfx::Rect center_three(1, 1, 3, 3); gfx::Rect center_three(1, 1, 3, 3);
gfx::ScrollCanvas(canvas.get(), center_three, gfx::Vector2d(0, -1)); gfx::ScrollCanvas(canvas.get(), center_three, gfx::Vector2d(0, -1));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment