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

Unified Diff: printing/backend/cups_helper_unittest.cc

Issue 2769913002: Better detect color options for Samsung CUPS printers. (Closed)
Patch Set: Created 3 years, 9 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 | « printing/backend/cups_helper.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/backend/cups_helper_unittest.cc
diff --git a/printing/backend/cups_helper_unittest.cc b/printing/backend/cups_helper_unittest.cc
index 4aaf7efbb04cb2f76b171a9132844bbaa881b58c..7e300310cd335c9d440b47a1e47aab4260d5e9c1 100644
--- a/printing/backend/cups_helper_unittest.cc
+++ b/printing/backend/cups_helper_unittest.cc
@@ -172,7 +172,6 @@ TEST(PrintBackendCupsHelperTest, TestPpdParsingPageSize) {
const char kTestPpdData[] =
"*PPD-Adobe: \"4.3\"\n\n"
"*OpenUI *PageSize: PickOne\n"
- "*OrderDependency: 30 AnySetup *PageSize\n"
"*DefaultPageSize: Letter\n"
"*PageSize Letter/US Letter: \""
" <</DeferredMediaSelection true /PageSize [612 792] "
@@ -242,7 +241,6 @@ TEST(PrintBackendCupsHelperTest, TestPpdParsingBrotherPrinters) {
"*PPD-Adobe: \"4.3\"\n\n"
"*ColorDevice: True\n"
"*OpenUI *BRDuplex/Two-Sided Printing: PickOne\n"
- "*OrderDependency: 25 AnySetup *BRDuplex\n"
"*DefaultBRDuplex: DuplexTumble\n"
"*BRDuplex DuplexTumble/Short-Edge Binding: \"\"\n"
"*BRDuplex DuplexNoTumble/Long-Edge Binding: \"\"\n"
@@ -255,3 +253,23 @@ TEST(PrintBackendCupsHelperTest, TestPpdParsingBrotherPrinters) {
EXPECT_EQ(printing::SHORT_EDGE, caps.duplex_default);
}
}
+
+TEST(PrintBackendCupsHelperTest, TestPpdParsingSamsungPrinters) {
+ {
+ const char kTestPpdData[] =
+ "*PPD-Adobe: \"4.3\"\n\n"
+ "*ColorDevice: True\n"
+ "*OpenUI *ColorMode/Color Mode: Boolean\n"
+ "*DefaultColorMode: True\n"
+ "*ColorMode False/Grayscale: \"\"\n"
+ "*ColorMode True/Color: \"\"\n"
+ "*CloseUI: *ColorMode\n\n";
+
+ printing::PrinterSemanticCapsAndDefaults caps;
+ EXPECT_TRUE(printing::ParsePpdCapabilities("test", kTestPpdData, &caps));
+ EXPECT_TRUE(caps.color_changeable);
+ EXPECT_TRUE(caps.color_default);
+ EXPECT_EQ(printing::COLORMODE_COLOR, caps.color_model);
+ EXPECT_EQ(printing::COLORMODE_MONOCHROME, caps.bw_model);
+ }
+}
« no previous file with comments | « printing/backend/cups_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698