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

Unified Diff: third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp b/third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp
index fd8195010b68b6c992c6852caa68dd033c316674..59fe94cc8d174c33450c4aa5b1fa1eb580d79c5b 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp
@@ -50,12 +50,12 @@ static double getMockedTime()
namespace {
-class MockScrollableArea : public NoBaseWillBeGarbageCollectedFinalized<MockScrollableArea>, public ScrollableArea {
- WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MockScrollableArea);
+class MockScrollableArea : public GarbageCollectedFinalized<MockScrollableArea>, public ScrollableArea {
+ USING_GARBAGE_COLLECTED_MIXIN(MockScrollableArea);
public:
- static PassOwnPtrWillBeRawPtr<MockScrollableArea> create(bool scrollAnimatorEnabled)
+ static RawPtr<MockScrollableArea> create(bool scrollAnimatorEnabled)
{
- return adoptPtrWillBeNoop(new MockScrollableArea(scrollAnimatorEnabled));
+ return new MockScrollableArea(scrollAnimatorEnabled);
}
MOCK_CONST_METHOD0(visualRectForScrollbarParts, LayoutRect());
@@ -134,10 +134,10 @@ static void reset(ScrollAnimator& scrollAnimator)
TEST(ScrollAnimatorTest, MainThreadStates)
{
- OwnPtrWillBeRawPtr<MockScrollableArea> scrollableArea =
+ RawPtr<MockScrollableArea> scrollableArea =
MockScrollableArea::create(true);
- OwnPtrWillBeRawPtr<ScrollAnimator> scrollAnimator = adoptPtrWillBeNoop(
- new ScrollAnimator(scrollableArea.get(), getMockedTime));
+ RawPtr<ScrollAnimator> scrollAnimator =
+ new ScrollAnimator(scrollableArea.get(), getMockedTime);
EXPECT_CALL(*scrollableArea, minimumScrollPosition()).Times(AtLeast(1))
.WillRepeatedly(Return(IntPoint()));
@@ -183,8 +183,8 @@ TEST(ScrollAnimatorTest, MainThreadStates)
TEST(ScrollAnimatorTest, MainThreadEnabled)
{
- OwnPtrWillBeRawPtr<MockScrollableArea> scrollableArea = MockScrollableArea::create(true);
- OwnPtrWillBeRawPtr<ScrollAnimator> scrollAnimator = adoptPtrWillBeNoop(new ScrollAnimator(scrollableArea.get(), getMockedTime));
+ RawPtr<MockScrollableArea> scrollableArea = MockScrollableArea::create(true);
+ RawPtr<ScrollAnimator> scrollAnimator = new ScrollAnimator(scrollableArea.get(), getMockedTime);
EXPECT_CALL(*scrollableArea, minimumScrollPosition()).Times(AtLeast(1)).WillRepeatedly(Return(IntPoint()));
EXPECT_CALL(*scrollableArea, maximumScrollPosition()).Times(AtLeast(1)).WillRepeatedly(Return(IntPoint(1000, 1000)));
@@ -260,10 +260,10 @@ TEST(ScrollAnimatorTest, MainThreadEnabled)
// non-smooth scroll offset animation.
TEST(ScrollAnimatorTest, AnimatedScrollAborted)
{
- OwnPtrWillBeRawPtr<MockScrollableArea> scrollableArea =
+ RawPtr<MockScrollableArea> scrollableArea =
MockScrollableArea::create(true);
- OwnPtrWillBeRawPtr<ScrollAnimator> scrollAnimator = adoptPtrWillBeNoop(
- new ScrollAnimator(scrollableArea.get(), getMockedTime));
+ RawPtr<ScrollAnimator> scrollAnimator =
+ new ScrollAnimator(scrollableArea.get(), getMockedTime);
EXPECT_CALL(*scrollableArea, minimumScrollPosition()).Times(AtLeast(1))
.WillRepeatedly(Return(IntPoint()));
@@ -309,10 +309,10 @@ TEST(ScrollAnimatorTest, AnimatedScrollAborted)
// completed on the main thread.
TEST(ScrollAnimatorTest, AnimatedScrollTakeover)
{
- OwnPtrWillBeRawPtr<MockScrollableArea> scrollableArea =
+ RawPtr<MockScrollableArea> scrollableArea =
MockScrollableArea::create(true);
- OwnPtrWillBeRawPtr<TestScrollAnimator> scrollAnimator = adoptPtrWillBeNoop(
- new TestScrollAnimator(scrollableArea.get(), getMockedTime));
+ RawPtr<TestScrollAnimator> scrollAnimator =
+ new TestScrollAnimator(scrollableArea.get(), getMockedTime);
EXPECT_CALL(*scrollableArea, minimumScrollPosition()).Times(AtLeast(1))
.WillRepeatedly(Return(IntPoint()));
@@ -360,8 +360,8 @@ TEST(ScrollAnimatorTest, AnimatedScrollTakeover)
TEST(ScrollAnimatorTest, Disabled)
{
- OwnPtrWillBeRawPtr<MockScrollableArea> scrollableArea = MockScrollableArea::create(false);
- OwnPtrWillBeRawPtr<ScrollAnimator> scrollAnimator = adoptPtrWillBeNoop(new ScrollAnimator(scrollableArea.get(), getMockedTime));
+ RawPtr<MockScrollableArea> scrollableArea = MockScrollableArea::create(false);
+ RawPtr<ScrollAnimator> scrollAnimator = new ScrollAnimator(scrollableArea.get(), getMockedTime);
EXPECT_CALL(*scrollableArea, minimumScrollPosition()).Times(AtLeast(1)).WillRepeatedly(Return(IntPoint()));
EXPECT_CALL(*scrollableArea, maximumScrollPosition()).Times(AtLeast(1)).WillRepeatedly(Return(IntPoint(1000, 1000)));
@@ -393,10 +393,10 @@ TEST(ScrollAnimatorTest, Disabled)
// See crbug.com/598548.
TEST(ScrollAnimatorTest, CancellingAnimationResetsState)
{
- OwnPtrWillBeRawPtr<MockScrollableArea> scrollableArea =
+ RawPtr<MockScrollableArea> scrollableArea =
MockScrollableArea::create(true);
- OwnPtrWillBeRawPtr<ScrollAnimator> scrollAnimator = adoptPtrWillBeNoop(
- new ScrollAnimator(scrollableArea.get(), getMockedTime));
+ RawPtr<ScrollAnimator> scrollAnimator =
+ new ScrollAnimator(scrollableArea.get(), getMockedTime);
EXPECT_CALL(*scrollableArea, minimumScrollPosition()).Times(AtLeast(1))
.WillRepeatedly(Return(IntPoint()));

Powered by Google App Engine
This is Rietveld 408576698