#include "content/services/auction_worklet/auction_v8_helper.h"
#include <stdint.h>
#include <limits>
#include <optional>
#include <string>
#include <vector>
#include "base/functional/callback.h"
#include "base/strings/stringprintf.h"
#include "base/synchronization/lock.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "content/services/auction_worklet/public/mojom/bidder_worklet.mojom.h"
#include "content/services/auction_worklet/worklet_devtools_debug_test_util.h"
#include "content/services/auction_worklet/worklet_v8_debug_test_util.h"
#include "gin/converter.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
#include "testing/gmock/include/gmock/gmock-matchers.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/interest_group/ad_display_size.h"
#include "url/gurl.h"
#include "v8/include/v8-context.h"
#include "v8/include/v8-forward.h"
#include "v8/include/v8-wasm.h"
ElementsAre;
HasSubstr;
StartsWith;
namespace auction_worklet {
const char kMinimalWasmModuleBytes[] = …;
class DebugConnector : public auction_worklet::mojom::BidderWorklet { … };
class AuctionV8HelperTest : public testing::Test { … };
TEST_F(AuctionV8HelperTest, Basic) { … }
TEST_F(AuctionV8HelperTest, Timeout) { … }
TEST_F(AuctionV8HelperTest, NoTime) { … }
TEST_F(AuctionV8HelperTest, CompileError) { … }
TEST_F(AuctionV8HelperTest, RunErrorTopLevel) { … }
TEST_F(AuctionV8HelperTest, TargetFunctionNotFound) { … }
TEST_F(AuctionV8HelperTest, TargetFunctionError) { … }
TEST_F(AuctionV8HelperTest, ConsoleLog) { … }
TEST_F(AuctionV8HelperTest, FormatScriptName) { … }
TEST_F(AuctionV8HelperTest, ContextIDs) { … }
TEST_F(AuctionV8HelperTest, AllocWrap) { … }
TEST_F(AuctionV8HelperTest, DebuggerBasics) { … }
TEST_F(AuctionV8HelperTest, DebugCompileError) { … }
TEST_F(AuctionV8HelperTest, DevToolsDebuggerBasics) { … }
TEST_F(AuctionV8HelperTest, DevToolsAgentDebuggerInstrumentationBreakpoint) { … }
TEST_F(AuctionV8HelperTest, DevToolsDebuggerInvalidCommand) { … }
TEST_F(AuctionV8HelperTest, DevToolsDeleteSessionPipeLate) { … }
class MockTimeAuctionV8HelperTest : public AuctionV8HelperTest { … };
TEST_F(MockTimeAuctionV8HelperTest, TimelimitDebug) { … }
TEST_F(AuctionV8HelperTest, DebugTimeout) { … }
TEST_F(AuctionV8HelperTest, CompileWasm) { … }
TEST_F(AuctionV8HelperTest, CompileWasmError) { … }
TEST_F(AuctionV8HelperTest, CompileWasmDebug) { … }
TEST_F(AuctionV8HelperTest, CloneWasmModule) { … }
TEST_F(AuctionV8HelperTest, SerializeDeserialize) { … }
TEST_F(AuctionV8HelperTest, ExtractJsonTimeout) { … }
}