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

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

Issue 10391170: Add RequestUpdate to NetworkSmsHandler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address nit Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chromeos/network/network_sms_handler.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 "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "chromeos/dbus/dbus_thread_manager.h" 9 #include "chromeos/dbus/dbus_thread_manager.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 TEST_F(NetworkSmsHandlerTest, SmsHandlerDbusStub) { 51 TEST_F(NetworkSmsHandlerTest, SmsHandlerDbusStub) {
52 // This relies on the stub dbus implementations for FlimflamManagerClient, 52 // This relies on the stub dbus implementations for FlimflamManagerClient,
53 // FlimflamDeviceClient, and GsmSMSClient. 53 // FlimflamDeviceClient, and GsmSMSClient.
54 // Initialize a sms handler. The stub dbus clients will send the first test 54 // Initialize a sms handler. The stub dbus clients will send the first test
55 // message when Gsm.SMS.List is called in NetworkSmsHandler::Init. 55 // message when Gsm.SMS.List is called in NetworkSmsHandler::Init.
56 scoped_ptr<NetworkSmsHandler> sms_handler(new NetworkSmsHandler()); 56 scoped_ptr<NetworkSmsHandler> sms_handler(new NetworkSmsHandler());
57 scoped_ptr<TestObserver> test_observer(new TestObserver()); 57 scoped_ptr<TestObserver> test_observer(new TestObserver());
58 sms_handler->AddObserver(test_observer.get()); 58 sms_handler->AddObserver(test_observer.get());
59 sms_handler->Init(); 59 sms_handler->Init();
60 message_loop_.RunAllPending(); 60 message_loop_.RunAllPending();
61 sms_handler->RequestUpdate();
62 message_loop_.RunAllPending();
61 EXPECT_GE(test_observer->message_count(), 1); 63 EXPECT_GE(test_observer->message_count(), 1);
62 } 64 }
63 65
64 } // namespace chromeos 66 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/network_sms_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698