chromium/content/browser/scheduler/browser_task_executor_unittest.cc

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

#include "content/browser/scheduler/browser_task_executor.h"

#include <map>
#include <memory>
#include <utility>
#include <vector>

#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/task/single_thread_task_runner.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/test/bind.h"
#include "base/test/mock_callback.h"
#include "base/test/task_environment.h"
#include "content/browser/scheduler/browser_io_thread_delegate.h"
#include "content/browser/scheduler/browser_task_priority.h"
#include "content/browser/scheduler/browser_task_queues.h"
#include "content/browser/scheduler/browser_ui_thread_scheduler.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/test/browser_task_environment.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace content {

TaskPriority;
ElementsAre;
Invoke;
Mock;
NotNull;
SizeIs;

QueueType;

class BrowserTaskExecutorTest : public testing::Test {};

StrictMockTask;

TEST_F(BrowserTaskExecutorTest, RunAllPendingTasksForTestingOnUI) {}

TEST_F(BrowserTaskExecutorTest, RunAllPendingTasksForTestingOnIO) {}

TEST_F(BrowserTaskExecutorTest, RunAllPendingTasksForTestingOnIOIsReentrant) {}

TEST_F(BrowserTaskExecutorTest, GetTaskRunnerWithBrowserTaskTraits) {}

// Helper to perform the same tets for all BrowserThread::ID values.
class BrowserTaskTraitsMappingTest : public BrowserTaskExecutorTest {};

TEST_F(BrowserTaskTraitsMappingTest, BrowserTaskTraitsMapToProperPriorities) {}

TEST_F(BrowserTaskTraitsMappingTest,
       UIThreadTaskRunnerHasSamePriorityAsUIBlocking) {}

class BrowserTaskExecutorWithCustomSchedulerTest : public testing::Test {};

TEST_F(BrowserTaskExecutorWithCustomSchedulerTest,
       UserVisibleOrBlockingTasksRunDuringStartup) {}

TEST_F(BrowserTaskExecutorWithCustomSchedulerTest,
       BestEffortTasksRunAfterStartup) {}

}  // namespace content