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

Side by Side Diff: device/usb/mojo/device_impl_unittest.cc

Issue 2633053002: Remove the MessageLoop::DestructionObserver from mojo bindings. (Closed)
Patch Set: rebase Created 3 years, 10 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 | « device/bluetooth/device_unittest.cc ('k') | gpu/ipc/service/gpu_channel_manager.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 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 "device/usb/mojo/device_impl.h" 5 #include "device/usb/mojo/device_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 149
150 class USBDeviceImplTest : public testing::Test { 150 class USBDeviceImplTest : public testing::Test {
151 public: 151 public:
152 USBDeviceImplTest() 152 USBDeviceImplTest()
153 : message_loop_(new base::MessageLoop), 153 : message_loop_(new base::MessageLoop),
154 is_device_open_(false), 154 is_device_open_(false),
155 allow_reset_(false) {} 155 allow_reset_(false) {}
156 156
157 ~USBDeviceImplTest() override {} 157 ~USBDeviceImplTest() override {}
158 158
159 void TearDown() override { base::RunLoop().RunUntilIdle(); }
160
159 protected: 161 protected:
160 MockPermissionProvider& permission_provider() { return permission_provider_; } 162 MockPermissionProvider& permission_provider() { return permission_provider_; }
161 MockUsbDevice& mock_device() { return *mock_device_.get(); } 163 MockUsbDevice& mock_device() { return *mock_device_.get(); }
162 bool is_device_open() const { return is_device_open_; } 164 bool is_device_open() const { return is_device_open_; }
163 MockUsbDeviceHandle& mock_handle() { return *mock_handle_.get(); } 165 MockUsbDeviceHandle& mock_handle() { return *mock_handle_.get(); }
164 166
165 void set_allow_reset(bool allow_reset) { allow_reset_ = allow_reset; } 167 void set_allow_reset(bool allow_reset) { allow_reset_ = allow_reset; }
166 168
167 // Creates a mock device and binds a Device proxy to a Device service impl 169 // Creates a mock device and binds a Device proxy to a Device service impl
168 // wrapping the mock device. 170 // wrapping the mock device.
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 base::Bind(&ExpectPacketsInAndThen, fake_inbound_data, 897 base::Bind(&ExpectPacketsInAndThen, fake_inbound_data,
896 expected_transferred_lengths, loop.QuitClosure())); 898 expected_transferred_lengths, loop.QuitClosure()));
897 loop.Run(); 899 loop.Run();
898 } 900 }
899 901
900 EXPECT_CALL(mock_handle(), Close()); 902 EXPECT_CALL(mock_handle(), Close());
901 } 903 }
902 904
903 } // namespace usb 905 } // namespace usb
904 } // namespace device 906 } // namespace device
OLDNEW
« no previous file with comments | « device/bluetooth/device_unittest.cc ('k') | gpu/ipc/service/gpu_channel_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698