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

Unified Diff: third_party/WebKit/Source/core/frame/FrameViewTest.cpp

Issue 2229753002: Test that FrameView::incrementVisuallyNonEmptyPixelCount() doesn't overflow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use max value of 32-bit signed integer Created 4 years, 4 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/frame/FrameViewTest.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameViewTest.cpp b/third_party/WebKit/Source/core/frame/FrameViewTest.cpp
index 5438ffa3f6faa0fd4d4b988dacfb5034e893a72a..c9e61146d518e021386e43f3c2501fd14544c660 100644
--- a/third_party/WebKit/Source/core/frame/FrameViewTest.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameViewTest.cpp
@@ -167,5 +167,12 @@ TEST_P(FrameViewTest, HideTooltipWhenScrollPositionChanges)
document().view()->layoutViewportScrollableArea()->setScrollPosition(DoublePoint(1, 1), UserScroll);
}
+TEST_P(FrameViewTest, NoOverflowInIncrementVisuallyNonEmptyPixelCount)
+{
+ EXPECT_FALSE(document().view()->isVisuallyNonEmpty());
+ document().view()->incrementVisuallyNonEmptyPixelCount(IntSize(2147483647, 2147483647));
bokan 2016/08/09 14:10:32 This won't actually fail unless run on the sanitiz
hiroshige 2016/08/12 06:30:16 2147483647 * 2147483647 would become 4 if calculat
+ EXPECT_TRUE(document().view()->isVisuallyNonEmpty());
+}
+
} // namespace
} // namespace blink
« 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