| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/mac/scoped_cftyperef.h" | 9 #include "base/mac/scoped_cftyperef.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 uint32 font_id; | 114 uint32 font_id; |
| 115 NSFont* srcFont = [NSFont fontWithName:@"Geeza Pro" size:16.0]; | 115 NSFont* srcFont = [NSFont fontWithName:@"Geeza Pro" size:16.0]; |
| 116 EXPECT_TRUE(FontLoader::LoadFontIntoBuffer(srcFont, | 116 EXPECT_TRUE(FontLoader::LoadFontIntoBuffer(srcFont, |
| 117 &font_data, &font_data_size, &font_id)); | 117 &font_data, &font_data_size, &font_id)); |
| 118 EXPECT_GT(font_data_size, 0U); | 118 EXPECT_GT(font_data_size, 0U); |
| 119 EXPECT_GT(font_id, 0U); | 119 EXPECT_GT(font_id, 0U); |
| 120 | 120 |
| 121 file_util::WriteFileDescriptor(fileno(temp_file), | 121 file_util::WriteFileDescriptor(fileno(temp_file), |
| 122 static_cast<const char *>(font_data.memory()), font_data_size); | 122 static_cast<const char *>(font_data.memory()), font_data_size); |
| 123 | 123 |
| 124 ASSERT_TRUE(RunTestInSandbox(Sandbox::SANDBOX_TYPE_RENDERER, | 124 ASSERT_TRUE(RunTestInSandbox(content::SANDBOX_PROCESS_TYPE_RENDERER, |
| 125 "FontLoadingTestCase", temp_file_path.value().c_str())); | 125 "FontLoadingTestCase", temp_file_path.value().c_str())); |
| 126 temp_file_closer.reset(); | 126 temp_file_closer.reset(); |
| 127 ASSERT_TRUE(file_util::Delete(temp_file_path, false)); | 127 ASSERT_TRUE(file_util::Delete(temp_file_path, false)); |
| 128 } | 128 } |
| 129 | 129 |
| 130 } // namespace | 130 } // namespace |
| OLD | NEW |