#include "net/base/test_completion_callback.h"
#include "base/check_op.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/memory/raw_ptr.h"
#include "base/notreached.h"
#include "base/task/single_thread_task_runner.h"
#include "net/base/completion_once_callback.h"
#include "net/test/test_with_task_environment.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
namespace net {
namespace {
const int kMagicResult = …;
void CallClosureAfterCheckingResult(base::OnceClosure closure,
bool* did_check_result,
int result) { … }
class ExampleEmployer { … };
class ExampleEmployer::ExampleWorker
: public base::RefCountedThreadSafe<ExampleWorker> { … };
void ExampleEmployer::ExampleWorker::DoWork() { … }
void ExampleEmployer::ExampleWorker::DoCallback() { … }
ExampleEmployer::ExampleEmployer() = default;
ExampleEmployer::~ExampleEmployer() = default;
bool ExampleEmployer::DoSomething(CompletionOnceCallback callback) { … }
}
class TestCompletionCallbackTest : public PlatformTest,
public WithTaskEnvironment { … };
TEST_F(TestCompletionCallbackTest, Simple) { … }
TEST_F(TestCompletionCallbackTest, Closure) { … }
}