OLD | NEW |
1 #include "core/exported/WebViewBase.h" | 1 #include "core/exported/WebViewBase.h" |
2 #include "core/frame/LocalFrameView.h" | 2 #include "core/frame/LocalFrameView.h" |
| 3 #include "core/frame/WebLocalFrameBase.h" |
3 #include "core/loader/DocumentLoader.h" | 4 #include "core/loader/DocumentLoader.h" |
4 #include "core/loader/FrameLoader.h" | 5 #include "core/loader/FrameLoader.h" |
5 #include "platform/testing/URLTestHelpers.h" | 6 #include "platform/testing/URLTestHelpers.h" |
6 #include "platform/testing/UnitTestHelpers.h" | 7 #include "platform/testing/UnitTestHelpers.h" |
7 #include "public/platform/Platform.h" | 8 #include "public/platform/Platform.h" |
8 #include "public/platform/WebInputEvent.h" | 9 #include "public/platform/WebInputEvent.h" |
9 #include "public/platform/WebURLLoaderMockFactory.h" | 10 #include "public/platform/WebURLLoaderMockFactory.h" |
10 #include "public/web/WebFrame.h" | 11 #include "public/web/WebFrame.h" |
11 #include "public/web/WebFrameClient.h" | 12 #include "public/web/WebFrameClient.h" |
12 #include "public/web/WebHistoryItem.h" | 13 #include "public/web/WebHistoryItem.h" |
13 #include "public/web/WebScriptSource.h" | 14 #include "public/web/WebScriptSource.h" |
14 #include "public/web/WebSettings.h" | 15 #include "public/web/WebSettings.h" |
15 #include "public/web/WebView.h" | 16 #include "public/web/WebView.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
17 #include "web/WebLocalFrameImpl.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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 // FrameLoader::restoreScrollPositionAndViewState flows differently if scale | 95 // FrameLoader::restoreScrollPositionAndViewState flows differently if scale |
96 // is zero. | 96 // is zero. |
97 loader.RestoreScrollPositionAndViewState(); | 97 loader.RestoreScrollPositionAndViewState(); |
98 | 98 |
99 // Expect that only the scroll position was restored. | 99 // Expect that only the scroll position was restored. |
100 EXPECT_EQ(3.0f, web_view->PageScaleFactor()); | 100 EXPECT_EQ(3.0f, web_view->PageScaleFactor()); |
101 EXPECT_EQ(400, web_view->MainFrameImpl()->GetScrollOffset().height); | 101 EXPECT_EQ(400, web_view->MainFrameImpl()->GetScrollOffset().height); |
102 } | 102 } |
103 | 103 |
104 } // namespace blink | 104 } // namespace blink |
OLD | NEW |