| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/options/wifi_config_view.h" | 5 #include "chrome/browser/chromeos/options/wifi_config_view.h" |
| 6 | 6 |
| 7 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h" | 7 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h" |
| 8 #include "chrome/browser/chromeos/cros/mock_network_library.h" | 8 #include "chrome/browser/chromeos/cros/mock_network_library.h" |
| 9 | 9 |
| 10 namespace chromeos { | 10 namespace chromeos { |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 WifiConfigView* view = new WifiConfigView(NULL, WifiNetwork()); | 37 WifiConfigView* view = new WifiConfigView(NULL, WifiNetwork()); |
| 38 view->autoconnect_checkbox_->SetChecked( | 38 view->autoconnect_checkbox_->SetChecked( |
| 39 !view->autoconnect_checkbox_->checked()); | 39 !view->autoconnect_checkbox_->checked()); |
| 40 view->Save(); | 40 view->Save(); |
| 41 } | 41 } |
| 42 | 42 |
| 43 // Test that if password was changed, we call SaveWifiNetwork. | 43 // Test that if password was changed, we call SaveWifiNetwork. |
| 44 IN_PROC_BROWSER_TEST_F(WifiConfigViewTest, ChangePasswordSaveTest) { | 44 IN_PROC_BROWSER_TEST_F(WifiConfigViewTest, ChangePasswordSaveTest) { |
| 45 EXPECT_CALL(*mock_network_library_, SaveWifiNetwork(_)).Times(1); | 45 EXPECT_CALL(*mock_network_library_, SaveWifiNetwork(_)).Times(1); |
| 46 WifiNetwork wifi = WifiNetwork(); | 46 WifiNetwork wifi = WifiNetwork(); |
| 47 wifi.encrypted = true; | 47 wifi.set_encryption(SECURITY_WEP); |
| 48 WifiConfigView* view = new WifiConfigView(NULL, wifi); | 48 WifiConfigView* view = new WifiConfigView(NULL, wifi); |
| 49 view->passphrase_textfield_->SetText(ASCIIToUTF16("test")); | 49 view->passphrase_textfield_->SetText(ASCIIToUTF16("test")); |
| 50 view->Save(); | 50 view->Save(); |
| 51 } | 51 } |
| 52 | 52 |
| 53 } // namespace chromeos | 53 } // namespace chromeos |
| OLD | NEW |