| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 11138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11149 WebMouseEvent mouseReleaseEvent( | 11149 WebMouseEvent mouseReleaseEvent( |
| 11150 WebInputEvent::MouseUp, WebFloatPoint(1, 1), WebFloatPoint(1, 1), | 11150 WebInputEvent::MouseUp, WebFloatPoint(1, 1), WebFloatPoint(1, 1), |
| 11151 WebPointerProperties::Button::Left, 0, | 11151 WebPointerProperties::Button::Left, 0, |
| 11152 WebInputEvent::Modifiers::LeftButtonDown, TimeTicks::Now().InSeconds()); | 11152 WebInputEvent::Modifiers::LeftButtonDown, TimeTicks::Now().InSeconds()); |
| 11153 mouseReleaseEvent.setFrameScale(1); | 11153 mouseReleaseEvent.setFrameScale(1); |
| 11154 document->frame()->eventHandler().handleMouseReleaseEvent(mouseReleaseEvent); | 11154 document->frame()->eventHandler().handleMouseReleaseEvent(mouseReleaseEvent); |
| 11155 EXPECT_EQ(scrollbar->pressedPart(), ScrollbarPart::NoPart); | 11155 EXPECT_EQ(scrollbar->pressedPart(), ScrollbarPart::NoPart); |
| 11156 EXPECT_EQ(scrollbar->hoveredPart(), ScrollbarPart::NoPart); | 11156 EXPECT_EQ(scrollbar->hoveredPart(), ScrollbarPart::NoPart); |
| 11157 } | 11157 } |
| 11158 | 11158 |
| 11159 TEST_F(WebFrameTest, |
| 11160 CustomScrollbarInOverlayScrollbarThemeWillNotCauseDCHECKFails) { |
| 11161 registerMockedHttpURLLoad( |
| 11162 "custom-scrollbar-dcheck-failed-when-paint-scroll-corner.html"); |
| 11163 FrameTestHelpers::WebViewHelper webViewHelper; |
| 11164 WebViewImpl* webView = webViewHelper.initializeAndLoad( |
| 11165 m_baseURL + |
| 11166 "custom-scrollbar-dcheck-failed-when-paint-scroll-corner.html"); |
| 11167 |
| 11168 webViewHelper.resize(WebSize(200, 200)); |
| 11169 |
| 11170 // No DCHECK Fails. Issue 676678. |
| 11171 webView->updateAllLifecyclePhases(); |
| 11172 } |
| 11173 |
| 11159 static void disableCompositing(WebSettings* settings) { | 11174 static void disableCompositing(WebSettings* settings) { |
| 11160 settings->setAcceleratedCompositingEnabled(false); | 11175 settings->setAcceleratedCompositingEnabled(false); |
| 11161 settings->setPreferCompositingToLCDTextEnabled(false); | 11176 settings->setPreferCompositingToLCDTextEnabled(false); |
| 11162 } | 11177 } |
| 11163 | 11178 |
| 11164 // Make sure overlay scrollbars on non-composited scrollers fade out and set | 11179 // Make sure overlay scrollbars on non-composited scrollers fade out and set |
| 11165 // the hidden bit as needed. | 11180 // the hidden bit as needed. |
| 11166 TEST_F(WebFrameTest, TestNonCompositedOverlayScrollbarsFade) { | 11181 TEST_F(WebFrameTest, TestNonCompositedOverlayScrollbarsFade) { |
| 11167 FrameTestHelpers::WebViewHelper webViewHelper; | 11182 FrameTestHelpers::WebViewHelper webViewHelper; |
| 11168 WebViewImpl* webViewImpl = webViewHelper.initialize( | 11183 WebViewImpl* webViewImpl = webViewHelper.initialize( |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11362 FrameTestHelpers::WebViewHelper openerHelper; | 11377 FrameTestHelpers::WebViewHelper openerHelper; |
| 11363 openerHelper.initialize(false, nullptr, &openerWebViewClient); | 11378 openerHelper.initialize(false, nullptr, &openerWebViewClient); |
| 11364 FrameTestHelpers::WebViewHelper helper; | 11379 FrameTestHelpers::WebViewHelper helper; |
| 11365 helper.initializeWithOpener(openerHelper.webView()->mainFrame()); | 11380 helper.initializeWithOpener(openerHelper.webView()->mainFrame()); |
| 11366 | 11381 |
| 11367 openerHelper.reset(); | 11382 openerHelper.reset(); |
| 11368 EXPECT_EQ(nullptr, helper.webView()->mainFrameImpl()->opener()); | 11383 EXPECT_EQ(nullptr, helper.webView()->mainFrameImpl()->opener()); |
| 11369 } | 11384 } |
| 11370 | 11385 |
| 11371 } // namespace blink | 11386 } // namespace blink |
| OLD | NEW |