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

Unified Diff: chrome/browser/chromeos/scoped_sys_info_chromeos_version_for_testing.h

Issue 2907493002: ChromeOS: Per-user time zone: refactor tests first. (Closed)
Patch Set: Update after review. Created 3 years, 7 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
Index: chrome/browser/chromeos/scoped_sys_info_chromeos_version_for_testing.h
diff --git a/chrome/browser/chromeos/scoped_sys_info_chromeos_version_for_testing.h b/chrome/browser/chromeos/scoped_sys_info_chromeos_version_for_testing.h
new file mode 100644
index 0000000000000000000000000000000000000000..84b98cc4525ad864aefebe3a5c7ea214170e2006
--- /dev/null
+++ b/chrome/browser/chromeos/scoped_sys_info_chromeos_version_for_testing.h
@@ -0,0 +1,28 @@
+// Copyright 2017 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.
+
+#ifndef SCOPED_SYS_INFO_CHROMEOS_VERSION_FOR_TESTING_H_
+#define SCOPED_SYS_INFO_CHROMEOS_VERSION_FOR_TESTING_H_
+
+#include <string>
+
+#include "base/time/time.h"
+
+namespace chromeos {
+
+// unit_tests must always reset status of modified global singletons,
+// otherwise later tests will fail, because they are run in the same process.
+class ScopedSetRunningOnChromeOSForTesting {
+ public:
+ ScopedSetRunningOnChromeOSForTesting(const std::string& lsb_release,
+ const base::Time& lsb_release_time);
+ ~ScopedSetRunningOnChromeOSForTesting();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ScopedSetRunningOnChromeOSForTesting);
+};
+
+} // namespace chromeos
+
+#endif // SCOPED_SYS_INFO_CHROMEOS_VERSION_FOR_TESTING_H_

Powered by Google App Engine
This is Rietveld 408576698