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

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

Issue 2848513002: Introduce the abstract class WebViewBase, to decouple WebViewImpl. (Closed)
Patch Set: Fix typo. Created 3 years, 7 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 #include "core/exported/WebViewBase.h"
1 #include "core/frame/FrameView.h" 2 #include "core/frame/FrameView.h"
2 #include "core/loader/DocumentLoader.h" 3 #include "core/loader/DocumentLoader.h"
3 #include "core/loader/FrameLoader.h" 4 #include "core/loader/FrameLoader.h"
4 #include "platform/testing/URLTestHelpers.h" 5 #include "platform/testing/URLTestHelpers.h"
5 #include "platform/testing/UnitTestHelpers.h" 6 #include "platform/testing/UnitTestHelpers.h"
6 #include "public/platform/Platform.h" 7 #include "public/platform/Platform.h"
7 #include "public/platform/WebInputEvent.h" 8 #include "public/platform/WebInputEvent.h"
8 #include "public/platform/WebURLLoaderMockFactory.h" 9 #include "public/platform/WebURLLoaderMockFactory.h"
9 #include "public/web/WebFrame.h" 10 #include "public/web/WebFrame.h"
10 #include "public/web/WebFrameClient.h" 11 #include "public/web/WebFrameClient.h"
11 #include "public/web/WebHistoryItem.h" 12 #include "public/web/WebHistoryItem.h"
12 #include "public/web/WebScriptSource.h" 13 #include "public/web/WebScriptSource.h"
13 #include "public/web/WebSettings.h" 14 #include "public/web/WebSettings.h"
14 #include "public/web/WebView.h" 15 #include "public/web/WebView.h"
15 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
16 #include "web/WebLocalFrameImpl.h" 17 #include "web/WebLocalFrameImpl.h"
17 #include "web/WebViewImpl.h"
18 #include "web/tests/FrameTestHelpers.h" 18 #include "web/tests/FrameTestHelpers.h"
19 19
20 namespace blink { 20 namespace blink {
21 21
22 class ProgrammaticScrollTest : public ::testing::Test { 22 class ProgrammaticScrollTest : public ::testing::Test {
23 public: 23 public:
24 ProgrammaticScrollTest() : base_url_("http://www.test.com/") {} 24 ProgrammaticScrollTest() : base_url_("http://www.test.com/") {}
25 25
26 void TearDown() override { 26 void TearDown() override {
27 Platform::Current() 27 Platform::Current()
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // FrameLoader::restoreScrollPositionAndViewState flows differently if scale 97 // FrameLoader::restoreScrollPositionAndViewState flows differently if scale
98 // is zero. 98 // is zero.
99 loader.RestoreScrollPositionAndViewState(); 99 loader.RestoreScrollPositionAndViewState();
100 100
101 // Expect that only the scroll position was restored. 101 // Expect that only the scroll position was restored.
102 EXPECT_EQ(3.0f, web_view_impl->PageScaleFactor()); 102 EXPECT_EQ(3.0f, web_view_impl->PageScaleFactor());
103 EXPECT_EQ(400, web_view_impl->MainFrameImpl()->GetScrollOffset().height); 103 EXPECT_EQ(400, web_view_impl->MainFrameImpl()->GetScrollOffset().height);
104 } 104 }
105 105
106 } // namespace blink 106 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/NGInlineLayoutTest.cpp ('k') | third_party/WebKit/Source/web/tests/ResizeObserverTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698