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

Unified Diff: content/common/sandbox_mac_fontloading_unittest.mm

Issue 9950141: Mac: OOP font loading should run on FILE thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit test Created 8 years, 8 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 | « content/common/mac/font_loader.mm ('k') | content/renderer/renderer_webkitplatformsupport_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()));
« no previous file with comments | « content/common/mac/font_loader.mm ('k') | content/renderer/renderer_webkitplatformsupport_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698