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

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

Issue 825473002: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 12 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/login/login_state.cc ('k') | chromeos/process_proxy/process_proxy.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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 } // namespace 49 } // namespace
50 50
51 class NetworkSmsHandlerTest : public testing::Test { 51 class NetworkSmsHandlerTest : public testing::Test {
52 public: 52 public:
53 NetworkSmsHandlerTest() {} 53 NetworkSmsHandlerTest() {}
54 virtual ~NetworkSmsHandlerTest() {} 54 virtual ~NetworkSmsHandlerTest() {}
55 55
56 virtual void SetUp() override { 56 virtual void SetUp() override {
57 // Append '--sms-test-messages' to the command line to tell 57 // Append '--sms-test-messages' to the command line to tell
58 // SMSClientStubImpl to generate a series of test SMS messages. 58 // SMSClientStubImpl to generate a series of test SMS messages.
59 CommandLine* command_line = CommandLine::ForCurrentProcess(); 59 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
60 command_line->AppendSwitch(chromeos::switches::kSmsTestMessages); 60 command_line->AppendSwitch(chromeos::switches::kSmsTestMessages);
61 61
62 // Initialize DBusThreadManager with a stub implementation. 62 // Initialize DBusThreadManager with a stub implementation.
63 DBusThreadManager::Initialize(); 63 DBusThreadManager::Initialize();
64 ShillDeviceClient::TestInterface* device_test = 64 ShillDeviceClient::TestInterface* device_test =
65 DBusThreadManager::Get()->GetShillDeviceClient()->GetTestInterface(); 65 DBusThreadManager::Get()->GetShillDeviceClient()->GetTestInterface();
66 ASSERT_TRUE(device_test); 66 ASSERT_TRUE(device_test);
67 device_test->AddDevice("/org/freedesktop/ModemManager1/stub/0", 67 device_test->AddDevice("/org/freedesktop/ModemManager1/stub/0",
68 shill::kTypeCellular, 68 shill::kTypeCellular,
69 "stub_cellular_device2"); 69 "stub_cellular_device2");
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 // Test for messages delivered by signals. 105 // Test for messages delivered by signals.
106 test_observer_->ClearMessages(); 106 test_observer_->ClearMessages();
107 network_sms_handler_->RequestUpdate(false); 107 network_sms_handler_->RequestUpdate(false);
108 message_loop_.RunUntilIdle(); 108 message_loop_.RunUntilIdle();
109 EXPECT_GE(test_observer_->message_count(), 1); 109 EXPECT_GE(test_observer_->message_count(), 1);
110 EXPECT_NE(messages.find(kMessage1), messages.end()); 110 EXPECT_NE(messages.find(kMessage1), messages.end());
111 } 111 }
112 112
113 } // namespace chromeos 113 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/login/login_state.cc ('k') | chromeos/process_proxy/process_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698