#include "third_party/blink/renderer/core/script/dynamic_module_resolver.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
#include "third_party/blink/renderer/bindings/core/v8/referrer_script_info.h"
#include "third_party/blink/renderer/bindings/core/v8/script_function.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"
#include "third_party/blink/renderer/bindings/core/v8/script_value.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_testing.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/loader/modulescript/module_script_creation_params.h"
#include "third_party/blink/renderer/core/loader/modulescript/module_script_fetch_request.h"
#include "third_party/blink/renderer/core/script/js_module_script.h"
#include "third_party/blink/renderer/core/testing/dummy_modulator.h"
#include "third_party/blink/renderer/core/testing/module_test_base.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"
#include "v8/include/v8.h"
namespace blink {
namespace {
constexpr const char* kTestReferrerURL = …;
constexpr const char* kTestDependencyURL = …;
constexpr const char* kTestDependencyURLJSON = …;
const KURL TestReferrerURL() { … }
const KURL TestDependencyURL() { … }
const KURL TestDependencyURLJSON() { … }
ReferrerScriptInfo TestReferrerScriptInfo() { … }
class DynamicModuleResolverTestModulator final : public DummyModulator { … };
void DynamicModuleResolverTestModulator::Trace(Visitor* visitor) const { … }
class CaptureExportedStringFunction final : public ScriptFunction::Callable { … };
class CaptureErrorFunction final : public ScriptFunction::Callable { … };
class DynamicModuleResolverTestNotReached final
: public ScriptFunction::Callable { … };
class DynamicModuleResolverTest : public testing::Test, public ModuleTestBase { … };
}
TEST_F(DynamicModuleResolverTest, ResolveSuccess) { … }
TEST_F(DynamicModuleResolverTest, ResolveJSONModuleSuccess) { … }
TEST_F(DynamicModuleResolverTest, ResolveSpecifierFailure) { … }
TEST_F(DynamicModuleResolverTest, ResolveModuleTypeFailure) { … }
TEST_F(DynamicModuleResolverTest, FetchFailure) { … }
TEST_F(DynamicModuleResolverTest, ExceptionThrown) { … }
TEST_F(DynamicModuleResolverTest, ResolveWithNullReferrerScriptSuccess) { … }
TEST_F(DynamicModuleResolverTest, ResolveWithReferrerScriptInfoBaseURL) { … }
}