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

Unified Diff: Source/web/tests/WebFrameTest.cpp

Issue 235323005: Revert of Optimize repaint on FrameView resize (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 8 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 | « Source/core/rendering/RenderObject.h ('k') | Source/web/tests/data/repaint/size-change-repaint1.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/WebFrameTest.cpp
diff --git a/Source/web/tests/WebFrameTest.cpp b/Source/web/tests/WebFrameTest.cpp
index 822f1261c09cca97a1f767ae5722c1cfd1a0a21b..04e0ee0b2a5e2850847cbdc0d20aae589978e93c 100644
--- a/Source/web/tests/WebFrameTest.cpp
+++ b/Source/web/tests/WebFrameTest.cpp
@@ -5288,79 +5288,6 @@ TEST_F(WebFrameTest, CreateChildFrameFailure)
EXPECT_EQ(1, client.callCount());
}
-TEST_F(WebFrameTest, DISABLED_sizeChangeRepaint)
-{
- const char* kTests[] = {
- "repaint/size-change-repaint1.html",
- "repaint/size-change-repaint2.html",
- "repaint/size-change-repaint3.html",
- "repaint/size-change-repaint4.html",
- "repaint/size-change-repaint5.html",
- "repaint/size-change-repaint6.html",
- "repaint/size-change-repaint7.html",
- "repaint/size-change-repaint8.html",
- "repaint/size-change-repaint9.html",
- "repaint/size-change-repaint10.html",
- };
-
- const WebCore::IntRect kExpectedRepaintOnHeightChange[] = {
- WebCore::IntRect(0, 200, 200, 100),
- WebCore::IntRect(0, 200, 200, 100),
- WebCore::IntRect(0, 200, 200, 100),
- WebCore::IntRect(0, 0, 200, 300),
- WebCore::IntRect(0, 0, 200, 300),
- WebCore::IntRect(0, 0, 200, 300),
- WebCore::IntRect(0, 100, 200, 200),
- WebCore::IntRect(0, 100, 200, 200),
- WebCore::IntRect(0, 160, 200, 140),
- WebCore::IntRect(0, 50, 200, 250),
- };
-
- const WebCore::IntRect kExpectedRepaintOnWidthChange[] = {
- WebCore::IntRect(0, 0, 300, 300),
- WebCore::IntRect(0, 0, 300, 300),
- WebCore::IntRect(0, 0, 300, 300),
- WebCore::IntRect(0, 0, 300, 300),
- WebCore::IntRect(0, 0, 300, 300),
- WebCore::IntRect(0, 0, 300, 300),
- WebCore::IntRect(0, 0, 300, 300),
- WebCore::IntRect(0, 0, 300, 300),
- WebCore::IntRect(0, 0, 300, 300),
- WebCore::IntRect(0, 0, 300, 300),
- };
-
- UseMockScrollbarSettings mockScrollbarSettings;
-
- FrameTestHelpers::WebViewHelper webViewHelper;
- WebViewImpl* webView = webViewHelper.initialize(true);
-
- for (size_t i = 0; i < arraysize(kTests); ++i) {
- SCOPED_TRACE(kTests[i]);
- registerMockedHttpURLLoad(kTests[i]);
- FrameTestHelpers::loadFrame(webView->mainFrame(), m_baseURL + kTests[i]);
- Platform::current()->unitTestSupport()->serveAsynchronousMockedRequests();
-
- webView->resize(WebSize(200, 200));
- webView->layout();
-
- // Change height.
- WebCore::FrameView* frameView = webView->mainFrameImpl()->frameView();
- frameView->setTracksRepaints(true);
- webView->resize(WebSize(200, 300));
- webView->layout();
- WebCore::IntRect repaintRect = WebCore::intersection(WebCore::IntRect(0, 0, 200, 300), WebCore::unionRect(frameView->trackedRepaintRects()));
- EXPECT_EQ_RECT(kExpectedRepaintOnHeightChange[i], repaintRect);
-
- // Change width.
- frameView->setTracksRepaints(true);
- webView->resize(WebSize(300, 300));
- webView->layout();
- repaintRect = WebCore::intersection(WebCore::IntRect(0, 0, 300, 300), WebCore::unionRect(frameView->trackedRepaintRects()));
- EXPECT_EQ_RECT(kExpectedRepaintOnWidthChange[i], repaintRect);
- frameView->setTracksRepaints(false);
- }
-}
-
TEST_F(WebFrameTest, fixedPositionInFixedViewport)
{
UseMockScrollbarSettings mockScrollbarSettings;
« no previous file with comments | « Source/core/rendering/RenderObject.h ('k') | Source/web/tests/data/repaint/size-change-repaint1.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698