blob: 716491e77d4471dac7b303d9c1a9136f6254f373 [file] [log] [blame]
James Cooke811c3bd2019-04-15 18:23:241// Copyright 2019 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#include "chrome/browser/chromeos/startup_settings_cache.h"
6
7#include "base/macros.h"
8#include "base/path_service.h"
9#include "base/test/scoped_path_override.h"
10#include "chrome/common/chrome_paths.h"
11#include "testing/gtest/include/gtest/gtest.h"
12
13namespace chromeos {
14
15class StartupSettingsCacheTest : public testing::Test {
16 protected:
17 StartupSettingsCacheTest() : user_data_dir_override_(chrome::DIR_USER_DATA) {}
18 ~StartupSettingsCacheTest() override {}
19
20 private:
21 // Map DIR_USER_DATA to a temp dir.
22 base::ScopedPathOverride user_data_dir_override_;
23
24 DISALLOW_COPY_AND_ASSIGN(StartupSettingsCacheTest);
25};
26
27TEST_F(StartupSettingsCacheTest, RoundTrip) {
28 startup_settings_cache::WriteAppLocale("foo");
29 EXPECT_EQ("foo", startup_settings_cache::ReadAppLocale());
30}
31
32} // namespace chromeos