| OLD | NEW |
| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 // Initialize DBusThreadManager with a stub implementation. | 58 // Initialize DBusThreadManager with a stub implementation. |
| 59 DBusThreadManager::InitializeWithStub(); | 59 DBusThreadManager::InitializeWithStub(); |
| 60 ShillManagerClient::TestInterface* manager_test = | 60 ShillManagerClient::TestInterface* manager_test = |
| 61 DBusThreadManager::Get()->GetShillManagerClient()->GetTestInterface(); | 61 DBusThreadManager::Get()->GetShillManagerClient()->GetTestInterface(); |
| 62 ASSERT_TRUE(manager_test); | 62 ASSERT_TRUE(manager_test); |
| 63 manager_test->AddDevice("stub_cellular_device2"); | 63 manager_test->AddDevice("stub_cellular_device2"); |
| 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("stub_cellular_device2", flimflam::kTypeCellular, | 67 device_test->AddDevice("stub_cellular_device2", flimflam::kTypeCellular, |
| 68 "/org/freedesktop/ModemManager1/stub/0", ":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 MessageLoopForUI message_loop_; |
| 77 }; | 77 }; |
| 78 | 78 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 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 |
| OLD | NEW |