#include "base/task/common/task_annotator.h"
#include <algorithm>
#include <vector>
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/functional/callback_helpers.h"
#include "base/pending_task.h"
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
#include "base/synchronization/lock.h"
#include "base/synchronization/waitable_event.h"
#include "base/task/single_thread_task_runner.h"
#include "base/task/thread_pool.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "base/threading/thread.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace base {
namespace {
void TestTask(int* result) { … }
}
TEST(TaskAnnotatorTest, QueueAndRunTask) { … }
class TaskAnnotatorBacktraceIntegrationTest
: public ::testing::Test,
public TaskAnnotator::ObserverForTesting { … };
TEST_F(TaskAnnotatorBacktraceIntegrationTest, SingleThreadedSimple) { … }
TEST_F(TaskAnnotatorBacktraceIntegrationTest, MultipleThreads) { … }
TEST_F(TaskAnnotatorBacktraceIntegrationTest, SingleThreadedNested) { … }
}