Add a minor text member to ui::MenuModel.
[chromium-blink-merge.git] / chrome / browser / usb / usb_context_unittest.cc
blob79c7c84dca697ce70bba1b82676d54a06be9e014
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/usb/usb_context.h"
7 #include "base/threading/platform_thread.h"
8 #include "build/build_config.h"
9 #include "testing/gtest/include/gtest/gtest.h"
11 namespace {
13 class UsbContextTest : public testing::Test {
14 protected:
15 class UsbContextForTest : public UsbContext {
16 public:
17 UsbContextForTest() : UsbContext() {}
18 private:
19 virtual ~UsbContextForTest() {}
20 DISALLOW_COPY_AND_ASSIGN(UsbContextForTest);
24 } // namespace
26 #if defined(OS_LINUX)
27 // Linux trybot does not support usb.
28 #define MAYBE_GracefulShutdown DISABLED_GracefulShutdown
29 #elif defined(OS_ANDROID)
30 // Android build does not include usb support.
31 #define MAYBE_GracefulShutdown DISABLED_GracefulShutdown
32 #else
33 #define MAYBE_GracefulShutdown GracefulShutdown
34 #endif
36 TEST_F(UsbContextTest, MAYBE_GracefulShutdown) {
37 base::TimeTicks start = base::TimeTicks::Now();
39 scoped_refptr<UsbContextForTest> context(new UsbContextForTest());
41 base::TimeDelta elapse = base::TimeTicks::Now() - start;
42 if (elapse > base::TimeDelta::FromSeconds(2)) {
43 FAIL();