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

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

Issue 15774005: chromeos: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 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) 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 ASSERT_TRUE(device_test); 66 ASSERT_TRUE(device_test);
67 device_test->AddDevice("stub_cellular_device2", flimflam::kTypeCellular, 67 device_test->AddDevice("stub_cellular_device2", flimflam::kTypeCellular,
68 "/org/freedesktop/ModemManager1/stub/0"); 68 "/org/freedesktop/ModemManager1/stub/0");
69 } 69 }
70 70
71 virtual void TearDown() OVERRIDE { 71 virtual void TearDown() OVERRIDE {
72 DBusThreadManager::Shutdown(); 72 DBusThreadManager::Shutdown();
73 } 73 }
74 74
75 protected: 75 protected:
76 MessageLoopForUI message_loop_; 76 base::MessageLoopForUI message_loop_;
77 }; 77 };
78 78
79 TEST_F(NetworkSmsHandlerTest, SmsHandlerDbusStub) { 79 TEST_F(NetworkSmsHandlerTest, SmsHandlerDbusStub) {
80 // Append '--sms-test-messages' to the command line to tell SMSClientStubImpl 80 // Append '--sms-test-messages' to the command line to tell SMSClientStubImpl
81 // to generate a series of test SMS messages. 81 // to generate a series of test SMS messages.
82 CommandLine* command_line = CommandLine::ForCurrentProcess(); 82 CommandLine* command_line = CommandLine::ForCurrentProcess();
83 command_line->AppendSwitch(chromeos::switches::kSmsTestMessages); 83 command_line->AppendSwitch(chromeos::switches::kSmsTestMessages);
84 84
85 // This relies on the stub dbus implementations for ShillManagerClient, 85 // This relies on the stub dbus implementations for ShillManagerClient,
86 // ShillDeviceClient, GsmSMSClient, ModemMessagingClient and SMSClient. 86 // ShillDeviceClient, GsmSMSClient, ModemMessagingClient and SMSClient.
(...skipping 16 matching lines...) Expand all
103 103
104 // Test for messages delivered by signals. 104 // Test for messages delivered by signals.
105 test_observer->ClearMessages(); 105 test_observer->ClearMessages();
106 sms_handler->RequestUpdate(); 106 sms_handler->RequestUpdate();
107 message_loop_.RunUntilIdle(); 107 message_loop_.RunUntilIdle();
108 EXPECT_GE(test_observer->message_count(), 1); 108 EXPECT_GE(test_observer->message_count(), 1);
109 EXPECT_NE(messages.find(kMessage1), messages.end()); 109 EXPECT_NE(messages.find(kMessage1), messages.end());
110 } 110 }
111 111
112 } // namespace chromeos 112 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/network_connection_handler_unittest.cc ('k') | chromeos/network/network_state_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698