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

Side by Side Diff: chromeos/network/network_sms_handler_unittest.cc

Issue 24348002: Migrate DBus service constants from flimflam namespace to shill namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased to ToT Created 7 years, 3 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
« no previous file with comments | « chromeos/network/network_sms_handler.cc ('k') | chromeos/network/network_state.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chromeos/network/network_sms_handler.h" 5 #include "chromeos/network/network_sms_handler.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 // Initialize DBusThreadManager with a stub implementation. 63 // Initialize DBusThreadManager with a stub implementation.
64 DBusThreadManager::InitializeWithStub(); 64 DBusThreadManager::InitializeWithStub();
65 ShillManagerClient::TestInterface* manager_test = 65 ShillManagerClient::TestInterface* manager_test =
66 DBusThreadManager::Get()->GetShillManagerClient()->GetTestInterface(); 66 DBusThreadManager::Get()->GetShillManagerClient()->GetTestInterface();
67 ASSERT_TRUE(manager_test); 67 ASSERT_TRUE(manager_test);
68 manager_test->AddDevice("stub_cellular_device2"); 68 manager_test->AddDevice("stub_cellular_device2");
69 ShillDeviceClient::TestInterface* device_test = 69 ShillDeviceClient::TestInterface* device_test =
70 DBusThreadManager::Get()->GetShillDeviceClient()->GetTestInterface(); 70 DBusThreadManager::Get()->GetShillDeviceClient()->GetTestInterface();
71 ASSERT_TRUE(device_test); 71 ASSERT_TRUE(device_test);
72 device_test->AddDevice("stub_cellular_device2", flimflam::kTypeCellular, 72 device_test->AddDevice("stub_cellular_device2", shill::kTypeCellular,
73 "/org/freedesktop/ModemManager1/stub/0"); 73 "/org/freedesktop/ModemManager1/stub/0");
74 74
75 // This relies on the stub dbus implementations for ShillManagerClient, 75 // This relies on the stub dbus implementations for ShillManagerClient,
76 // ShillDeviceClient, GsmSMSClient, ModemMessagingClient and SMSClient. 76 // ShillDeviceClient, GsmSMSClient, ModemMessagingClient and SMSClient.
77 // Initialize a sms handler. The stub dbus clients will not send the 77 // Initialize a sms handler. The stub dbus clients will not send the
78 // first test message until RequestUpdate has been called. 78 // first test message until RequestUpdate has been called.
79 network_sms_handler_.reset(new NetworkSmsHandler()); 79 network_sms_handler_.reset(new NetworkSmsHandler());
80 network_sms_handler_->Init(); 80 network_sms_handler_->Init();
81 test_observer_.reset(new TestObserver()); 81 test_observer_.reset(new TestObserver());
82 network_sms_handler_->AddObserver(test_observer_.get()); 82 network_sms_handler_->AddObserver(test_observer_.get());
(...skipping 25 matching lines...) Expand all
108 108
109 // Test for messages delivered by signals. 109 // Test for messages delivered by signals.
110 test_observer_->ClearMessages(); 110 test_observer_->ClearMessages();
111 network_sms_handler_->RequestUpdate(false); 111 network_sms_handler_->RequestUpdate(false);
112 message_loop_.RunUntilIdle(); 112 message_loop_.RunUntilIdle();
113 EXPECT_GE(test_observer_->message_count(), 1); 113 EXPECT_GE(test_observer_->message_count(), 1);
114 EXPECT_NE(messages.find(kMessage1), messages.end()); 114 EXPECT_NE(messages.find(kMessage1), messages.end());
115 } 115 }
116 116
117 } // namespace chromeos 117 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/network_sms_handler.cc ('k') | chromeos/network/network_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698