chromium/components/content_settings/browser/ui/cookie_controls_util_unittest.cc

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

#include "components/content_settings/browser/ui/cookie_controls_util.h"

#include "base/environment.h"
#include "base/test/icu_test_util.h"
#include "base/time/time_override.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace content_settings {
namespace {
Eq;

const char kNewYorkTime[] =;

struct StaticOverrideTime {};

base::Time StaticOverrideTime::override_time;

// A scoped wrapper that uses both tzset() and ScopedRestoreDefaultTimezone.
//
// Some platforms use posix time and some use ICU time.
// ScopedRestoreDefaultTimezone only supports systems using ICU time, so without
// setting the timezone both ways timezone dependent tests fail on some
// platforms.
//
// Not thread safe.
class ScopedMockTimezone {};
}  // namespace

class CookieControlsUtilTest : public ::testing::Test {};

// Return value of 0 represents times that occur today.
TEST_F(CookieControlsUtilTest, Today) {}

// Return value of 1 represents times that occur tomorrow.
TEST_F(CookieControlsUtilTest, Tomorrow) {}

TEST_F(CookieControlsUtilTest, TwoDays) {}

TEST_F(CookieControlsUtilTest, Past) {}

// On Fuchsia posix local time functions always use UTC.
#if !BUILDFLAG(IS_FUCHSIA)
// For 2023 DST for New York timezone is from March 12 to November 5.
TEST_F(CookieControlsUtilTest, DSTOverlap) {}
#endif

TEST_F(CookieControlsUtilTest, NoDSTOverlapOutsideDST) {}

TEST_F(CookieControlsUtilTest, NoDSTOverlapInDST) {}

}  // namespace content_settings