#include "services/network/websocket_interceptor.h"
#include <memory>
#include "base/logging.h"
#include "base/test/task_environment.h"
#include "services/network/throttling/network_conditions.h"
#include "services/network/throttling/throttling_controller.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace network {
namespace {
uint32_t kNetLogSourceId = …;
std::optional<base::UnguessableToken> kThrottlingProfileId = …;
class MockCallback { … };
class WebSocketInterceptorTest : public ::testing::Test { … };
TEST_F(WebSocketInterceptorTest, DoesNotInterferWhenNoEmualatedConditions) { … }
TEST_F(WebSocketInterceptorTest, ShouldWaitWhenOffline) { … }
TEST_F(WebSocketInterceptorTest, ShouldWaitWhenSlow) { … }
TEST_F(WebSocketInterceptorTest, SubsequentInterceptWhenSlow) { … }
TEST_F(WebSocketInterceptorTest, OfflineCallbackInvokedWhenBackOnline) { … }
TEST_F(WebSocketInterceptorTest, SlowAfterOffline) { … }
TEST_F(WebSocketInterceptorTest, UsesRightDirection) { … }
}
}