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

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

Issue 2896563002: Update WebLocalFrameImpl with WebLocalFrameBase to break dependencies. (Closed)
Patch Set: Rebase 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
« no previous file with comments | « third_party/WebKit/Source/web/tests/sim/SimTest.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "web/tests/sim/SimTest.h" 5 #include "web/tests/sim/SimTest.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/exported/WebViewBase.h" 8 #include "core/exported/WebViewBase.h"
9 #include "core/frame/LocalDOMWindow.h" 9 #include "core/frame/LocalDOMWindow.h"
10 #include "core/frame/WebLocalFrameBase.h"
10 #include "platform/LayoutTestSupport.h" 11 #include "platform/LayoutTestSupport.h"
11 #include "platform/scroll/ScrollbarTheme.h" 12 #include "platform/scroll/ScrollbarTheme.h"
12 #include "platform/testing/UnitTestHelpers.h" 13 #include "platform/testing/UnitTestHelpers.h"
13 #include "public/platform/WebCache.h" 14 #include "public/platform/WebCache.h"
14 #include "web/WebLocalFrameImpl.h"
15 15
16 namespace blink { 16 namespace blink {
17 17
18 SimTest::SimTest() : web_view_client_(compositor_), web_frame_client_(*this) { 18 SimTest::SimTest() : web_view_client_(compositor_), web_frame_client_(*this) {
19 Document::SetThreadedParsingEnabledForTesting(false); 19 Document::SetThreadedParsingEnabledForTesting(false);
20 // Use the mock theme to get more predictable code paths, this also avoids 20 // Use the mock theme to get more predictable code paths, this also avoids
21 // the OS callbacks in ScrollAnimatorMac which can schedule frames 21 // the OS callbacks in ScrollAnimatorMac which can schedule frames
22 // unpredictably since the OS will randomly call into blink for 22 // unpredictably since the OS will randomly call into blink for
23 // updateScrollerStyleForNewRecommendedScrollerStyle which then does 23 // updateScrollerStyleForNewRecommendedScrollerStyle which then does
24 // FrameView::scrollbarStyleChanged and will adjust the scrollbar existence 24 // FrameView::scrollbarStyleChanged and will adjust the scrollbar existence
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 } 59 }
60 60
61 Document& SimTest::GetDocument() { 61 Document& SimTest::GetDocument() {
62 return *WebView().MainFrameImpl()->GetFrame()->GetDocument(); 62 return *WebView().MainFrameImpl()->GetFrame()->GetDocument();
63 } 63 }
64 64
65 WebViewBase& SimTest::WebView() { 65 WebViewBase& SimTest::WebView() {
66 return *web_view_helper_.WebView(); 66 return *web_view_helper_.WebView();
67 } 67 }
68 68
69 WebLocalFrameImpl& SimTest::MainFrame() { 69 WebLocalFrameBase& SimTest::MainFrame() {
70 return *WebView().MainFrameImpl(); 70 return *WebView().MainFrameImpl();
71 } 71 }
72 72
73 const SimWebViewClient& SimTest::WebViewClient() const { 73 const SimWebViewClient& SimTest::WebViewClient() const {
74 return web_view_client_; 74 return web_view_client_;
75 } 75 }
76 76
77 SimCompositor& SimTest::Compositor() { 77 SimCompositor& SimTest::Compositor() {
78 return compositor_; 78 return compositor_;
79 } 79 }
80 80
81 void SimTest::AddConsoleMessage(const String& message) { 81 void SimTest::AddConsoleMessage(const String& message) {
82 console_messages_.push_back(message); 82 console_messages_.push_back(message);
83 } 83 }
84 84
85 } // namespace blink 85 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/sim/SimTest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698