OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "content/common/font_warmup_win.h" | 5 #include "content/child/font_warmup_win.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/sys_byteorder.h" | 15 #include "base/sys_byteorder.h" |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 DWORD data_size = static_cast<DWORD>(strlen(kTestFontData)); | 426 DWORD data_size = static_cast<DWORD>(strlen(kTestFontData)); |
427 std::vector<char> data(data_size); | 427 std::vector<char> data(data_size); |
428 DWORD size = GetFontData(hdc, kTestFontTableTag, 0, &data[0], data.size()); | 428 DWORD size = GetFontData(hdc, kTestFontTableTag, 0, &data[0], data.size()); |
429 EXPECT_EQ(size, data_size); | 429 EXPECT_EQ(size, data_size); |
430 EXPECT_EQ(memcmp(&data[0], kTestFontData, data.size()), 0); | 430 EXPECT_EQ(memcmp(&data[0], kTestFontData, data.size()), 0); |
431 EXPECT_TRUE(DeleteObject(font)); | 431 EXPECT_TRUE(DeleteObject(font)); |
432 EXPECT_TRUE(DeleteDC(hdc)); | 432 EXPECT_TRUE(DeleteDC(hdc)); |
433 } | 433 } |
434 | 434 |
435 } // namespace content | 435 } // namespace content |
OLD | NEW |