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

Unified Diff: cc/base/tiling_data_unittest.cc

Issue 188863002: cc: Spiral iterator fix for negative center. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | « cc/base/tiling_data.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/base/tiling_data_unittest.cc
diff --git a/cc/base/tiling_data_unittest.cc b/cc/base/tiling_data_unittest.cc
index c81b5463fb69d8b6b42b4158e32f56b53417aa89..d5b639f071c76b5316790f71098cdd3cc4a2ac0f 100644
--- a/cc/base/tiling_data_unittest.cc
+++ b/cc/base/tiling_data_unittest.cc
@@ -1708,6 +1708,32 @@ TEST(TilingDataTest, SpiralDifferenceIteratorEdgeCases) {
expected.clear();
TestSpiralIterate(__LINE__, tiling_data, consider, ignore, center, expected);
+
+ // Center is just to the left of cover, and off of the tiling's left side.
+ consider = gfx::Rect(0, 0, 30, 30);
+ ignore = gfx::Rect();
+ center = gfx::Rect(-20, 0, 19, 30);
+
+ // Layout of the tiling data, and expected return order:
+ // x 0 1 2
+ // y.------
+ // *0| 3 6 9
+ // *1| 2 5 8
+ // *2| 1 4 7
+ expected.clear();
+
+ expected.push_back(std::make_pair(0, 2));
+ expected.push_back(std::make_pair(0, 1));
+ expected.push_back(std::make_pair(0, 0));
+ expected.push_back(std::make_pair(1, 2));
+ expected.push_back(std::make_pair(1, 1));
+ expected.push_back(std::make_pair(1, 0));
+ expected.push_back(std::make_pair(2, 2));
+ expected.push_back(std::make_pair(2, 1));
+ expected.push_back(std::make_pair(2, 0));
+
+ TestSpiralIterate(__LINE__, tiling_data, consider, ignore, center, expected);
}
} // namespace
+
} // namespace cc
« no previous file with comments | « cc/base/tiling_data.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698