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

Side by Side Diff: third_party/WebKit/Source/web/tests/IntersectionObserverTest.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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/dom/IntersectionObserver.h" 5 #include "core/dom/IntersectionObserver.h"
6 6
7 #include "core/dom/IntersectionObserverCallback.h" 7 #include "core/dom/IntersectionObserverCallback.h"
8 #include "core/dom/IntersectionObserverInit.h" 8 #include "core/dom/IntersectionObserverInit.h"
9 #include "core/exported/WebViewBase.h"
9 #include "core/frame/FrameView.h" 10 #include "core/frame/FrameView.h"
10 #include "platform/testing/UnitTestHelpers.h" 11 #include "platform/testing/UnitTestHelpers.h"
11 #include "platform/wtf/CurrentTime.h" 12 #include "platform/wtf/CurrentTime.h"
12 #include "web/WebViewImpl.h"
13 #include "web/tests/sim/SimCompositor.h" 13 #include "web/tests/sim/SimCompositor.h"
14 #include "web/tests/sim/SimDisplayItemList.h" 14 #include "web/tests/sim/SimDisplayItemList.h"
15 #include "web/tests/sim/SimRequest.h" 15 #include "web/tests/sim/SimRequest.h"
16 #include "web/tests/sim/SimTest.h" 16 #include "web/tests/sim/SimTest.h"
17 17
18 namespace blink { 18 namespace blink {
19 19
20 namespace { 20 namespace {
21 21
22 class TestIntersectionObserverCallback : public IntersectionObserverCallback { 22 class TestIntersectionObserverCallback : public IntersectionObserverCallback {
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 // those notifications should be discarded. 156 // those notifications should be discarded.
157 GetDocument().View()->LayoutViewportScrollableArea()->SetScrollOffset( 157 GetDocument().View()->LayoutViewportScrollableArea()->SetScrollOffset(
158 ScrollOffset(0, 300), kProgrammaticScroll); 158 ScrollOffset(0, 300), kProgrammaticScroll);
159 Compositor().BeginFrame(); 159 Compositor().BeginFrame();
160 observer->disconnect(); 160 observer->disconnect();
161 testing::RunPendingTasks(); 161 testing::RunPendingTasks();
162 EXPECT_EQ(observer_callback->CallCount(), 1); 162 EXPECT_EQ(observer_callback->CallCount(), 1);
163 } 163 }
164 164
165 } // namespace blink 165 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698