blob: 664d5622b32ea10409767a7faaa6228fda4b642b [file] [log] [blame]
// Copyright 2021 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "missive/util/test_support_callbacks.h"
#include <base/task/bind_post_task.h>
#include <base/threading/sequenced_task_runner_handle.h>
namespace reporting {
namespace test {
TestCallbackWaiter::TestCallbackWaiter()
: signaled_cb_(
base::BindPostTask(base::SequencedTaskRunnerHandle::Get(),
base::test::TestFuture<bool>::GetCallback())) {}
TestCallbackWaiter::~TestCallbackWaiter() = default;
TestCallbackAutoWaiter::TestCallbackAutoWaiter() {
Attach();
}
TestCallbackAutoWaiter::~TestCallbackAutoWaiter() {
Wait();
}
} // namespace test
} // namespace reporting