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

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

Issue 2928033002: Move GetDocument method from WebFrame to WebLocalFrame. (Closed)
Patch Set: Split a DCHECK in two as suggested by boliu@. Created 3 years, 6 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 <memory>
8
7 #include "core/dom/Document.h" 9 #include "core/dom/Document.h"
8 #include "core/frame/BrowserControls.h" 10 #include "core/frame/BrowserControls.h"
9 #include "core/frame/FrameTestHelpers.h" 11 #include "core/frame/FrameTestHelpers.h"
10 #include "core/frame/LocalFrame.h" 12 #include "core/frame/LocalFrame.h"
11 #include "core/frame/LocalFrameView.h" 13 #include "core/frame/LocalFrameView.h"
12 #include "core/frame/WebLocalFrameBase.h" 14 #include "core/frame/WebLocalFrameBase.h"
13 #include "core/html/HTMLBodyElement.h" 15 #include "core/html/HTMLBodyElement.h"
14 #include "core/html/HTMLElement.h" 16 #include "core/html/HTMLElement.h"
15 #include "core/input/EventHandler.h" 17 #include "core/input/EventHandler.h"
16 #include "core/layout/LayoutObject.h" 18 #include "core/layout/LayoutObject.h"
(...skipping 1852 matching lines...) Expand 10 before | Expand all | Expand 10 after
1869 1871
1870 TEST_P(VisualViewportTest, AccessibilityHitTestWhileZoomedIn) { 1872 TEST_P(VisualViewportTest, AccessibilityHitTestWhileZoomedIn) {
1871 InitializeWithDesktopSettings(accessibilitySettings); 1873 InitializeWithDesktopSettings(accessibilitySettings);
1872 1874
1873 RegisterMockedHttpURLLoad("hit-test.html"); 1875 RegisterMockedHttpURLLoad("hit-test.html");
1874 NavigateTo(base_url_ + "hit-test.html"); 1876 NavigateTo(base_url_ + "hit-test.html");
1875 1877
1876 WebViewImpl()->Resize(IntSize(500, 500)); 1878 WebViewImpl()->Resize(IntSize(500, 500));
1877 WebViewImpl()->UpdateAllLifecyclePhases(); 1879 WebViewImpl()->UpdateAllLifecyclePhases();
1878 1880
1879 WebDocument web_doc = WebViewImpl()->MainFrame()->GetDocument(); 1881 WebDocument web_doc = WebViewImpl()->MainFrameImpl()->GetDocument();
1880 LocalFrameView& frame_view = *WebViewImpl()->MainFrameImpl()->GetFrameView(); 1882 LocalFrameView& frame_view = *WebViewImpl()->MainFrameImpl()->GetFrameView();
1881 1883
1882 WebViewImpl()->SetPageScaleFactor(2); 1884 WebViewImpl()->SetPageScaleFactor(2);
1883 WebViewImpl()->SetVisualViewportOffset(WebFloatPoint(200, 230)); 1885 WebViewImpl()->SetVisualViewportOffset(WebFloatPoint(200, 230));
1884 frame_view.LayoutViewportScrollableArea()->SetScrollOffset( 1886 frame_view.LayoutViewportScrollableArea()->SetScrollOffset(
1885 ScrollOffset(400, 1100), kProgrammaticScroll); 1887 ScrollOffset(400, 1100), kProgrammaticScroll);
1886 1888
1887 // FIXME(504057): PaintLayerScrollableArea dirties the compositing state. 1889 // FIXME(504057): PaintLayerScrollableArea dirties the compositing state.
1888 ForceFullCompositingUpdate(); 1890 ForceFullCompositingUpdate();
1889 1891
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
2420 " margin: 0px;" 2422 " margin: 0px;"
2421 " }" 2423 " }"
2422 " div { height:110vh; width: 110vw; }" 2424 " div { height:110vh; width: 110vw; }"
2423 "</style>" 2425 "</style>"
2424 "<div></div>", 2426 "<div></div>",
2425 base_url); 2427 base_url);
2426 } 2428 }
2427 2429
2428 } // namespace 2430 } // namespace
2429 } // namespace blink 2431 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/TouchActionTest.cpp ('k') | third_party/WebKit/Source/web/tests/WebDocumentTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698