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

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

Issue 2858353004: Track printer installations for each configuration. (Closed)
Patch Set: default argument 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/printers_manager_unittest.cc
diff --git a/chrome/browser/chromeos/printing/printers_manager_unittest.cc b/chrome/browser/chromeos/printing/printers_manager_unittest.cc
index cf874e327f3943396d72eaf559de6c34f961cc5b..0ba3264e951f6ecf6510ba2bd0cea519dbc0739d 100644
--- a/chrome/browser/chromeos/printing/printers_manager_unittest.cc
+++ b/chrome/browser/chromeos/printing/printers_manager_unittest.cc
@@ -225,4 +225,23 @@ TEST_F(PrintersManagerTest, GetRecommendedPrinter) {
EXPECT_EQ(Printer::Source::SRC_POLICY, from_list.source());
}
+TEST_F(PrintersManagerTest, PrinterNotInstalled) {
+ Printer printer(kPrinterId, 1000);
+ EXPECT_FALSE(manager_->IsConfigurationCurrent(printer));
+}
+
+TEST_F(PrintersManagerTest, PrinterIsInstalled) {
+ Printer printer(kPrinterId, 1000);
+ manager_->PrinterInstalled(printer);
+ EXPECT_TRUE(manager_->IsConfigurationCurrent(printer));
+}
+
+TEST_F(PrintersManagerTest, UpdatedPrinterConfiguration) {
+ Printer printer(kPrinterId, 1000);
+ manager_->PrinterInstalled(printer);
+
+ Printer updated_printer(kPrinterId, 2000);
+ EXPECT_FALSE(manager_->IsConfigurationCurrent(updated_printer));
+}
+
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698