diff options
author | stevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-25 20:39:54 +0000 |
---|---|---|
committer | stevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-25 20:39:54 +0000 |
commit | 6f9396659fe310830483e1239816ec90d27a4b35 (patch) | |
tree | 1ab2b1ec89c7cf0f8548e8cad19d4116373f25b3 /chromeos/network | |
parent | 53a6c1eff8bedf9638d4d4c3f2c23898b4587bcc (diff) | |
download | chromium_src-6f9396659fe310830483e1239816ec90d27a4b35.zip chromium_src-6f9396659fe310830483e1239816ec90d27a4b35.tar.gz chromium_src-6f9396659fe310830483e1239816ec90d27a4b35.tar.bz2 |
Eliminate use of sim unlock UI notifications
This includes some changes to the Fake Shill implementation to support
enabling sim lock to test the UI. (Was also tested using pseudomodem).
BUG=279351
For c/b/resources
TBR=xiyuan@chromium.org
Review URL: https://codereview.chromium.org/399303003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285666 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/network')
-rw-r--r-- | chromeos/network/network_device_handler_unittest.cc | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/chromeos/network/network_device_handler_unittest.cc b/chromeos/network/network_device_handler_unittest.cc index fb1fc29..af4b93f 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_); } |