| 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "app/combobox_model.h" | 7 #include "app/combobox_model.h" |
| 8 #include "app/l10n_util.h" | 8 #include "app/l10n_util.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 DummyComboboxModel combobox_model; | 357 DummyComboboxModel combobox_model; |
| 358 views::Combobox combobox(&combobox_model); | 358 views::Combobox combobox(&combobox_model); |
| 359 | 359 |
| 360 // Emulate combobox selection. | 360 // Emulate combobox selection. |
| 361 EthernetExpectations(false, false); | 361 EthernetExpectations(false, false); |
| 362 WifiCellularNetworksExpectations(); | 362 WifiCellularNetworksExpectations(); |
| 363 WifiSsidExpectation(std::string()); | 363 WifiSsidExpectation(std::string()); |
| 364 network_screen->ItemChanged(&combobox, 0, 1); | 364 network_screen->ItemChanged(&combobox, 0, 1); |
| 365 network_view->SetSelectedNetworkItem(1); | 365 network_view->SetSelectedNetworkItem(1); |
| 366 EXPECT_CALL(*mock_network_library_, | 366 EXPECT_CALL(*mock_network_library_, |
| 367 ConnectToWifiNetwork(A<WifiNetwork>(), string16(), string16(), | 367 ConnectToWifiNetwork(A<WifiNetwork>(), std::string(), |
| 368 string16())) | 368 std::string(), std::string())) |
| 369 .Times(1); | 369 .Times(1); |
| 370 ui_test_utils::RunAllPendingInMessageLoop(); | 370 ui_test_utils::RunAllPendingInMessageLoop(); |
| 371 NetworkChangedExpectations(true); | 371 NetworkChangedExpectations(true); |
| 372 network_screen->NetworkChanged(network_library); | 372 network_screen->NetworkChanged(network_library); |
| 373 ASSERT_EQ(2, network_screen->GetItemCount()); | 373 ASSERT_EQ(2, network_screen->GetItemCount()); |
| 374 | 374 |
| 375 // Emulate connecting to WiFi network. | 375 // Emulate connecting to WiFi network. |
| 376 EthernetExpectations(false, false); | 376 EthernetExpectations(false, false); |
| 377 SetupWifiNetwork(false, true); | 377 SetupWifiNetwork(false, true); |
| 378 WifiExpectations(false, true); | 378 WifiExpectations(false, true); |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 DummyComboboxModel combobox_model; | 475 DummyComboboxModel combobox_model; |
| 476 views::Combobox combobox(&combobox_model); | 476 views::Combobox combobox(&combobox_model); |
| 477 | 477 |
| 478 // Emulate combobox selection. | 478 // Emulate combobox selection. |
| 479 EthernetExpectations(false, false); | 479 EthernetExpectations(false, false); |
| 480 WifiCellularNetworksExpectations(); | 480 WifiCellularNetworksExpectations(); |
| 481 WifiSsidExpectation(std::string()); | 481 WifiSsidExpectation(std::string()); |
| 482 network_screen->ItemChanged(&combobox, 0, 1); | 482 network_screen->ItemChanged(&combobox, 0, 1); |
| 483 network_view->SetSelectedNetworkItem(1); | 483 network_view->SetSelectedNetworkItem(1); |
| 484 EXPECT_CALL(*mock_network_library_, | 484 EXPECT_CALL(*mock_network_library_, |
| 485 ConnectToWifiNetwork(A<WifiNetwork>(), string16(), string16(), | 485 ConnectToWifiNetwork(A<WifiNetwork>(), std::string(), |
| 486 string16())) | 486 std::string(), std::string())) |
| 487 .Times(1); | 487 .Times(1); |
| 488 ui_test_utils::RunAllPendingInMessageLoop(); | 488 ui_test_utils::RunAllPendingInMessageLoop(); |
| 489 NetworkChangedExpectations(true); | 489 NetworkChangedExpectations(true); |
| 490 network_screen->NetworkChanged(network_library); | 490 network_screen->NetworkChanged(network_library); |
| 491 ASSERT_EQ(2, network_screen->GetItemCount()); | 491 ASSERT_EQ(2, network_screen->GetItemCount()); |
| 492 | 492 |
| 493 // Emulate connecting to WiFi network. | 493 // Emulate connecting to WiFi network. |
| 494 EthernetExpectations(false, false); | 494 EthernetExpectations(false, false); |
| 495 SetupWifiNetwork(false, true); | 495 SetupWifiNetwork(false, true); |
| 496 WifiExpectations(false, true); | 496 WifiExpectations(false, true); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 521 WifiExpectations(true, false); | 521 WifiExpectations(true, false); |
| 522 WifiCellularNetworksExpectations(); | 522 WifiCellularNetworksExpectations(); |
| 523 WifiSsidExpectation(wifi_.name()); | 523 WifiSsidExpectation(wifi_.name()); |
| 524 NetworkChangedExpectations(true); | 524 NetworkChangedExpectations(true); |
| 525 network_screen->NetworkChanged(network_library); | 525 network_screen->NetworkChanged(network_library); |
| 526 ui_test_utils::RunAllPendingInMessageLoop(); | 526 ui_test_utils::RunAllPendingInMessageLoop(); |
| 527 controller()->set_observer(NULL); | 527 controller()->set_observer(NULL); |
| 528 } | 528 } |
| 529 | 529 |
| 530 } // namespace chromeos | 530 } // namespace chromeos |
| OLD | NEW |