chromium/base/one_shot_event_unittest.cc

// Copyright 2013 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/one_shot_event.h"

#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/task_environment.h"
#include "base/test/test_simple_task_runner.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace base {

void Increment(int* i) {}

// |*did_delete_instance| will be set to true upon its destruction.
class RefCountedClass : public base::RefCounted<RefCountedClass> {};

TEST(OneShotEventTest, RecordsSignal) {}

TEST(OneShotEventTest, CallsQueueAsDistinctTask) {}

TEST(OneShotEventTest, CallsQueue) {}

TEST(OneShotEventTest, CallsAfterSignalDontRunInline) {}

TEST(OneShotEventTest, PostDefaultsToCurrentMessageLoop) {}

void CheckSignaledAndPostIncrement(
    OneShotEvent* event,
    const scoped_refptr<base::SingleThreadTaskRunner>& runner,
    int* i) {}

TEST(OneShotEventTest, IsSignaledAndPostsFromCallbackWork) {}

// Tests that OneShotEvent does not keep references to tasks once OneShotEvent
// Signal()s.
TEST(OneShotEventTest, DropsCallbackRefUponSignalled) {}

}  // namespace base