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

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

Issue 91373004: Move DBusClient stub implementations into separate files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years 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
« no previous file with comments | « chromeos/dbus/sms_client.cc ('k') | no next file » | 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 }; 96 };
97 97
98 TEST_F(NetworkSmsHandlerTest, SmsHandlerDbusStub) { 98 TEST_F(NetworkSmsHandlerTest, SmsHandlerDbusStub) {
99 EXPECT_EQ(test_observer_->message_count(), 0); 99 EXPECT_EQ(test_observer_->message_count(), 0);
100 100
101 // Test that no messages have been received yet 101 // Test that no messages have been received yet
102 const std::set<std::string>& messages(test_observer_->messages()); 102 const std::set<std::string>& messages(test_observer_->messages());
103 // Note: The following string corresponds to values in 103 // Note: The following string corresponds to values in
104 // ModemMessagingClientStubImpl and SmsClientStubImpl. 104 // ModemMessagingClientStubImpl and SmsClientStubImpl.
105 // TODO(stevenjb): Use a TestInterface to set this up to remove dependency. 105 // TODO(stevenjb): Use a TestInterface to set this up to remove dependency.
106 const char kMessage1[] = "SMSClientStubImpl: Test Message: /SMS/0"; 106 const char kMessage1[] = "FakeSMSClient: Test Message: /SMS/0";
107 EXPECT_EQ(messages.find(kMessage1), messages.end()); 107 EXPECT_EQ(messages.find(kMessage1), messages.end());
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/dbus/sms_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698