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

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

Issue 2337893002: dbus: Remove dbus::FileDescriptor (Closed)
Patch Set: Created 4 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
« no previous file with comments | « chromeos/dbus/mock_permission_broker_client.cc ('k') | dbus/BUILD.gn » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/firewall_hole.h" 5 #include "chromeos/network/firewall_hole.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "chromeos/dbus/dbus_thread_manager.h" 10 #include "chromeos/dbus/dbus_thread_manager.h"
11 #include "chromeos/dbus/mock_permission_broker_client.h" 11 #include "chromeos/dbus/mock_permission_broker_client.h"
12 #include "dbus/file_descriptor.h"
13 #include "testing/gmock/include/gmock/gmock.h" 12 #include "testing/gmock/include/gmock/gmock.h"
14 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
15 14
16 using chromeos::DBusThreadManager; 15 using chromeos::DBusThreadManager;
17 using chromeos::FirewallHole; 16 using chromeos::FirewallHole;
18 using chromeos::MockPermissionBrokerClient; 17 using chromeos::MockPermissionBrokerClient;
19 using testing::_; 18 using testing::_;
20 19
21 namespace { 20 namespace {
22 21
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 TEST_F(FirewallHoleTest, DenyUdpPortAccess) { 98 TEST_F(FirewallHoleTest, DenyUdpPortAccess) {
100 EXPECT_CALL(*mock_permission_broker_client_, 99 EXPECT_CALL(*mock_permission_broker_client_,
101 RequestUdpPortAccess(1234, "foo0", _, _)) 100 RequestUdpPortAccess(1234, "foo0", _, _))
102 .WillOnce(InvokeCallback<3>(false)); 101 .WillOnce(InvokeCallback<3>(false));
103 102
104 FirewallHole::Open( 103 FirewallHole::Open(
105 FirewallHole::PortType::UDP, 1234, "foo0", 104 FirewallHole::PortType::UDP, 1234, "foo0",
106 base::Bind(&FirewallHoleTest::AssertOpenFailure, base::Unretained(this))); 105 base::Bind(&FirewallHoleTest::AssertOpenFailure, base::Unretained(this)));
107 run_loop_.Run(); 106 run_loop_.Run();
108 } 107 }
OLDNEW
« no previous file with comments | « chromeos/dbus/mock_permission_broker_client.cc ('k') | dbus/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698