| Index: third_party/WebKit/Source/platform/fonts/FontCacheTest.cpp
|
| diff --git a/third_party/WebKit/Source/platform/fonts/FontCacheTest.cpp b/third_party/WebKit/Source/platform/fonts/FontCacheTest.cpp
|
| index 706f1694702ce6ebb445f6eb92801604d5a7a814..ae6b2c26c946ad249d71ae9e8b2bb97fbed469f1 100644
|
| --- a/third_party/WebKit/Source/platform/fonts/FontCacheTest.cpp
|
| +++ b/third_party/WebKit/Source/platform/fonts/FontCacheTest.cpp
|
| @@ -7,16 +7,19 @@
|
|
|
| #include "platform/fonts/FontDescription.h"
|
| #include "platform/fonts/SimpleFontData.h"
|
| -#include "platform/testing/TestingPlatformSupport.h"
|
| #include "public/platform/Platform.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| namespace blink {
|
|
|
| -class EmptyPlatform : public TestingPlatformSupport {
|
| +class EmptyPlatform : public Platform {
|
| public:
|
| EmptyPlatform() {}
|
| ~EmptyPlatform() override {}
|
| + void cryptographicallyRandomValues(unsigned char* buffer, size_t length) override
|
| + {
|
| + RELEASE_ASSERT_NOT_REACHED();
|
| + }
|
| };
|
|
|
| TEST(FontCache, getLastResortFallbackFont)
|
| @@ -24,7 +27,9 @@
|
| FontCache* fontCache = FontCache::fontCache();
|
| ASSERT_TRUE(fontCache);
|
|
|
| - EmptyPlatform platform;
|
| + Platform* oldPlatform = Platform::current();
|
| + OwnPtr<EmptyPlatform> platform = adoptPtr(new EmptyPlatform);
|
| + Platform::initialize(platform.get());
|
|
|
| FontDescription fontDescription;
|
| fontDescription.setGenericFamily(FontDescription::StandardFamily);
|
| @@ -34,6 +39,8 @@
|
| fontDescription.setGenericFamily(FontDescription::SansSerifFamily);
|
| fontData = fontCache->getLastResortFallbackFont(fontDescription, Retain);
|
| EXPECT_TRUE(fontData);
|
| +
|
| + Platform::initialize(oldPlatform);
|
| }
|
|
|
| } // namespace blink
|
|
|