| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |