From: zhouleonlei Date: Fri, 14 Aug 2020 03:44:55 +0000 (+0800) Subject: [NUI][ACR-333] Remove Theme event X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=19100f564db36cd6e5ba044db63bebeda1c87519;p=test%2Ftct%2Fcsharp%2Fapi.git [NUI][ACR-333] Remove Theme event The new logic of Theme has been improved. So delete the old ThemeChangedEvent Change-Id: Ide517ba5ef8acaabb59ff2478fae91cb49cabc8d --- diff --git a/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSButton.cs b/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSButton.cs index ca9279412..ff5a2ed00 100755 --- a/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSButton.cs +++ b/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSButton.cs @@ -18,7 +18,6 @@ namespace Tizen.NUI.Components.Tests private const string TAG = "Components"; private bool _stateChangedEvent = false; private string _image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png"; - private static bool _flagOnThemeChangedEvent = false; [SetUp] public void Init() @@ -744,30 +743,6 @@ namespace Tizen.NUI.Components.Tests } } - [Test] - [Category("P1")] - [Description("Test OnThemeChangedEvent. Check whether OnThemeChangedEvent works or not.")] - [Property("SPEC", "Tizen.NUI.Components.Button.OnThemeChangedEvent M")] - [Property("SPEC_URL", " - ")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void OnThemeChangedEvent_CHECK_RETURN_VALUE() - { - try - { - _flagOnThemeChangedEvent = false; - StyleManager.Instance.Theme = "Family"; - var button = new Button(); - StyleManager.Instance.Theme = "Food"; - Assert.IsNotNull(button, "Should be not null"); - Assert.IsTrue(_flagOnThemeChangedEvent, "Should be true!"); - } - catch (Exception e) - { - Assert.Fail("Caught Exception" + e.ToString()); - } - } - [Test] [Category("P1")] [Description("Test Button's icon part. Check whether null or not")] @@ -895,11 +870,6 @@ namespace Tizen.NUI.Components.Tests { return base.CreateViewStyle(); } - - protected override void OnThemeChangedEvent(object sender, StyleManager.ThemeChangeEventArgs e) - { - _flagOnThemeChangedEvent = true; - } } public class DefaultButtonStyle : StyleBase diff --git a/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSPopup.cs b/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSPopup.cs old mode 100644 new mode 100755 index 8475d73b0..870184541 --- a/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSPopup.cs +++ b/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSPopup.cs @@ -17,7 +17,6 @@ namespace Tizen.NUI.Components.Tests private const string TAG = "Components"; private string _image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png"; private string _path = Tizen.Applications.Application.Current.DirectoryInfo.Resource; - private static bool _flagOnThemeChangedEvent = false; [SetUp] public void Init() @@ -510,30 +509,6 @@ namespace Tizen.NUI.Components.Tests } } - [Test] - [Category("P1")] - [Description("Test OnThemeChangedEvent. Check whether OnThemeChangedEvent works or not.")] - [Property("SPEC", "Tizen.NUI.Components.Popup.OnThemeChangedEvent M")] - [Property("SPEC_URL", " - ")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void OnThemeChangedEvent_CHECK_RETURN_VALUE() - { - try - { - _flagOnThemeChangedEvent = false; - StyleManager.Instance.Theme = "Family"; - var popup = new MyPopup(); - StyleManager.Instance.Theme = "Food"; - Assert.IsNotNull(popup, "Should be not null"); - Assert.IsTrue(_flagOnThemeChangedEvent, "Should be true!"); - } - catch (Exception e) - { - Assert.Fail("Caught Exception" + e.ToString()); - } - } - public class MyPopup : Popup { public MyPopup() : base() {} @@ -542,11 +517,6 @@ namespace Tizen.NUI.Components.Tests { return base.CreateViewStyle(); } - - protected override void OnThemeChangedEvent(object sender, StyleManager.ThemeChangeEventArgs e) - { - _flagOnThemeChangedEvent = true; - } } public class DefaultPopupStyle : StyleBase diff --git a/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSProgress.cs b/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSProgress.cs old mode 100644 new mode 100755 index b1fa406c9..8c327f9f7 --- a/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSProgress.cs +++ b/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSProgress.cs @@ -16,7 +16,6 @@ namespace Tizen.NUI.Components.Tests { private const string TAG = "Components"; private string _image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "Tizen.NUI.Components.Tests.png"; - private static bool _flagOnThemeChangedEvent = false; [SetUp] public void Init() @@ -419,30 +418,6 @@ namespace Tizen.NUI.Components.Tests } } - [Test] - [Category("P1")] - [Description("Test OnThemeChangedEvent. Check whether OnThemeChangedEvent works or not.")] - [Property("SPEC", "Tizen.NUI.Components.Progress.OnThemeChangedEvent M")] - [Property("SPEC_URL", " - ")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void OnThemeChangedEvent_CHECK_RETURN_VALUE() - { - try - { - _flagOnThemeChangedEvent = false; - StyleManager.Instance.Theme = "Family"; - var progress = new MyProgress(); - StyleManager.Instance.Theme = "Food"; - Assert.IsNotNull(progress, "Should be not null"); - Assert.IsTrue(_flagOnThemeChangedEvent, "Should be true!"); - } - catch (Exception e) - { - Assert.Fail("Caught Exception" + e.ToString()); - } - } - public class MyProgress : Progress { public MyProgress() : base() @@ -457,11 +432,6 @@ namespace Tizen.NUI.Components.Tests { base.ChangeImageState(statusType); } - - protected override void OnThemeChangedEvent(object sender, StyleManager.ThemeChangeEventArgs e) - { - _flagOnThemeChangedEvent = true; - } } public class DefaultProgressStyle : StyleBase diff --git a/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSSlider.cs b/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSSlider.cs old mode 100644 new mode 100755 index 1655b401c..cd5163928 --- a/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSSlider.cs +++ b/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSSlider.cs @@ -13,7 +13,6 @@ namespace Tizen.NUI.Components.Tests { private const string TAG = "TCT"; private string _image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png"; - private static bool _flagOnThemeChangedEvent = false; public SliderTests() { @@ -563,30 +562,6 @@ namespace Tizen.NUI.Components.Tests } } - [Test] - [Category("P1")] - [Description("Test OnThemeChangedEvent. Check whether OnThemeChangedEvent works or not.")] - [Property("SPEC", "Tizen.NUI.Components.Slider.OnThemeChangedEvent M")] - [Property("SPEC_URL", " - ")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void OnThemeChangedEvent_CHECK_RETURN_VALUE() - { - try - { - _flagOnThemeChangedEvent = false; - StyleManager.Instance.Theme = "Family"; - var slider = new Slider(); - StyleManager.Instance.Theme = "Food"; - Assert.IsNotNull(slider, "Should be not null"); - Assert.IsTrue(_flagOnThemeChangedEvent, "Should be true!"); - } - catch (Exception e) - { - Assert.Fail("Caught Exception" + e.ToString()); - } - } - public class MySlider : Slider { public MySlider() : base() {} @@ -594,11 +569,6 @@ namespace Tizen.NUI.Components.Tests public ViewStyle CreateMyViewStyle() { return base.CreateViewStyle(); - } - - protected override void OnThemeChangedEvent(object sender, StyleManager.ThemeChangeEventArgs e) - { - _flagOnThemeChangedEvent = true; } } diff --git a/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSSwitch.cs b/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSSwitch.cs index 63fffc912..128250ef3 100755 --- a/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSSwitch.cs +++ b/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSSwitch.cs @@ -16,7 +16,6 @@ namespace Tizen.NUI.Components.Tests { private const string TAG = "Components"; private string _image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png"; - private static bool _flagOnThemeChangedEvent = false; [SetUp] public void Init() @@ -264,30 +263,6 @@ namespace Tizen.NUI.Components.Tests } } - [Test] - [Category("P1")] - [Description("Test OnThemeChangedEvent. Check whether OnThemeChangedEvent works or not.")] - [Property("SPEC", "Tizen.NUI.Components.Switch.OnThemeChangedEvent M")] - [Property("SPEC_URL", " - ")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void OnThemeChangedEvent_CHECK_RETURN_VALUE() - { - try - { - _flagOnThemeChangedEvent = false; - StyleManager.Instance.Theme = "Family"; - var _switch = new Switch(); - StyleManager.Instance.Theme = "Food"; - Assert.IsNotNull(_switch, "Should be not null"); - Assert.IsTrue(_flagOnThemeChangedEvent, "Should be true!"); - } - catch (Exception e) - { - Assert.Fail("Caught Exception" + e.ToString()); - } - } - [Test] [Category("P1")] [Description("Test Switch's track part. Check whether null or not")] @@ -350,11 +325,6 @@ namespace Tizen.NUI.Components.Tests { return base.CreateViewStyle(); } - - protected override void OnThemeChangedEvent(object sender, StyleManager.ThemeChangeEventArgs e) - { - _flagOnThemeChangedEvent = true; - } } public class DefaultSwitchStyle : StyleBase diff --git a/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSTab.cs b/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSTab.cs old mode 100644 new mode 100755 index 23be3ac70..1ffffadfe --- a/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSTab.cs +++ b/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSTab.cs @@ -13,7 +13,6 @@ namespace Tizen.NUI.Components.Tests { private const string TAG = "Components"; private bool _checkValue; - private static bool _flagOnThemeChangedEvent = true; [SetUp] public void Init() @@ -615,30 +614,6 @@ namespace Tizen.NUI.Components.Tests } } - [Test] - [Category("P1")] - [Description("Test OnThemeChangedEvent. Check whether OnThemeChangedEvent works or not.")] - [Property("SPEC", "Tizen.NUI.Components.Tab.OnThemeChangedEvent M")] - [Property("SPEC_URL", " - ")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void OnThemeChangedEvent_CHECK_RETURN_VALUE() - { - try - { - _flagOnThemeChangedEvent = false; - StyleManager.Instance.Theme = "Family"; - var tab = new Tab(); - StyleManager.Instance.Theme = "Food"; - Assert.IsNotNull(tab, "Should be not null"); - Assert.IsTrue(_flagOnThemeChangedEvent, "Should be true!"); - } - catch (Exception e) - { - Assert.Fail("Caught Exception" + e.ToString()); - } - } - public class MyTab : Tab { public bool flagOnUpdate = false; @@ -661,11 +636,6 @@ namespace Tizen.NUI.Components.Tests flagOnUpdate = true; } - protected override void OnThemeChangedEvent(object sender, StyleManager.ThemeChangeEventArgs e) - { - _flagOnThemeChangedEvent = true; - } - protected override void LayoutChild() { base.LayoutChild();