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

Side by Side Diff: third_party/WebKit/Source/web/tests/VisualViewportTest.cpp

Issue 2318913002: Rename Document::attach/detachLayoutTree to Document::initialize/shutdown (Closed)
Patch Set: temp Created 4 years, 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/VisualViewport.h" 5 #include "core/frame/VisualViewport.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/frame/FrameHost.h" 8 #include "core/frame/FrameHost.h"
9 #include "core/frame/FrameView.h" 9 #include "core/frame/FrameView.h"
10 #include "core/frame/LocalFrame.h" 10 #include "core/frame/LocalFrame.h"
(...skipping 1625 matching lines...) Expand 10 before | Expand all | Expand 10 after
1636 TEST_P(ParameterizedVisualViewportTest, TestMainFrameInitializationSizing) 1636 TEST_P(ParameterizedVisualViewportTest, TestMainFrameInitializationSizing)
1637 { 1637 {
1638 initializeWithAndroidSettings(); 1638 initializeWithAndroidSettings();
1639 1639
1640 webViewImpl()->resize(IntSize(100, 200)); 1640 webViewImpl()->resize(IntSize(100, 200));
1641 1641
1642 registerMockedHttpURLLoad("content-width-1000-min-scale.html"); 1642 registerMockedHttpURLLoad("content-width-1000-min-scale.html");
1643 navigateTo(m_baseURL + "content-width-1000-min-scale.html"); 1643 navigateTo(m_baseURL + "content-width-1000-min-scale.html");
1644 1644
1645 WebLocalFrameImpl* localFrame = webViewImpl()->mainFrameImpl(); 1645 WebLocalFrameImpl* localFrame = webViewImpl()->mainFrameImpl();
1646 // The detachLayoutTree() and dispose() calls are a hack to prevent this tes t 1646 // The shutdown() calls are a hack to prevent this test
1647 // from violating invariants about frame state during navigation/detach. 1647 // from violating invariants about frame state during navigation/detach.
1648 localFrame->frame()->document()->detachLayoutTree(); 1648 localFrame->frame()->document()->shutdown();
1649 localFrame->createFrameView(); 1649 localFrame->createFrameView();
1650 1650
1651 FrameView& frameView = *localFrame->frameView(); 1651 FrameView& frameView = *localFrame->frameView();
1652 EXPECT_SIZE_EQ(IntSize(200, 400), frameView.frameRect().size()); 1652 EXPECT_SIZE_EQ(IntSize(200, 400), frameView.frameRect().size());
1653 frameView.dispose(); 1653 frameView.dispose();
1654 } 1654 }
1655 1655
1656 // Tests that the maximum scroll offset of the viewport can be fractional. 1656 // Tests that the maximum scroll offset of the viewport can be fractional.
1657 TEST_P(ParameterizedVisualViewportTest, FractionalMaxScrollOffset) 1657 TEST_P(ParameterizedVisualViewportTest, FractionalMaxScrollOffset)
1658 { 1658 {
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
1918 1918
1919 EXPECT_POINT_EQ( 1919 EXPECT_POINT_EQ(
1920 DoublePoint(), 1920 DoublePoint(),
1921 frameView.layoutViewportScrollableArea()->scrollPositionDouble()); 1921 frameView.layoutViewportScrollableArea()->scrollPositionDouble());
1922 EXPECT_EQ(600, scroller->scrollTop()); 1922 EXPECT_EQ(600, scroller->scrollTop());
1923 1923
1924 RuntimeEnabledFeatures::setSetRootScrollerEnabled(wasRootScrollerEnabled); 1924 RuntimeEnabledFeatures::setSetRootScrollerEnabled(wasRootScrollerEnabled);
1925 } 1925 }
1926 1926
1927 } // namespace 1927 } // namespace
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/ScrollingCoordinatorTest.cpp ('k') | third_party/WebKit/Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698