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

Unified Diff: third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaperTest.cpp

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 4475685de603acfeb2b1f6da9cad16351a7d6331..de852dd2dfe75cac8936bec2994f49b95869ba5b 100644
--- a/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaperTest.cpp
+++ b/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaperTest.cpp
@@ -10,8 +10,6 @@
#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 {
@@ -28,13 +26,13 @@ protected:
font.update(nullptr);
ASSERT_TRUE(font.canShapeWordByWord());
fallbackFonts = nullptr;
- cache = wrapUnique(new ShapeCache());
+ cache = adoptPtr(new ShapeCache());
}
FontCachePurgePreventer fontCachePurgePreventer;
FontDescription fontDescription;
Font font;
- std::unique_ptr<ShapeCache> cache;
+ OwnPtr<ShapeCache> cache;
HashSet<const SimpleFontData*>* fallbackFonts;
unsigned startIndex = 0;
unsigned numGlyphs = 0;
@@ -119,7 +117,7 @@ TEST_F(CachingWordShaperTest, CommonAccentLeftToRightFillGlyphBuffer)
GlyphBuffer glyphBuffer;
shaper.fillGlyphBuffer(&font, textRun, fallbackFonts, &glyphBuffer, 0, 3);
- std::unique_ptr<ShapeCache> referenceCache = wrapUnique(new ShapeCache());
+ OwnPtr<ShapeCache> referenceCache = adoptPtr(new ShapeCache());
CachingWordShaper referenceShaper(referenceCache.get());
GlyphBuffer referenceGlyphBuffer;
font.setCanShapeWordByWordForTesting(false);
@@ -144,7 +142,7 @@ TEST_F(CachingWordShaperTest, CommonAccentRightToLeftFillGlyphBuffer)
GlyphBuffer glyphBuffer;
shaper.fillGlyphBuffer(&font, textRun, fallbackFonts, &glyphBuffer, 1, 6);
- std::unique_ptr<ShapeCache> referenceCache = wrapUnique(new ShapeCache());
+ OwnPtr<ShapeCache> referenceCache = adoptPtr(new ShapeCache());
CachingWordShaper referenceShaper(referenceCache.get());
GlyphBuffer referenceGlyphBuffer;
font.setCanShapeWordByWordForTesting(false);

Powered by Google App Engine
This is Rietveld 408576698