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

Unified Diff: third_party/WebKit/Source/platform/scroll/ScrollableAreaTest.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, 10 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/ScrollableAreaTest.cpp
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollableAreaTest.cpp b/third_party/WebKit/Source/platform/scroll/ScrollableAreaTest.cpp
index d599b4dac10e8d5c76ff63c8f17d5cf9c7c41d60..1ca8dcfff6163dbbd94c6afa03c48ca02c4e4d54 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollableAreaTest.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ScrollableAreaTest.cpp
@@ -19,12 +19,12 @@ namespace {
using testing::_;
using testing::Return;
-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(const IntPoint& maximumScrollPosition)
+ static RawPtr<MockScrollableArea> create(const IntPoint& maximumScrollPosition)
{
- return adoptPtrWillBeNoop(new MockScrollableArea(maximumScrollPosition));
+ return (new MockScrollableArea(maximumScrollPosition));
}
MOCK_CONST_METHOD0(isActive, bool());
@@ -98,7 +98,7 @@ private:
TEST_F(ScrollableAreaTest, ScrollAnimatorCurrentPositionShouldBeSync)
{
- OwnPtrWillBeRawPtr<MockScrollableArea> scrollableArea = MockScrollableArea::create(IntPoint(0, 100));
+ RawPtr<MockScrollableArea> scrollableArea = MockScrollableArea::create(IntPoint(0, 100));
scrollableArea->setScrollPosition(IntPoint(0, 10000), CompositorScroll);
EXPECT_EQ(100.0, scrollableArea->scrollAnimator().currentPosition().y());
}
@@ -116,8 +116,8 @@ public:
TEST_F(ScrollableAreaTest, ScrollbarTrackAndThumbRepaint)
{
ScrollbarThemeWithMockInvalidation theme;
- OwnPtrWillBeRawPtr<MockScrollableArea> scrollableArea = MockScrollableArea::create(IntPoint(0, 100));
- RefPtrWillBeRawPtr<Scrollbar> scrollbar = Scrollbar::createForTesting(scrollableArea.get(), HorizontalScrollbar, RegularScrollbar, &theme);
+ RawPtr<MockScrollableArea> scrollableArea = MockScrollableArea::create(IntPoint(0, 100));
+ RawPtr<Scrollbar> scrollbar = Scrollbar::createForTesting(scrollableArea.get(), HorizontalScrollbar, RegularScrollbar, &theme);
EXPECT_CALL(theme, shouldRepaintAllPartsOnInvalidation()).WillRepeatedly(Return(true));
EXPECT_TRUE(scrollbar->trackNeedsRepaint());
@@ -165,7 +165,7 @@ public:
TEST_F(ScrollableAreaTest, ScrollbarGraphicsLayerInvalidation)
{
ScrollbarTheme::setMockScrollbarsEnabled(true);
- OwnPtrWillBeRawPtr<MockScrollableArea> scrollableArea = MockScrollableArea::create(IntPoint(0, 100));
+ RawPtr<MockScrollableArea> scrollableArea = MockScrollableArea::create(IntPoint(0, 100));
MockGraphicsLayerClient graphicsLayerClient;
MockGraphicsLayer graphicsLayer(&graphicsLayerClient);
graphicsLayer.setDrawsContent(true);
@@ -173,7 +173,7 @@ TEST_F(ScrollableAreaTest, ScrollbarGraphicsLayerInvalidation)
EXPECT_CALL(*scrollableArea, layerForHorizontalScrollbar()).WillRepeatedly(Return(&graphicsLayer));
- RefPtrWillBeRawPtr<Scrollbar> scrollbar = Scrollbar::create(scrollableArea.get(), HorizontalScrollbar, RegularScrollbar, nullptr);
+ RawPtr<Scrollbar> scrollbar = Scrollbar::create(scrollableArea.get(), HorizontalScrollbar, RegularScrollbar, nullptr);
graphicsLayer.resetTrackedPaintInvalidations();
scrollbar->setNeedsPaintInvalidation(NoPart);
EXPECT_TRUE(graphicsLayer.hasTrackedPaintInvalidations());
@@ -182,9 +182,9 @@ TEST_F(ScrollableAreaTest, ScrollbarGraphicsLayerInvalidation)
TEST_F(ScrollableAreaTest, InvalidatesNonCompositedScrollbarsWhenThumbMoves)
{
ScrollbarThemeWithMockInvalidation theme;
- OwnPtrWillBeRawPtr<MockScrollableArea> scrollableArea = MockScrollableArea::create(IntPoint(100, 100));
- RefPtrWillBeRawPtr<Scrollbar> horizontalScrollbar = Scrollbar::createForTesting(scrollableArea.get(), HorizontalScrollbar, RegularScrollbar, &theme);
- RefPtrWillBeRawPtr<Scrollbar> verticalScrollbar = Scrollbar::createForTesting(scrollableArea.get(), VerticalScrollbar, RegularScrollbar, &theme);
+ RawPtr<MockScrollableArea> scrollableArea = MockScrollableArea::create(IntPoint(100, 100));
+ RawPtr<Scrollbar> horizontalScrollbar = Scrollbar::createForTesting(scrollableArea.get(), HorizontalScrollbar, RegularScrollbar, &theme);
+ RawPtr<Scrollbar> verticalScrollbar = Scrollbar::createForTesting(scrollableArea.get(), VerticalScrollbar, RegularScrollbar, &theme);
EXPECT_CALL(*scrollableArea, horizontalScrollbar()).WillRepeatedly(Return(horizontalScrollbar.get()));
EXPECT_CALL(*scrollableArea, verticalScrollbar()).WillRepeatedly(Return(verticalScrollbar.get()));
@@ -214,11 +214,11 @@ TEST_F(ScrollableAreaTest, InvalidatesNonCompositedScrollbarsWhenThumbMoves)
TEST_F(ScrollableAreaTest, InvalidatesCompositedScrollbarsIfPartsNeedRepaint)
{
ScrollbarThemeWithMockInvalidation theme;
- OwnPtrWillBeRawPtr<MockScrollableArea> scrollableArea = MockScrollableArea::create(IntPoint(100, 100));
- RefPtrWillBeRawPtr<Scrollbar> horizontalScrollbar = Scrollbar::createForTesting(scrollableArea.get(), HorizontalScrollbar, RegularScrollbar, &theme);
+ RawPtr<MockScrollableArea> scrollableArea = MockScrollableArea::create(IntPoint(100, 100));
+ RawPtr<Scrollbar> horizontalScrollbar = Scrollbar::createForTesting(scrollableArea.get(), HorizontalScrollbar, RegularScrollbar, &theme);
horizontalScrollbar->clearTrackNeedsRepaint();
horizontalScrollbar->clearThumbNeedsRepaint();
- RefPtrWillBeRawPtr<Scrollbar> verticalScrollbar = Scrollbar::createForTesting(scrollableArea.get(), VerticalScrollbar, RegularScrollbar, &theme);
+ RawPtr<Scrollbar> verticalScrollbar = Scrollbar::createForTesting(scrollableArea.get(), VerticalScrollbar, RegularScrollbar, &theme);
verticalScrollbar->clearTrackNeedsRepaint();
verticalScrollbar->clearThumbNeedsRepaint();
EXPECT_CALL(*scrollableArea, horizontalScrollbar()).WillRepeatedly(Return(horizontalScrollbar.get()));

Powered by Google App Engine
This is Rietveld 408576698