chromium/chrome/common/chrome_paths_unittest.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/common/chrome_paths_internal.h"

#include <stdlib.h>

#include "base/base_paths.h"
#include "base/environment.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/path_service.h"
#include "build/branding_buildflags.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/common/chrome_constants.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace chrome {

// Test the behavior of chrome::GetUserCacheDirectory.
// See that function's comments for discussion of the subtleties.
TEST(ChromePaths, UserCacheDir) {}

// Chrome OS doesn't use any of the desktop linux configuration.
#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) && \
    !BUILDFLAG(IS_CHROMEOS_ASH)
TEST(ChromePaths, DefaultUserDataDir) {}
#endif

#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_CHROMEOS_ASH)
TEST(ChromePaths, UserMediaDirectories) {
  base::FilePath path;
  // Chrome OS does not support custom media directories.
  EXPECT_FALSE(GetUserMusicDirectory(&path));
  EXPECT_FALSE(GetUserPicturesDirectory(&path));
  EXPECT_FALSE(GetUserVideosDirectory(&path));
}
#endif

}  // namespace chrome