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

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 michealpg@ comments Created 3 years, 10 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 | « chromeos/printing/printer_translator.cc ('k') | chromeos/printing/printing_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..fbd66bbbe75158da3ac509b407cc7c7e263ec907 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,16 +80,13 @@ 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,
+ base::ExpectDictStringValue(kEffectiveMakeAndModel, *actual,
"ppd_reference.effective_model");
}
@@ -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,7 @@ 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_model", kEffectiveMakeAndModel);
std::unique_ptr<Printer> printer = PrefToPrinter(preference);
std::unique_ptr<base::DictionaryValue> pref_copy = PrinterToPref(*printer);
« no previous file with comments | « chromeos/printing/printer_translator.cc ('k') | chromeos/printing/printing_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698