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

Unified Diff: components/usb_service/usb_context_unittest.cc

Issue 497363004: Merge components/usb_service into device/usb. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/usb_service/usb_context.cc ('k') | components/usb_service/usb_device.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/usb_service/usb_context_unittest.cc
diff --git a/components/usb_service/usb_context_unittest.cc b/components/usb_service/usb_context_unittest.cc
deleted file mode 100644
index 2722cc563c154d05d00dd09b2349fd59e206c720..0000000000000000000000000000000000000000
--- a/components/usb_service/usb_context_unittest.cc
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2014 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 "base/threading/platform_thread.h"
-#include "build/build_config.h"
-#include "components/usb_service/usb_context.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "third_party/libusb/src/libusb/libusb.h"
-
-using usb_service::UsbContext;
-using usb_service::PlatformUsbContext;
-
-namespace {
-
-class UsbContextTest : public testing::Test {
- protected:
- class UsbContextForTest : public UsbContext {
- public:
- explicit UsbContextForTest(PlatformUsbContext context)
- : UsbContext(context) {}
-
- private:
- virtual ~UsbContextForTest() {}
- DISALLOW_COPY_AND_ASSIGN(UsbContextForTest);
- };
-};
-
-} // namespace
-
-#if defined(OS_LINUX)
-// Linux trybot does not support usb.
-#define MAYBE_GracefulShutdown DISABLED_GracefulShutdown
-#elif defined(OS_ANDROID)
-// Android build does not include usb support.
-#define MAYBE_GracefulShutdown DISABLED_GracefulShutdown
-#else
-#define MAYBE_GracefulShutdown GracefulShutdown
-#endif
-
-TEST_F(UsbContextTest, MAYBE_GracefulShutdown) {
- base::TimeTicks start = base::TimeTicks::Now();
- {
- PlatformUsbContext platform_context;
- ASSERT_EQ(LIBUSB_SUCCESS, libusb_init(&platform_context));
- scoped_refptr<UsbContextForTest> context(
- new UsbContextForTest(platform_context));
- }
- base::TimeDelta elapse = base::TimeTicks::Now() - start;
- if (elapse > base::TimeDelta::FromSeconds(2)) {
- FAIL();
- }
-}
« no previous file with comments | « components/usb_service/usb_context.cc ('k') | components/usb_service/usb_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698