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