Revert "Merge branch 'fix-legacy-skin-test' into catch-hide-combo-workaround"

This reverts commit 380d004683, reversing
changes made to ff419af512.
This commit is contained in:
Salman Ahmed
2021-05-18 17:46:15 +03:00
parent 076fcec3df
commit e7d2f42149
4 changed files with 15 additions and 243 deletions

View File

@ -1,17 +1,11 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Linq;
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Audio;
using osu.Framework.IO.Stores;
using osu.Framework.Testing;
using osu.Framework.Timing;
using osu.Game.Beatmaps;
using osu.Game.Rulesets;
using osu.Game.Skinning;
using osu.Game.Storyboards;
namespace osu.Game.Tests.Visual
{
@ -24,9 +18,6 @@ namespace osu.Game.Tests.Visual
protected override TestPlayer CreatePlayer(Ruleset ruleset) => new SkinProvidingPlayer(legacySkinSource);
protected override WorkingBeatmap CreateWorkingBeatmap(IBeatmap beatmap, Storyboard storyboard = null)
=> new LegacySkinWorkingBeatmap(beatmap, storyboard, Clock, Audio);
[BackgroundDependencyLoader]
private void load(OsuGameBase game, SkinManager skins)
{
@ -34,14 +25,6 @@ namespace osu.Game.Tests.Visual
legacySkinSource = new SkinProvidingContainer(LegacySkin);
}
public override void SetUpSteps()
{
base.SetUpSteps();
// check presence of a random legacy HUD component to ensure this is using legacy skin.
AddAssert("using legacy skin", () => this.ChildrenOfType<LegacyScoreCounter>().Any());
}
public class SkinProvidingPlayer : TestPlayer
{
[Cached(typeof(ISkinSource))]
@ -52,15 +35,5 @@ namespace osu.Game.Tests.Visual
this.skinSource = skinSource;
}
}
private class LegacySkinWorkingBeatmap : ClockBackedTestWorkingBeatmap
{
public LegacySkinWorkingBeatmap(IBeatmap beatmap, Storyboard storyboard, IFrameBasedClock frameBasedClock, AudioManager audio)
: base(beatmap, storyboard, frameBasedClock, audio)
{
}
protected override ISkin GetSkin() => new LegacyBeatmapSkin(BeatmapInfo, null, null);
}
}
}