| OLD | NEW |
| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 // performance. See crbug.com/586852 for details. | 105 // performance. See crbug.com/586852 for details. |
| 106 TEST_P(FrameViewTest, HideTooltipWhenScrollPositionChanges) | 106 TEST_P(FrameViewTest, HideTooltipWhenScrollPositionChanges) |
| 107 { | 107 { |
| 108 document().body()->setInnerHTML("<div style='width:1000px;height:1000px'></d
iv>", ASSERT_NO_EXCEPTION); | 108 document().body()->setInnerHTML("<div style='width:1000px;height:1000px'></d
iv>", ASSERT_NO_EXCEPTION); |
| 109 document().view()->updateAllLifecyclePhases(); | 109 document().view()->updateAllLifecyclePhases(); |
| 110 | 110 |
| 111 EXPECT_CALL(chromeClient(), mockSetToolTip(document().frame(), String(), _))
; | 111 EXPECT_CALL(chromeClient(), mockSetToolTip(document().frame(), String(), _))
; |
| 112 document().view()->layoutViewportScrollableArea()->setScrollPosition(DoubleP
oint(1, 1), UserScroll); | 112 document().view()->layoutViewportScrollableArea()->setScrollPosition(DoubleP
oint(1, 1), UserScroll); |
| 113 } | 113 } |
| 114 | 114 |
| 115 // NoOverflowInIncrementVisuallyNonEmptyPixelCount tests fail if the number of |
| 116 // pixels is calculated in 32-bit integer, because 65536 * 65536 would become 0 |
| 117 // if it was calculated in 32-bit and thus it would be considered as empty. |
| 118 TEST_P(FrameViewTest, NoOverflowInIncrementVisuallyNonEmptyPixelCount) |
| 119 { |
| 120 EXPECT_FALSE(document().view()->isVisuallyNonEmpty()); |
| 121 document().view()->incrementVisuallyNonEmptyPixelCount(IntSize(65536, 65536)
); |
| 122 EXPECT_TRUE(document().view()->isVisuallyNonEmpty()); |
| 123 } |
| 124 |
| 115 } // namespace | 125 } // namespace |
| 116 } // namespace blink | 126 } // namespace blink |
| OLD | NEW |