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

Side by Side Diff: chrome/browser/chromeos/options/wifi_config_view_browsertest.cc

Issue 2010001: Refactor WifiNetwork, CellularNetwork, and EthernetNetwork into classes to ma... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/options/wifi_config_view.cc ('k') | chrome/browser/chromeos/status/network_menu_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698