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

Side by Side Diff: chrome/browser/chromeos/policy/device_status_collector_browsertest.cc

Issue 477663004: Merged FakedDBusThreadManager with DBusThreadManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 3 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 "chrome/browser/chromeos/policy/device_status_collector.h" 5 #include "chrome/browser/chromeos/policy/device_status_collector.h"
6 6
7 #include "base/environment.h" 7 #include "base/environment.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 em::NetworkInterface::TYPE_BLUETOOTH }, 702 em::NetworkInterface::TYPE_BLUETOOTH },
703 { "/device/vpn", shill::kTypeVPN, "vpn", 703 { "/device/vpn", shill::kTypeVPN, "vpn",
704 "", "", "", 704 "", "", "",
705 -1 }, 705 -1 },
706 }; 706 };
707 707
708 class DeviceStatusCollectorNetworkInterfacesTest 708 class DeviceStatusCollectorNetworkInterfacesTest
709 : public DeviceStatusCollectorTest { 709 : public DeviceStatusCollectorTest {
710 protected: 710 protected:
711 virtual void SetUp() OVERRIDE { 711 virtual void SetUp() OVERRIDE {
712 chromeos::DBusThreadManager::InitializeWithStub(); 712 chromeos::DBusThreadManager::Initialize();
713 chromeos::NetworkHandler::Initialize(); 713 chromeos::NetworkHandler::Initialize();
714 chromeos::ShillDeviceClient::TestInterface* test_device_client = 714 chromeos::ShillDeviceClient::TestInterface* test_device_client =
715 chromeos::DBusThreadManager::Get()->GetShillDeviceClient()-> 715 chromeos::DBusThreadManager::Get()->GetShillDeviceClient()->
716 GetTestInterface(); 716 GetTestInterface();
717 test_device_client->ClearDevices(); 717 test_device_client->ClearDevices();
718 for (size_t i = 0; i < arraysize(kFakeDevices); ++i) { 718 for (size_t i = 0; i < arraysize(kFakeDevices); ++i) {
719 const FakeDeviceData& dev = kFakeDevices[i]; 719 const FakeDeviceData& dev = kFakeDevices[i];
720 test_device_client->AddDevice(dev.device_path, dev.type, 720 test_device_client->AddDevice(dev.device_path, dev.type,
721 dev.object_path); 721 dev.object_path);
722 if (*dev.mac_address) { 722 if (*dev.mac_address) {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 } 787 }
788 788
789 EXPECT_TRUE(found_match) << "No matching interface for fake device " << i; 789 EXPECT_TRUE(found_match) << "No matching interface for fake device " << i;
790 count++; 790 count++;
791 } 791 }
792 792
793 EXPECT_EQ(count, status_.network_interface_size()); 793 EXPECT_EQ(count, status_.network_interface_size());
794 } 794 }
795 795
796 } // namespace policy 796 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698