OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/backend/cups_helper.h" | 5 #include "printing/backend/cups_helper.h" |
6 #include "printing/backend/print_backend.h" | 6 #include "printing/backend/print_backend.h" |
7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
8 | 8 |
9 TEST(PrintBackendCupsHelperTest, TestPpdParsingNoColorDuplexLongEdge) { | 9 TEST(PrintBackendCupsHelperTest, TestPpdParsingNoColorDuplexLongEdge) { |
10 std::string test_ppd_data; | 10 std::string test_ppd_data; |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 "*DefaultPaperDimension: Letter\n" | 191 "*DefaultPaperDimension: Letter\n" |
192 "*PaperDimension Letter/US Letter: \"612 792\"\n" | 192 "*PaperDimension Letter/US Letter: \"612 792\"\n" |
193 "*PaperDimension Legal/US Legal: \"612 1008\"\n\n" | 193 "*PaperDimension Legal/US Legal: \"612 1008\"\n\n" |
194 "*CloseUI: *PageSize\n\n"); | 194 "*CloseUI: *PageSize\n\n"); |
195 | 195 |
196 printing::PrinterSemanticCapsAndDefaults caps; | 196 printing::PrinterSemanticCapsAndDefaults caps; |
197 EXPECT_TRUE(printing::ParsePpdCapabilities("test", test_ppd_data, &caps)); | 197 EXPECT_TRUE(printing::ParsePpdCapabilities("test", test_ppd_data, &caps)); |
198 ASSERT_EQ(2UL, caps.papers.size()); | 198 ASSERT_EQ(2UL, caps.papers.size()); |
199 EXPECT_EQ("Letter", caps.papers[0].vendor_id); | 199 EXPECT_EQ("Letter", caps.papers[0].vendor_id); |
200 EXPECT_EQ("US Letter", caps.papers[0].display_name); | 200 EXPECT_EQ("US Letter", caps.papers[0].display_name); |
201 EXPECT_EQ(214200, caps.papers[0].size_um.width()); | 201 EXPECT_EQ(215900, caps.papers[0].size_um.width()); |
202 EXPECT_EQ(277200, caps.papers[0].size_um.height()); | 202 EXPECT_EQ(279400, caps.papers[0].size_um.height()); |
203 EXPECT_EQ("Legal", caps.papers[1].vendor_id); | 203 EXPECT_EQ("Legal", caps.papers[1].vendor_id); |
204 EXPECT_EQ("US Legal", caps.papers[1].display_name); | 204 EXPECT_EQ("US Legal", caps.papers[1].display_name); |
205 EXPECT_EQ(214200, caps.papers[1].size_um.width()); | 205 EXPECT_EQ(215900, caps.papers[1].size_um.width()); |
206 EXPECT_EQ(352800, caps.papers[1].size_um.height()); | 206 EXPECT_EQ(355600, caps.papers[1].size_um.height()); |
207 } | 207 } |
OLD | NEW |