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

Unified Diff: chrome/browser/chromeos/printing/specifics_translation_unittest.cc

Issue 2884863002: Add an autoconf field to printer objects. (Closed)
Patch Set: Created 3 years, 7 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
Index: chrome/browser/chromeos/printing/specifics_translation_unittest.cc
diff --git a/chrome/browser/chromeos/printing/specifics_translation_unittest.cc b/chrome/browser/chromeos/printing/specifics_translation_unittest.cc
index 23740c164f8cc6e37e373c750806c6c1887ab8fa..538dd0d05b6182eb3663098a6f06bc729de6e20f 100644
--- a/chrome/browser/chromeos/printing/specifics_translation_unittest.cc
+++ b/chrome/browser/chromeos/printing/specifics_translation_unittest.cc
@@ -23,6 +23,7 @@ const char uuid[] = "UUIDUUIDUUID";
const base::Time kUpdateTime = base::Time::FromInternalValue(22114455660000);
const char effective_make_and_model[] = "Manufacturer Model T1000";
+const bool kAutoconf = true;
} // namespace
@@ -42,6 +43,7 @@ TEST(SpecificsTranslationTest, SpecificsToPrinter) {
sync_pb::PrinterPPDReference ppd;
ppd.set_effective_make_and_model(effective_make_and_model);
+ ppd.set_autoconf(kAutoconf);
*specifics.mutable_ppd_reference() = ppd;
std::unique_ptr<Printer> result = SpecificsToPrinter(specifics);
@@ -56,6 +58,7 @@ TEST(SpecificsTranslationTest, SpecificsToPrinter) {
EXPECT_EQ(effective_make_and_model,
result->ppd_reference().effective_make_and_model);
+ EXPECT_EQ(kAutoconf, result->ppd_reference().autoconf);
}
TEST(SpecificsTranslationTest, PrinterToSpecifics) {
@@ -70,6 +73,7 @@ TEST(SpecificsTranslationTest, PrinterToSpecifics) {
Printer::PpdReference ppd;
ppd.effective_make_and_model = effective_make_and_model;
+ ppd.autoconf = kAutoconf;
*printer.mutable_ppd_reference() = ppd;
std::unique_ptr<sync_pb::PrinterSpecifics> result =
@@ -84,6 +88,7 @@ TEST(SpecificsTranslationTest, PrinterToSpecifics) {
EXPECT_EQ(effective_make_and_model,
result->ppd_reference().effective_make_and_model());
+ EXPECT_EQ(kAutoconf, result->ppd_reference().autoconf());
}
TEST(SpecificsTranslationTest, SpecificsToPrinterRoundTrip) {
@@ -98,6 +103,7 @@ TEST(SpecificsTranslationTest, SpecificsToPrinterRoundTrip) {
Printer::PpdReference ppd;
ppd.effective_make_and_model = effective_make_and_model;
+ ppd.autoconf = kAutoconf;
*printer.mutable_ppd_reference() = ppd;
std::unique_ptr<sync_pb::PrinterSpecifics> temp = PrinterToSpecifics(printer);
@@ -113,6 +119,7 @@ TEST(SpecificsTranslationTest, SpecificsToPrinterRoundTrip) {
EXPECT_EQ(effective_make_and_model,
result->ppd_reference().effective_make_and_model);
+ EXPECT_EQ(kAutoconf, result->ppd_reference().autoconf);
}
} // namespace printing

Powered by Google App Engine
This is Rietveld 408576698