Index: chromeos/network/network_sms_handler_unittest.cc |
diff --git a/chromeos/network/network_sms_handler_unittest.cc b/chromeos/network/network_sms_handler_unittest.cc |
index 0e5fd2400665ea2a96b2efd1a1850e6037ba8247..f3b72ff37bcd7e6a279b717d36835b2c4adcbfbc 100644 |
--- a/chromeos/network/network_sms_handler_unittest.cc |
+++ b/chromeos/network/network_sms_handler_unittest.cc |
@@ -7,8 +7,10 @@ |
#include <set> |
#include <string> |
+#include "base/command_line.h" |
#include "base/memory/scoped_ptr.h" |
#include "base/message_loop.h" |
+#include "chromeos/chromeos_switches.h" |
#include "chromeos/dbus/dbus_thread_manager.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -63,6 +65,11 @@ class NetworkSmsHandlerTest : public testing::Test { |
}; |
TEST_F(NetworkSmsHandlerTest, SmsHandlerDbusStub) { |
+ // Append '--sms-test-messages' to the command line to tell SMSClientStubImpl |
+ // to generate a series of test SMS messages. |
+ CommandLine* command_line = CommandLine::ForCurrentProcess(); |
+ command_line->AppendSwitch(chromeos::switches::kSmsTestMessages); |
+ |
// This relies on the stub dbus implementations for FlimflamManagerClient, |
// FlimflamDeviceClient, GsmSMSClient, ModemMessagingClient and SMSClient. |
// Initialize a sms handler. The stub dbus clients will not send the |