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

Unified Diff: chromeos/network/network_configuration_handler_unittest.cc

Issue 14566009: Add NetworkConnectionHandler class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert Associating Stub change for test Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/network/network_configuration_handler.cc ('k') | chromeos/network/network_connection_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/network_configuration_handler_unittest.cc
diff --git a/chromeos/network/network_configuration_handler_unittest.cc b/chromeos/network/network_configuration_handler_unittest.cc
index e33f64aedb96e9ed13493f249173c467f55e2b75..c5f4f3a706d17ce1ff6c4dffc467f8dc68b25167 100644
--- a/chromeos/network/network_configuration_handler_unittest.cc
+++ b/chromeos/network/network_configuration_handler_unittest.cc
@@ -50,7 +50,7 @@ void DictionaryValueCallback(
void ErrorCallback(bool error_expected,
const std::string& expected_id,
const std::string& error_name,
- const scoped_ptr<base::DictionaryValue> error_data) {
+ scoped_ptr<base::DictionaryValue> error_data) {
EXPECT_TRUE(error_expected) << "Unexpected error: " << error_name
<< " with associated data: \n"
<< PrettyJson(*error_data);
@@ -134,18 +134,6 @@ class NetworkConfigurationHandlerTest : public testing::Test {
callback.Run(result);
}
- void OnConnect(const dbus::ObjectPath& service_path,
- const base::Closure& callback,
- const ShillClientHelper::ErrorCallback& error_callback) {
- callback.Run();
- }
-
- void OnDisconnect(const dbus::ObjectPath& service_path,
- const base::Closure& callback,
- const ShillClientHelper::ErrorCallback& error_callback) {
- callback.Run();
- }
-
void OnGetService(const base::DictionaryValue& properties,
const ObjectPathCallback& callback,
const ShillClientHelper::ErrorCallback& error_callback) {
@@ -296,34 +284,6 @@ TEST_F(NetworkConfigurationHandlerTest, ClearPropertiesError) {
message_loop_.RunUntilIdle();
}
-TEST_F(NetworkConfigurationHandlerTest, Connect) {
- std::string service_path = "/service/1";
-
- EXPECT_CALL(*mock_service_client_,
- Connect(_, _, _)).WillOnce(
- Invoke(this,
- &NetworkConfigurationHandlerTest::OnConnect));
- NetworkConfigurationHandler::Get()->Connect(
- service_path,
- base::Bind(&base::DoNothing),
- base::Bind(&ErrorCallback, false, service_path));
- message_loop_.RunUntilIdle();
-}
-
-TEST_F(NetworkConfigurationHandlerTest, Disconnect) {
- std::string service_path = "/service/1";
-
- EXPECT_CALL(*mock_service_client_,
- Disconnect(_, _, _)).WillOnce(
- Invoke(this,
- &NetworkConfigurationHandlerTest::OnDisconnect));
- NetworkConfigurationHandler::Get()->Disconnect(
- service_path,
- base::Bind(&base::DoNothing),
- base::Bind(&ErrorCallback, false, service_path));
- message_loop_.RunUntilIdle();
-}
-
TEST_F(NetworkConfigurationHandlerTest, CreateConfiguration) {
std::string expected_json = "{\n \"SSID\": \"MyNetwork\"\n}\n";
std::string networkName = "MyNetwork";
« no previous file with comments | « chromeos/network/network_configuration_handler.cc ('k') | chromeos/network/network_connection_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698