#include "perfetto/base/build_config.h"
#include "perfetto/ext/base/unix_task_runner.h"
#include <thread>
#include "perfetto/ext/base/event_fd.h"
#include "perfetto/ext/base/file_utils.h"
#include "perfetto/ext/base/pipe.h"
#include "perfetto/ext/base/scoped_file.h"
#include "perfetto/ext/base/utils.h"
#include "src/base/test/gtest_test_suite.h"
#include "test/gtest_and_gmock.h"
namespace perfetto {
namespace base {
namespace {
class TaskRunnerTest : public ::testing::Test { … };
TEST_F(TaskRunnerTest, PostImmediateTask) { … }
TEST_F(TaskRunnerTest, PostDelayedTask) { … }
TEST_F(TaskRunnerTest, PostImmediateTaskFromTask) { … }
TEST_F(TaskRunnerTest, PostDelayedTaskFromTask) { … }
TEST_F(TaskRunnerTest, PostImmediateTaskFromOtherThread) { … }
TEST_F(TaskRunnerTest, PostDelayedTaskFromOtherThread) { … }
TEST_F(TaskRunnerTest, AddFileDescriptorWatch) { … }
TEST_F(TaskRunnerTest, RemoveFileDescriptorWatch) { … }
TEST_F(TaskRunnerTest, RemoveFileDescriptorWatchFromTask) { … }
TEST_F(TaskRunnerTest, AddFileDescriptorWatchFromAnotherWatch) { … }
TEST_F(TaskRunnerTest, RemoveFileDescriptorWatchFromAnotherWatch) { … }
TEST_F(TaskRunnerTest, ReplaceFileDescriptorWatchFromAnotherWatch) { … }
TEST_F(TaskRunnerTest, AddFileDescriptorWatchFromAnotherThread) { … }
TEST_F(TaskRunnerTest, FileDescriptorWatchWithMultipleEvents) { … }
TEST_F(TaskRunnerTest, PostManyDelayedTasks) { … }
TEST_F(TaskRunnerTest, RunAgain) { … }
void RepeatingTask(UnixTaskRunner* task_runner) { … }
TEST_F(TaskRunnerTest, FileDescriptorWatchesNotStarved) { … }
void CountdownTask(UnixTaskRunner* task_runner, int* counter) { … }
TEST_F(TaskRunnerTest, NoDuplicateFileDescriptorWatchCallbacks) { … }
TEST_F(TaskRunnerTest, ReplaceFileDescriptorWatchFromOtherThread) { … }
TEST_F(TaskRunnerTest, IsIdleForTesting) { … }
TEST_F(TaskRunnerTest, RunsTasksOnCurrentThread) { … }
TEST_F(TaskRunnerTest, FileDescriptorWatchFairness) { … }
#if !PERFETTO_BUILDFLAG(PERFETTO_OS_WIN)
TEST_F(TaskRunnerTest, FileDescriptorClosedEvent) { … }
#endif
}
}
}