blob: 1b4da3847c17bba01c6dd7a8fffb9df40467b801 [file] [log] [blame]
James Cook208321c2020-11-21 00:43:391// Copyright 2020 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.
4
5#ifndef BASE_TEST_SCOPED_RUNNING_ON_CHROMEOS_H_
6#define BASE_TEST_SCOPED_RUNNING_ON_CHROMEOS_H_
7
8namespace base {
9namespace test {
10
11// Test helper that forces base::SysInfo::IsRunningOnChromeOS() to return true.
12// NOTE: Must be created on the main thread before any other threads are
13// started. Cannot be nested.
14class ScopedRunningOnChromeOS {
15 public:
16 ScopedRunningOnChromeOS();
17 ScopedRunningOnChromeOS(const ScopedRunningOnChromeOS&) = delete;
18 ScopedRunningOnChromeOS& operator=(const ScopedRunningOnChromeOS&) = delete;
19 ~ScopedRunningOnChromeOS();
20};
21
22} // namespace test
23} // namespace base
24
25#endif // BASE_TEST_SCOPED_RUNNING_ON_CHROMEOS_H_