mirror of
https://github.com/ppy/osu.git
synced 2025-02-21 23:59:16 +08:00
Update test scene
This commit is contained in:
parent
9a89d402b9
commit
83f8fa7472
@ -12,7 +12,7 @@ using osu.Game.Online;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Online
|
||||
{
|
||||
public partial class TestSceneMediaProxying : OsuTestScene
|
||||
public partial class TestSceneImageProxying : OsuTestScene
|
||||
{
|
||||
[Resolved]
|
||||
private GameHost host { get; set; } = null!;
|
||||
@ -20,44 +20,31 @@ namespace osu.Game.Tests.Visual.Online
|
||||
[Test]
|
||||
public void TestExternalImageLink()
|
||||
{
|
||||
AddStep("load image", () => setup(new OsuMarkdownContainer
|
||||
AddStep("load image", () => Child = new OsuMarkdownContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Text = "",
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestLocalImageLink()
|
||||
{
|
||||
AddStep("load image", () => setup(new OsuMarkdownContainer
|
||||
AddStep("load image", () => Child = new OsuMarkdownContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Text = "",
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestInvalidImageLink()
|
||||
{
|
||||
AddStep("load image", () => setup(new OsuMarkdownContainer
|
||||
AddStep("load image", () => Child = new OsuMarkdownContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Text = "",
|
||||
}));
|
||||
}
|
||||
|
||||
private void setup(Drawable drawable)
|
||||
{
|
||||
var onlineStore = new OsuOnlineStore(@"https://osu.ppy.sh");
|
||||
var textureStore = new TextureStore(host.Renderer, host.CreateTextureLoaderStore(onlineStore));
|
||||
|
||||
Child = new DependencyProvidingContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
CachedDependencies = new (Type, object)[] { (typeof(TextureStore), textureStore) },
|
||||
Child = drawable,
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user