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

Unified Diff: device/devices_app/devices_apptest.cc

Issue 1682363002: Remove //device/devices_app. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove two files that somehow survived in //device/devices_app. Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/devices_app/devices_app.gyp ('k') | device/devices_app/main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/devices_app/devices_apptest.cc
diff --git a/device/devices_app/devices_apptest.cc b/device/devices_app/devices_apptest.cc
deleted file mode 100644
index 1ac56aeb404f1ea94b8348ae9ef313828223ae52..0000000000000000000000000000000000000000
--- a/device/devices_app/devices_apptest.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <utility>
-
-#include "base/bind.h"
-#include "base/callback.h"
-#include "base/macros.h"
-#include "base/run_loop.h"
-#include "device/devices_app/devices_app.h"
-#include "device/devices_app/usb/public/interfaces/device_manager.mojom.h"
-#include "mojo/shell/public/cpp/application_test_base.h"
-
-namespace device {
-namespace {
-
-class DevicesAppTest : public mojo::test::ApplicationTestBase {
- public:
- DevicesAppTest() {}
- ~DevicesAppTest() override {}
-
- void SetUp() override {
- ApplicationTestBase::SetUp();
- shell()->ConnectToInterface("mojo:devices", &usb_device_manager_);
- }
-
- usb::DeviceManager* usb_device_manager() { return usb_device_manager_.get(); }
-
- private:
- usb::DeviceManagerPtr usb_device_manager_;
-
- DISALLOW_COPY_AND_ASSIGN(DevicesAppTest);
-};
-
-void OnGetDevices(const base::Closure& continuation,
- mojo::Array<usb::DeviceInfoPtr> devices) {
- continuation.Run();
-}
-
-} // namespace
-
-// Simple test to verify that we can connect to the USB DeviceManager and get
-// a response.
-TEST_F(DevicesAppTest, GetUSBDevices) {
- base::RunLoop loop;
- usb::EnumerationOptionsPtr options = usb::EnumerationOptions::New();
- options->filters = mojo::Array<usb::DeviceFilterPtr>(1);
- options->filters[0] = usb::DeviceFilter::New();
- usb_device_manager()->GetDevices(
- std::move(options), base::Bind(&OnGetDevices, loop.QuitClosure()));
- loop.Run();
-}
-
-} // namespace device
« no previous file with comments | « device/devices_app/devices_app.gyp ('k') | device/devices_app/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698