diff options
author | WonYoung Choi <wy80.choi@samsung.com> | 2017-01-11 15:26:01 +0900 |
---|---|---|
committer | WonYoung Choi <wy80.choi@samsung.com> | 2017-01-11 15:26:01 +0900 |
commit | c1a751974cb44d8ea01f3ce1dd2aaa4c510d3d44 (patch) | |
tree | 8da63c8eaea3194862a6807204982c8fb6255a31 | |
parent | 91cb595d5eac1e4619fa5b3f80205a46d852a07f (diff) | |
download | elm-sharp-c1a751974cb44d8ea01f3ce1dd2aaa4c510d3d44.tar.gz elm-sharp-c1a751974cb44d8ea01f3ce1dd2aaa4c510d3d44.tar.bz2 elm-sharp-c1a751974cb44d8ea01f3ce1dd2aaa4c510d3d44.zip |
Fix black screen error of ElmSharp.Test
When ElmSharp.Test runs with AppFW, first screen was black because
Elementary.ThemeOverlay() was not called.
Change-Id: I725a3ad97f1b1bf10ee43472e7817491de49346f
-rw-r--r-- | ElmSharp.Test/TestRunner.cs | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/ElmSharp.Test/TestRunner.cs b/ElmSharp.Test/TestRunner.cs index b359d20..b59f07f 100644 --- a/ElmSharp.Test/TestRunner.cs +++ b/ElmSharp.Test/TestRunner.cs @@ -27,11 +27,13 @@ namespace ElmSharp.Test public class TestRunner : CoreUIApplication { private Window _firstPageWindow; + private static bool s_terminated; public static string ResourceDir { get; private set; } public TestRunner() { + s_terminated = false; } protected override void OnCreate() @@ -43,13 +45,16 @@ namespace ElmSharp.Test base.OnCreate(); } + protected override void OnTerminate() + { + s_terminated = true; + base.OnTerminate(); + } + public void RunStandalone(string[] args) { ResourceDir = Path.Combine(Path.GetDirectoryName(typeof(TestRunner).GetTypeInfo().Assembly.Location), "res"); - Elementary.Initialize(); - Elementary.ThemeOverlay(); - EcoreSynchronizationContext.Initialize(); var testCases = GetTestCases(); @@ -193,11 +198,17 @@ namespace ElmSharp.Test static void Main(string[] args) { + Elementary.Initialize(); + Elementary.ThemeOverlay(); + TestRunner testRunner = new TestRunner(); testRunner.Run(args); // if running with appfw is failed, below line will be executed. - testRunner.RunStandalone(args); + if (!s_terminated) + { + testRunner.RunStandalone(args); + } } } } |