| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "printing/pdf_ps_metafile_linux.h" | 5 #include "printing/pdf_ps_metafile_cairo.h" |
| 6 | 6 |
| 7 #include <fcntl.h> | 7 #include <fcntl.h> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/file_descriptor_posix.h" | 11 #include "base/file_descriptor_posix.h" |
| 12 #include "base/file_util.h" | 12 #include "base/file_util.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 14 | 14 |
| 15 typedef struct _cairo cairo_t; | 15 typedef struct _cairo cairo_t; |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 std::vector<char> buffer2(4, 0x00); | 101 std::vector<char> buffer2(4, 0x00); |
| 102 ps2.GetData(&buffer2.front(), 4); | 102 ps2.GetData(&buffer2.front(), 4); |
| 103 | 103 |
| 104 // Tests if the header begins with "%!PS". | 104 // Tests if the header begins with "%!PS". |
| 105 std::string header(&buffer2.front(), 4); | 105 std::string header(&buffer2.front(), 4); |
| 106 EXPECT_EQ(header.find("%!PS", 0), 0u); | 106 EXPECT_EQ(header.find("%!PS", 0), 0u); |
| 107 | 107 |
| 108 // Tests if we can save data. | 108 // Tests if we can save data. |
| 109 EXPECT_TRUE(ps.SaveTo(DevNullFD())); | 109 EXPECT_TRUE(ps.SaveTo(DevNullFD())); |
| 110 } | 110 } |
| OLD | NEW |