| OLD | NEW |
| 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 <utility> | 5 #include <utility> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| 11 #include "device/devices_app/devices_app.h" | 11 #include "device/devices_app/devices_app.h" |
| 12 #include "device/devices_app/usb/public/interfaces/device_manager.mojom.h" | 12 #include "device/devices_app/usb/public/interfaces/device_manager.mojom.h" |
| 13 #include "mojo/application/public/cpp/application_impl.h" | 13 #include "mojo/shell/public/cpp/application_impl.h" |
| 14 #include "mojo/application/public/cpp/application_test_base.h" | 14 #include "mojo/shell/public/cpp/application_test_base.h" |
| 15 | 15 |
| 16 namespace device { | 16 namespace device { |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 class DevicesAppTest : public mojo::test::ApplicationTestBase { | 19 class DevicesAppTest : public mojo::test::ApplicationTestBase { |
| 20 public: | 20 public: |
| 21 DevicesAppTest() {} | 21 DevicesAppTest() {} |
| 22 ~DevicesAppTest() override {} | 22 ~DevicesAppTest() override {} |
| 23 | 23 |
| 24 void SetUp() override { | 24 void SetUp() override { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 47 base::RunLoop loop; | 47 base::RunLoop loop; |
| 48 usb::EnumerationOptionsPtr options = usb::EnumerationOptions::New(); | 48 usb::EnumerationOptionsPtr options = usb::EnumerationOptions::New(); |
| 49 options->filters = mojo::Array<usb::DeviceFilterPtr>(1); | 49 options->filters = mojo::Array<usb::DeviceFilterPtr>(1); |
| 50 options->filters[0] = usb::DeviceFilter::New(); | 50 options->filters[0] = usb::DeviceFilter::New(); |
| 51 usb_device_manager()->GetDevices( | 51 usb_device_manager()->GetDevices( |
| 52 std::move(options), base::Bind(&OnGetDevices, loop.QuitClosure())); | 52 std::move(options), base::Bind(&OnGetDevices, loop.QuitClosure())); |
| 53 loop.Run(); | 53 loop.Run(); |
| 54 } | 54 } |
| 55 | 55 |
| 56 } // namespace device | 56 } // namespace device |
| OLD | NEW |