Index: content/common/sandbox_mac_fontloading_unittest.mm |
diff --git a/content/common/sandbox_mac_fontloading_unittest.mm b/content/common/sandbox_mac_fontloading_unittest.mm |
index 7e7154f0d49d130d72a4a77ce43806486b4cd2c6..47b4dfd72f7756f9e99208e81d9eb1c257e25195 100644 |
--- a/content/common/sandbox_mac_fontloading_unittest.mm |
+++ b/content/common/sandbox_mac_fontloading_unittest.mm |
@@ -9,6 +9,7 @@ |
#include "base/mac/scoped_cftyperef.h" |
#include "base/memory/scoped_ptr.h" |
#include "base/shared_memory.h" |
+#include "content/common/mac/font_descriptor.h" |
#include "content/common/mac/font_loader.h" |
#include "content/common/sandbox_mac_unittest_helper.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -109,17 +110,16 @@ TEST_F(MacSandboxTest, FontLoadingTest) { |
ASSERT_TRUE(temp_file); |
file_util::ScopedFILE temp_file_closer(temp_file); |
- base::SharedMemory font_data; |
- uint32 font_data_size; |
- uint32 font_id; |
NSFont* srcFont = [NSFont fontWithName:@"Geeza Pro" size:16.0]; |
- EXPECT_TRUE(FontLoader::LoadFontIntoBuffer(srcFont, |
- &font_data, &font_data_size, &font_id)); |
- EXPECT_GT(font_data_size, 0U); |
- EXPECT_GT(font_id, 0U); |
+ FontDescriptor descriptor(srcFont); |
+ FontLoader::Result result; |
+ FontLoader::LoadFont(descriptor, &result); |
+ EXPECT_GT(result.font_data_size, 0U); |
+ EXPECT_GT(result.font_id, 0U); |
file_util::WriteFileDescriptor(fileno(temp_file), |
- static_cast<const char *>(font_data.memory()), font_data_size); |
+ static_cast<const char *>(result.font_data.memory()), |
+ result.font_data_size); |
ASSERT_TRUE(RunTestInSandbox(content::SANDBOX_TYPE_RENDERER, |
"FontLoadingTestCase", temp_file_path.value().c_str())); |