From f845e3b385a95a882fa658c8f33524ad0751b716 Mon Sep 17 00:00:00 2001 From: Jeonghyun Yun Date: Mon, 30 Jul 2018 20:53:04 +0900 Subject: [PATCH] [ElmSharp][Non-ACR]Fix TC Elementary SetTheme to TV profile only feature Change-Id: Iaf9193992e8b705bf373b6b368f9c3d9477f2efb Signed-off-by: Jeonghyun Yun --- tct-suite-vs/Tizen.ElmSharp.Tests/Common/TSProfile.cs | 1 + .../Tizen.ElmSharp.Tests/testcase/TSElementary.cs | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/tct-suite-vs/Tizen.ElmSharp.Tests/Common/TSProfile.cs b/tct-suite-vs/Tizen.ElmSharp.Tests/Common/TSProfile.cs index e75f03a..b54e9cf 100755 --- a/tct-suite-vs/Tizen.ElmSharp.Tests/Common/TSProfile.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Tests/Common/TSProfile.cs @@ -29,6 +29,7 @@ namespace ElmSharp.Tests { public static string MobileProfile = "mobile"; public static string WearableProfile = "wearable"; + public static string TvProfile = "tv"; private static string _profileKey = "tizen.org/feature/profile"; private static string _profile = string.Empty; diff --git a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSElementary.cs b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSElementary.cs index 0192d2b..7f88c38 100755 --- a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSElementary.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSElementary.cs @@ -323,14 +323,21 @@ namespace ElmSharp.Tests [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] public void SetTheme_CHECK_METHOD() { - string themeFilePath = "/usr/share/elm-sharp/elm-sharp-theme.edj"; - try + if (ElmSharpProfile.GetProfile().CompareTo(ElmSharpProfile.TvProfile) == 0) { - Elementary.SetTheme(themeFilePath); + string themeFilePath = "/usr/share/elm-sharp/elm-sharp-theme.edj"; + try + { + Elementary.SetTheme(themeFilePath); + } + catch (Exception ex) + { + Assert.IsTrue(false, "Elementary SetTheme method failed: " + ex.ToString()); + } } - catch (Exception ex) + else { - Assert.IsTrue(false, "Elementary SetTheme method failed: " + ex.ToString()); + Assert.Pass("Not supported"); } } @@ -472,4 +479,4 @@ namespace ElmSharp.Tests Assert.AreEqual(1.5, Elementary.Scale, "The getting Scale should be 1.5."); } } -} \ No newline at end of file +} -- 2.7.4