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

Unified Diff: third_party/WebKit/Source/platform/DragImageTest.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 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
« no previous file with comments | « third_party/WebKit/Source/platform/DragImage.cpp ('k') | third_party/WebKit/Source/platform/EventTracer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/DragImageTest.cpp
diff --git a/third_party/WebKit/Source/platform/DragImageTest.cpp b/third_party/WebKit/Source/platform/DragImageTest.cpp
index ba67881d47a1d614e4c46cf7bb40624f28622b3b..d8f295e92f67fa371b98d318ebbc5f8f474e0330 100644
--- a/third_party/WebKit/Source/platform/DragImageTest.cpp
+++ b/third_party/WebKit/Source/platform/DragImageTest.cpp
@@ -43,10 +43,9 @@
#include "third_party/skia/include/core/SkImage.h"
#include "third_party/skia/include/core/SkPixelRef.h"
#include "third_party/skia/include/core/SkSurface.h"
-#include "wtf/OwnPtr.h"
-#include "wtf/PassOwnPtr.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefPtr.h"
+#include <memory>
namespace blink {
@@ -125,7 +124,7 @@ TEST(DragImageTest, NullHandling)
TEST(DragImageTest, NonNullHandling)
{
RefPtr<TestImage> testImage(TestImage::create(IntSize(2, 2)));
- OwnPtr<DragImage> dragImage = DragImage::create(testImage.get());
+ std::unique_ptr<DragImage> dragImage = DragImage::create(testImage.get());
ASSERT_TRUE(dragImage);
dragImage->scale(0.5, 0.5);
@@ -158,9 +157,9 @@ TEST(DragImageTest, TrimWhitespace)
fontDescription.setWeight(FontWeightNormal);
fontDescription.setStyle(FontStyleNormal);
- OwnPtr<DragImage> testImage =
+ std::unique_ptr<DragImage> testImage =
DragImage::create(url, testLabel, fontDescription, deviceScaleFactor);
- OwnPtr<DragImage> expectedImage =
+ std::unique_ptr<DragImage> expectedImage =
DragImage::create(url, expectedLabel, fontDescription, deviceScaleFactor);
EXPECT_EQ(testImage->size().width(), expectedImage->size().width());
@@ -193,7 +192,7 @@ TEST(DragImageTest, InvalidRotatedBitmapImage)
// Create a DragImage from it. In MSAN builds, this will cause a failure if
// the pixel memory is not initialized, if we have to respect non-default
// orientation.
- OwnPtr<DragImage> dragImage = DragImage::create(image.get(), RespectImageOrientation);
+ std::unique_ptr<DragImage> dragImage = DragImage::create(image.get(), RespectImageOrientation);
// With an invalid pixel ref, BitmapImage should have no backing SkImage => we don't allocate
// a DragImage.
@@ -223,7 +222,7 @@ TEST(DragImageTest, InterpolationNone)
}
RefPtr<TestImage> testImage = TestImage::create(fromSkSp(SkImage::MakeFromBitmap(testBitmap)));
- OwnPtr<DragImage> dragImage = DragImage::create(testImage.get(), DoNotRespectImageOrientation, 1, InterpolationNone);
+ std::unique_ptr<DragImage> dragImage = DragImage::create(testImage.get(), DoNotRespectImageOrientation, 1, InterpolationNone);
ASSERT_TRUE(dragImage);
dragImage->scale(2, 2);
const SkBitmap& dragBitmap = dragImage->bitmap();
« no previous file with comments | « third_party/WebKit/Source/platform/DragImage.cpp ('k') | third_party/WebKit/Source/platform/EventTracer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698