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

Unified Diff: chromeos/network/network_device_handler_unittest.cc

Issue 399303003: Eliminate use of sim unlock UI notifications (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, feedback, fix test Created 6 years, 5 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/network/network_device_handler_unittest.cc
diff --git a/chromeos/network/network_device_handler_unittest.cc b/chromeos/network/network_device_handler_unittest.cc
index fb1fc299577cb6ce86e93b0291f7e6cb0b32d715..af4b93f36d0190c768e5e85bdb56c82f74143fab 100644
--- a/chromeos/network/network_device_handler_unittest.cc
+++ b/chromeos/network/network_device_handler_unittest.cc
@@ -22,6 +22,7 @@ const char kDefaultCellularDevicePath[] = "stub_cellular_device";
const char kUnknownCellularDevicePath[] = "unknown_cellular_device";
const char kDefaultWifiDevicePath[] = "stub_wifi_device";
const char kResultSuccess[] = "success";
+const char kDefaultPin[] = "1111";
} // namespace
@@ -299,12 +300,10 @@ TEST_F(NetworkDeviceHandlerTest, SetCarrier) {
}
TEST_F(NetworkDeviceHandlerTest, RequirePin) {
- const char kPin[] = "1234";
-
// Test that the success callback gets called.
network_device_handler_->RequirePin(kDefaultCellularDevicePath,
true,
- kPin,
+ kDefaultPin,
success_callback_,
error_callback_);
message_loop_.RunUntilIdle();
@@ -313,7 +312,7 @@ TEST_F(NetworkDeviceHandlerTest, RequirePin) {
// Test that the shill error propagates to the error callback.
network_device_handler_->RequirePin(kUnknownCellularDevicePath,
true,
- kPin,
+ kDefaultPin,
success_callback_,
error_callback_);
message_loop_.RunUntilIdle();
@@ -321,17 +320,19 @@ TEST_F(NetworkDeviceHandlerTest, RequirePin) {
}
TEST_F(NetworkDeviceHandlerTest, EnterPin) {
- const char kPin[] = "1234";
-
// Test that the success callback gets called.
- network_device_handler_->EnterPin(
- kDefaultCellularDevicePath, kPin, success_callback_, error_callback_);
+ network_device_handler_->EnterPin(kDefaultCellularDevicePath,
+ kDefaultPin,
+ success_callback_,
+ error_callback_);
message_loop_.RunUntilIdle();
EXPECT_EQ(kResultSuccess, result_);
// Test that the shill error propagates to the error callback.
- network_device_handler_->EnterPin(
- kUnknownCellularDevicePath, kPin, success_callback_, error_callback_);
+ network_device_handler_->EnterPin(kUnknownCellularDevicePath,
+ kDefaultPin,
+ success_callback_,
+ error_callback_);
message_loop_.RunUntilIdle();
EXPECT_EQ(NetworkDeviceHandler::kErrorDeviceMissing, result_);
}

Powered by Google App Engine
This is Rietveld 408576698