summaryrefslogtreecommitdiff
path: root/src/unittests/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/unittests/gui')
-rw-r--r--src/unittests/gui/widgets/browserbox.cc6
-rw-r--r--src/unittests/gui/windowmanager.cc13
2 files changed, 11 insertions, 8 deletions
diff --git a/src/unittests/gui/widgets/browserbox.cc b/src/unittests/gui/widgets/browserbox.cc
index 2a72350af..7e4689707 100644
--- a/src/unittests/gui/widgets/browserbox.cc
+++ b/src/unittests/gui/widgets/browserbox.cc
@@ -65,9 +65,6 @@ TEST_CASE("BrowserBox tests", "browserbox")
graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE);
#endif // USE_SDL2
- theme = new Theme;
- Theme::selectSkin();
-
Dirs::initRootDir();
Dirs::initHomeDir();
@@ -75,6 +72,9 @@ TEST_CASE("BrowserBox tests", "browserbox")
setConfigDefaults2(config);
setBrandingDefaults(branding);
+ theme = new Theme;
+ Theme::selectSkin();
+
ActorSprite::load();
gui = new Gui();
gui->postInit(mainGraphics);
diff --git a/src/unittests/gui/windowmanager.cc b/src/unittests/gui/windowmanager.cc
index 9c04237a6..41e2e755b 100644
--- a/src/unittests/gui/windowmanager.cc
+++ b/src/unittests/gui/windowmanager.cc
@@ -168,8 +168,6 @@ TEST_CASE("Windows tests", "windowmanager")
userPalette = new UserPalette;
config.setValue("fontSize", 16);
- theme = new Theme;
- Theme::selectSkin();
Dirs::initRootDir();
Dirs::initHomeDir();
@@ -181,8 +179,12 @@ TEST_CASE("Windows tests", "windowmanager")
ConfigManager::initConfiguration();
setConfigDefaults2(config);
setBrandingDefaults(branding);
+ setFeaturesDefaults(features);
ConfigManager::initServerConfig("nonexistserver");
+ theme = new Theme;
+ Theme::selectSkin();
+
localPlayer = new LocalPlayer(static_cast<BeingId>(1),
BeingTypeId_zero);
@@ -334,7 +336,7 @@ TEST_CASE("Windows tests", "windowmanager")
{
ConfirmDialog *dialog;
CREATEWIDGETV(dialog, ConfirmDialog,
- "", "", "", false, Modal_false, nullptr);
+ "", "", SOUND_REQUEST, false, Modal_false, nullptr);
gui->draw();
mainGraphics->updateScreen();
delete2(dialog);
@@ -850,8 +852,6 @@ TEST_CASE("WindowManager", "create windows")
#endif // USE_SDL2
config.setValue("fontSize", 16);
- theme = new Theme;
- Theme::selectSkin();
Dirs::initRootDir();
Dirs::initHomeDir();
@@ -865,6 +865,9 @@ TEST_CASE("WindowManager", "create windows")
setBrandingDefaults(branding);
ConfigManager::initServerConfig("nonexistserver");
+ theme = new Theme;
+ Theme::selectSkin();
+
localPlayer = new LocalPlayer(static_cast<BeingId>(1),
BeingTypeId_zero);