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

Unified Diff: chromeos/printing/printer_translator_unittest.cc

Issue 2613683004: Completely rewrite the PpdProvider/PpdCache to use the SCS backend. Along the way, clean it up a l… (Closed)
Patch Set: Address latest skau comments, rebase and make it work with recent sync changes Created 3 years, 11 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: chromeos/printing/printer_translator_unittest.cc
diff --git a/chromeos/printing/printer_translator_unittest.cc b/chromeos/printing/printer_translator_unittest.cc
index 4b5556296af7322c084f47676579de05e6324cf4..416b938465dd102e5c2dd237897fc55984ed9a77 100644
--- a/chromeos/printing/printer_translator_unittest.cc
+++ b/chromeos/printing/printer_translator_unittest.cc
@@ -25,8 +25,7 @@ const char kUUID[] = "UUID-UUID-UUID";
// PpdReference test data
const char kUserSuppliedPpdUrl[] = "/some/path/to/user.url";
-const char kEffectiveManufacturer[] = "Ehch Pea";
-const char kEffectiveModel[] = "PrintBlaster 2000";
+const char kEffectiveMakeAndModel[] = "PrintBlaster 2000";
TEST(PrinterTranslatorTest, PrefToPrinterMissingId) {
base::DictionaryValue value;
@@ -81,17 +80,14 @@ TEST(PrinterTranslatorTest, PrinterToPrefPpdReference) {
Printer printer("UNIQUE_ID");
auto* ppd = printer.mutable_ppd_reference();
ppd->user_supplied_ppd_url = kUserSuppliedPpdUrl;
- ppd->effective_manufacturer = kEffectiveManufacturer;
- ppd->effective_model = kEffectiveModel;
+ ppd->effective_make_and_model = kEffectiveMakeAndModel;
std::unique_ptr<base::DictionaryValue> actual = PrinterToPref(printer);
base::ExpectDictStringValue(kUserSuppliedPpdUrl, *actual,
"ppd_reference.user_supplied_ppd_url");
- base::ExpectDictStringValue(kEffectiveManufacturer, *actual,
- "ppd_reference.effective_manufacturer");
- base::ExpectDictStringValue(kEffectiveModel, *actual,
- "ppd_reference.effective_model");
+ base::ExpectDictStringValue(kEffectiveMakeAndModel, *actual,
+ "ppd_reference.effective_make_and_model");
}
// Make sure we don't serialize empty fields.
@@ -100,8 +96,7 @@ TEST(PrinterTranslatorTest, PrinterToPrefPpdReferenceLazy) {
std::unique_ptr<base::DictionaryValue> actual = PrinterToPref(printer);
EXPECT_FALSE(actual->HasKey("ppd_reference.user_supplied_ppd_url"));
- EXPECT_FALSE(actual->HasKey("ppd_reference.effective_manufacturer"));
- EXPECT_FALSE(actual->HasKey("ppd_reference.effective_model"));
+ EXPECT_FALSE(actual->HasKey("ppd_reference.ppd_server_key"));
}
TEST(PrinterTranslatorTest, PrefToPrinterRoundTrip) {
@@ -116,9 +111,8 @@ TEST(PrinterTranslatorTest, PrefToPrinterRoundTrip) {
preference.SetString("ppd_reference.user_supplied_ppd_url",
kUserSuppliedPpdUrl);
- preference.SetString("ppd_reference.effective_manufacturer",
- kEffectiveManufacturer);
- preference.SetString("ppd_reference.effective_model", kEffectiveModel);
+ preference.SetString("ppd_reference.effective_make_and_model",
+ kEffectiveMakeAndModel);
std::unique_ptr<Printer> printer = PrefToPrinter(preference);
std::unique_ptr<base::DictionaryValue> pref_copy = PrinterToPref(*printer);

Powered by Google App Engine
This is Rietveld 408576698