Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1534,13 +1534,13 @@ private class TestAssemblyLoadContext : AssemblyLoadContext

public TestAssemblyLoadContext(string name, bool isCollectible, string mainAssemblyToLoadPath = null) : base(name, isCollectible)
{
if (!PlatformDetection.IsBrowser)
if (!PlatformDetection.IsMobile)
_resolver = new AssemblyDependencyResolver(mainAssemblyToLoadPath ?? Assembly.GetExecutingAssembly().Location);
}

protected override Assembly Load(AssemblyName name)
{
if (PlatformDetection.IsBrowser)
if (PlatformDetection.IsMobile)
{
return base.Load(name);
}
Expand Down Expand Up @@ -1577,10 +1577,9 @@ private static void ExecuteAndUnload(string assemblyfile, Action<Assembly> assem
alc.Unload();
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsAssemblyLoadingSupported))]
// Lack of AssemblyDependencyResolver results in assemblies that are not loaded by path to get
// loaded in the default ALC, which causes problems for this test.
[SkipOnPlatform(TestPlatforms.Browser, "AssemblyDependencyResolver not supported in wasm")]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsAssemblyLoadingSupported), nameof(PlatformDetection.IsNotMobile))]
[ActiveIssue("34072", TestRuntimes.Mono)]
public static void TypeDescriptor_WithDefaultProvider_UnloadsUnloadableTypes()
{
Expand Down Expand Up @@ -1621,10 +1620,9 @@ public static void TypeDescriptor_WithDefaultProvider_UnloadsUnloadableTypes()
Assert.True(!weakRef.IsAlive);
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsAssemblyLoadingSupported))]
// Lack of AssemblyDependencyResolver results in assemblies that are not loaded by path to get
// loaded in the default ALC, which causes problems for this test.
[SkipOnPlatform(TestPlatforms.Browser, "AssemblyDependencyResolver not supported in wasm")]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsAssemblyLoadingSupported), nameof(PlatformDetection.IsNotMobile))]
[ActiveIssue("34072", TestRuntimes.Mono)]
public static void TypeDescriptor_WithCustomProvider_UnloadsUnloadableTypes()
{
Expand Down
Loading