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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/frame/FrameView.h" 5 #include "core/frame/FrameView.h"
6 6
7 #include "bindings/core/v8/ExceptionStatePlaceholder.h" 7 #include "bindings/core/v8/ExceptionStatePlaceholder.h"
8 #include "core/frame/Settings.h" 8 #include "core/frame/Settings.h"
9 #include "core/html/HTMLElement.h" 9 #include "core/html/HTMLElement.h"
10 #include "core/layout/LayoutObject.h" 10 #include "core/layout/LayoutObject.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 // performance. See crbug.com/586852 for details. 160 // performance. See crbug.com/586852 for details.
161 TEST_P(FrameViewTest, HideTooltipWhenScrollPositionChanges) 161 TEST_P(FrameViewTest, HideTooltipWhenScrollPositionChanges)
162 { 162 {
163 document().body()->setInnerHTML("<div style='width:1000px;height:1000px'></d iv>", ASSERT_NO_EXCEPTION); 163 document().body()->setInnerHTML("<div style='width:1000px;height:1000px'></d iv>", ASSERT_NO_EXCEPTION);
164 document().view()->updateAllLifecyclePhases(); 164 document().view()->updateAllLifecyclePhases();
165 165
166 EXPECT_CALL(chromeClient(), setToolTip(String(), _)); 166 EXPECT_CALL(chromeClient(), setToolTip(String(), _));
167 document().view()->layoutViewportScrollableArea()->setScrollPosition(DoubleP oint(1, 1), UserScroll); 167 document().view()->layoutViewportScrollableArea()->setScrollPosition(DoubleP oint(1, 1), UserScroll);
168 } 168 }
169 169
170 TEST_P(FrameViewTest, NoOverflowInIncrementVisuallyNonEmptyPixelCount)
171 {
172 EXPECT_FALSE(document().view()->isVisuallyNonEmpty());
173 document().view()->incrementVisuallyNonEmptyPixelCount(IntSize(2147483647, 2 147483647));
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
174 EXPECT_TRUE(document().view()->isVisuallyNonEmpty());
175 }
176
170 } // namespace 177 } // namespace
171 } // namespace blink 178 } // namespace blink
OLDNEW
« 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