#include "components/cronet/native/runnables.h"
#include <string>
#include "base/check.h"
#include "base/functional/bind.h"
#include "base/run_loop.h"
#include "base/test/task_environment.h"
#include "components/cronet/native/generated/cronet.idl_impl_interface.h"
#include "components/cronet/native/include/cronet_c.h"
#include "components/cronet/native/test/test_util.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
class RunnablesTest : public ::testing::Test { … };
class OnRedirectReceived_Runnable : public Cronet_Runnable { … };
void RunnablesTest::UrlRequestCallback_OnRedirectReceived(
Cronet_UrlRequestCallbackPtr self,
Cronet_UrlRequestPtr request,
Cronet_UrlResponseInfoPtr info,
Cronet_String newLocationUrl) { … }
void RunnablesTest::UrlRequestCallback_OnResponseStarted(
Cronet_UrlRequestCallbackPtr self,
Cronet_UrlRequestPtr request,
Cronet_UrlResponseInfoPtr info) { … }
void RunnablesTest::UrlRequestCallback_OnReadCompleted(
Cronet_UrlRequestCallbackPtr self,
Cronet_UrlRequestPtr request,
Cronet_UrlResponseInfoPtr info,
Cronet_BufferPtr buffer,
uint64_t bytesRead) { … }
TEST_F(RunnablesTest, TestRunCallbackOnExecutor) { … }
TEST_F(RunnablesTest, TestRunOnceClosureOnExecutor) { … }
TEST_F(RunnablesTest, TestCronetBuffer) { … }
}