| OLD | NEW |
| 1 #include "config.h" | 1 #include "config.h" |
| 2 | 2 |
| 3 #include "core/frame/FrameView.h" | 3 #include "core/frame/FrameView.h" |
| 4 #include "core/rendering/RenderView.h" | 4 #include "core/rendering/RenderView.h" |
| 5 #include "core/testing/URLTestHelpers.h" | 5 #include "core/testing/URLTestHelpers.h" |
| 6 #include "public/platform/Platform.h" | 6 #include "public/platform/Platform.h" |
| 7 #include "public/platform/WebUnitTestSupport.h" | 7 #include "public/platform/WebUnitTestSupport.h" |
| 8 #include "public/web/WebFrame.h" | 8 #include "public/web/WebFrame.h" |
| 9 #include "public/web/WebFrameClient.h" | 9 #include "public/web/WebFrameClient.h" |
| 10 #include "public/web/WebHistoryItem.h" | 10 #include "public/web/WebHistoryItem.h" |
| 11 #include "public/web/WebInputEvent.h" | 11 #include "public/web/WebInputEvent.h" |
| 12 #include "public/web/WebScriptSource.h" | 12 #include "public/web/WebScriptSource.h" |
| 13 #include "public/web/WebSettings.h" | 13 #include "public/web/WebSettings.h" |
| 14 #include "public/web/WebView.h" | 14 #include "public/web/WebView.h" |
| 15 #include "web/WebLocalFrameImpl.h" | 15 #include "web/WebLocalFrameImpl.h" |
| 16 #include "web/WebViewImpl.h" | 16 #include "web/WebViewImpl.h" |
| 17 #include "web/tests/FrameTestHelpers.h" | 17 #include "web/tests/FrameTestHelpers.h" |
| 18 #include <gtest/gtest.h> | 18 #include <gtest/gtest.h> |
| 19 | 19 |
| 20 using namespace blink; | 20 using namespace blink; |
| 21 using namespace blink; | |
| 22 | 21 |
| 23 namespace { | 22 namespace { |
| 24 | 23 |
| 25 class MockWebFrameClient : public WebFrameClient { | 24 class MockWebFrameClient : public WebFrameClient { |
| 26 }; | 25 }; |
| 27 | 26 |
| 28 class ProgrammaticScrollTest : public testing::Test { | 27 class ProgrammaticScrollTest : public testing::Test { |
| 29 public: | 28 public: |
| 30 ProgrammaticScrollTest() | 29 ProgrammaticScrollTest() |
| 31 : m_baseURL("http://www.test.com/") | 30 : m_baseURL("http://www.test.com/") |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 // FrameLoader::restoreScrollPositionAndViewState flows differently if scale
is zero. | 99 // FrameLoader::restoreScrollPositionAndViewState flows differently if scale
is zero. |
| 101 frame->loader().restoreScrollPositionAndViewState(); | 100 frame->loader().restoreScrollPositionAndViewState(); |
| 102 | 101 |
| 103 // Expect that only the scroll position was restored, and that it was not a
programmatic scroll. | 102 // Expect that only the scroll position was restored, and that it was not a
programmatic scroll. |
| 104 EXPECT_EQ(3.0f, webViewImpl->pageScaleFactor()); | 103 EXPECT_EQ(3.0f, webViewImpl->pageScaleFactor()); |
| 105 EXPECT_EQ(400, webViewImpl->mainFrameImpl()->scrollOffset().height); | 104 EXPECT_EQ(400, webViewImpl->mainFrameImpl()->scrollOffset().height); |
| 106 EXPECT_TRUE(frame->view()->wasScrolledByUser()); | 105 EXPECT_TRUE(frame->view()->wasScrolledByUser()); |
| 107 } | 106 } |
| 108 | 107 |
| 109 } | 108 } |
| OLD | NEW |