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

Unified Diff: third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaperTest.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
Index: third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaperTest.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaperTest.cpp b/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaperTest.cpp
index de852dd2dfe75cac8936bec2994f49b95869ba5b..4475685de603acfeb2b1f6da9cad16351a7d6331 100644
--- a/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaperTest.cpp
+++ b/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaperTest.cpp
@@ -10,6 +10,8 @@
#include "platform/fonts/shaping/CachingWordShapeIterator.h"
#include "platform/fonts/shaping/ShapeResultTestInfo.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "wtf/PtrUtil.h"
+#include <memory>
namespace blink {
@@ -26,13 +28,13 @@ protected:
font.update(nullptr);
ASSERT_TRUE(font.canShapeWordByWord());
fallbackFonts = nullptr;
- cache = adoptPtr(new ShapeCache());
+ cache = wrapUnique(new ShapeCache());
}
FontCachePurgePreventer fontCachePurgePreventer;
FontDescription fontDescription;
Font font;
- OwnPtr<ShapeCache> cache;
+ std::unique_ptr<ShapeCache> cache;
HashSet<const SimpleFontData*>* fallbackFonts;
unsigned startIndex = 0;
unsigned numGlyphs = 0;
@@ -117,7 +119,7 @@ TEST_F(CachingWordShaperTest, CommonAccentLeftToRightFillGlyphBuffer)
GlyphBuffer glyphBuffer;
shaper.fillGlyphBuffer(&font, textRun, fallbackFonts, &glyphBuffer, 0, 3);
- OwnPtr<ShapeCache> referenceCache = adoptPtr(new ShapeCache());
+ std::unique_ptr<ShapeCache> referenceCache = wrapUnique(new ShapeCache());
CachingWordShaper referenceShaper(referenceCache.get());
GlyphBuffer referenceGlyphBuffer;
font.setCanShapeWordByWordForTesting(false);
@@ -142,7 +144,7 @@ TEST_F(CachingWordShaperTest, CommonAccentRightToLeftFillGlyphBuffer)
GlyphBuffer glyphBuffer;
shaper.fillGlyphBuffer(&font, textRun, fallbackFonts, &glyphBuffer, 1, 6);
- OwnPtr<ShapeCache> referenceCache = adoptPtr(new ShapeCache());
+ std::unique_ptr<ShapeCache> referenceCache = wrapUnique(new ShapeCache());
CachingWordShaper referenceShaper(referenceCache.get());
GlyphBuffer referenceGlyphBuffer;
font.setCanShapeWordByWordForTesting(false);

Powered by Google App Engine
This is Rietveld 408576698