chromium/base/test/scoped_run_loop_timeout.cc

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

#include "base/test/scoped_run_loop_timeout.h"

#include <optional>

#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/strings/strcat.h"
#include "base/time/time.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace base::test {

namespace {

bool g_add_gtest_failure_on_timeout =;

std::unique_ptr<ScopedRunLoopTimeout::TimeoutCallback>
    g_handle_timeout_for_testing =;

std::string TimeoutMessage(const RepeatingCallback<std::string()>& get_log,
                           const Location& timeout_enabled_from_here) {}

void StandardTimeoutCallback(const Location& timeout_enabled_from_here,
                             RepeatingCallback<std::string()> on_timeout_log,
                             const Location& run_from_here) {}

void TimeoutCallbackWithGtestFailure(
    const Location& timeout_enabled_from_here,
    RepeatingCallback<std::string()> on_timeout_log,
    const Location& run_from_here) {}

}  // namespace

ScopedRunLoopTimeout::ScopedRunLoopTimeout(const Location& from_here,
                                           TimeDelta timeout)
    :{}

ScopedRunLoopTimeout::~ScopedRunLoopTimeout() {}

ScopedRunLoopTimeout::ScopedRunLoopTimeout(
    const Location& timeout_enabled_from_here,
    std::optional<TimeDelta> timeout,
    RepeatingCallback<std::string()> on_timeout_log)
    :{}

ScopedRunLoopTimeout::TimeoutCallback
ScopedRunLoopTimeout::GetTimeoutCallback() {}

// static
bool ScopedRunLoopTimeout::ExistsForCurrentThread() {}

// static
void ScopedRunLoopTimeout::SetAddGTestFailureOnTimeout() {}

// static
const RunLoop::RunLoopTimeout*
ScopedRunLoopTimeout::GetTimeoutForCurrentThread() {}

// static
void ScopedRunLoopTimeout::SetTimeoutCallbackForTesting(
    std::unique_ptr<ScopedRunLoopTimeout::TimeoutCallback> cb) {}

ScopedDisableRunLoopTimeout::ScopedDisableRunLoopTimeout()
    :{}

ScopedDisableRunLoopTimeout::~ScopedDisableRunLoopTimeout() {}

}  // namespace base::test