chromium/base/test/run_until_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 "base/test/run_until.h"

#include "base/functional/callback_forward.h"
#include "base/functional/callback_helpers.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "base/timer/timer.h"
#include "testing/gtest/include/gtest/gtest-spi.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace base::test {

namespace {

template <typename Lambda>
void RunLater(Lambda lambda) {}

void PostDelayedTask(base::OnceClosure closure, base::TimeDelta delay) {}

}  // namespace

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

TEST_F(RunUntilTest, ShouldReturnTrueIfPredicateIsAlreadyFulfilled) {}

TEST_F(RunUntilTest, ShouldReturnTrueOncePredicateIsFulfilled) {}

TEST_F(RunUntilTest, ShouldNotSimplyActivelyInvokePredicateInALoop) {}

TEST_F(RunUntilTest, ShouldNotSimplyReturnOnFirstIdle) {}

TEST_F(RunUntilTest,
       ShouldAlwaysLetOtherTasksRunFirstEvenIfPredicateIsAlreadyFulfilled) {}

TEST_F(RunUntilTest, ShouldWorkEvenWhenTimerIsRunning) {}

TEST_F(RunUntilTest, ShouldReturnFalseIfTimeoutHappens) {}

}  // namespace base::test