From: zhouleonlei Date: Wed, 13 May 2020 06:30:13 +0000 (+0800) Subject: [NUI.Manual][Non-ACR] Modified pointSize and crash X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=46dfabce0742c0d36bd0794a47b5dcb290c24ebc;p=test%2Ftct%2Fcsharp%2Fapi.git [NUI.Manual][Non-ACR] Modified pointSize and crash Change-Id: I96083dc06bc3067c5d4d54c66a6ac82aeb10f41b --- diff --git a/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/ManualTestPage.cs b/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/ManualTestPage.cs index 1afe45d..4e97a83 100755 --- a/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/ManualTestPage.cs +++ b/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/ManualTestPage.cs @@ -64,8 +64,8 @@ namespace Tizen.NUI.Components.Tests btn.Focusable = true; btn.Text = text; btn.Name = position.ToString(); - btn.PointSize = (Window.Instance.Size.Width / Window.Instance.Dpi.Length()) * 1.06f; - btn.Size = new Size(Window.Instance.Size.Width * 0.4f, Window.Instance.Size.Height * 0.046f); + btn.PointSize = ManualTest.GetPointSize(); + btn.Size = new Size(Window.Instance.Size.Width, Window.Instance.Size.Height * 0.046f); btn.Style.Text.TextColor = new Color(0, 0, 0, 1); btn.Style.ImageShadow = new ImageShadow { @@ -116,16 +116,14 @@ namespace Tizen.NUI.Components.Tests private const string STEP_ATTRIBUTE_NAME = "NUnit.Framework.StepAttribute"; private const string PRECONDITION_ATTRIBUTE_NAME = "NUnit.Framework.PreconditionAttribute"; private const string POSTCONDITION_ATTRIBUTE_NAME = "NUnit.Framework.PostconditionAttribute"; - private List _listNotPass; private ToastMessage _toastMessage; - //For TV KantM - //private static float PointSize = 30.0f; - //private static float ButtonSizeWidth = 200; + //For TV private float _pointSize = 20.0f; //Save the information of every single test case private List _tcInfoList; private List _currentTCInfo; + private List _listNotPass; private static ManualTestComponents _instance; private static Object _lockObject = new object(); @@ -169,22 +167,34 @@ namespace Tizen.NUI.Components.Tests Window.Instance.BackgroundColor = Color.White; _toastMessage = new ToastMessage(); - _pointSize = (Window.Instance.Size.Width / Window.Instance.Dpi.Length()) * 1.06f; + _pointSize = ManualTest.GetPointSize(); RunType.Value = RunType.MANUAL; _tRunner = new TRunner(); _tRunner.LoadTestsuite(); _tRunner.SingleTestDone += OnSingleTestDone; - _listNotPass = new List(); _tcIDList = new List(); _listItem = new List(); - _listNotPass = TSettings.GetInstance().GetNotPassListManual(); - int count = 0; - foreach (var tc in _listNotPass) - { - _listItem.Add(new ItemData { No = count, TCName = tc, Result = StrResult.NOTRUN }); - _tcIDList.Add(tc); - count++; + _listNotPass = TSettings.GetInstance().GetNotPassListManual(); + int count = 0; + if (_listNotPass.Count == 0) + { + foreach (KeyValuePair pair in _tRunner.GetTestList()) + { + count++; + _listItem.Add(new ItemData { No = count, TCName = pair.Key, Result = StrResult.NOTRUN }); + _tcIDList.Add(pair.Key); + } + } + else + { + foreach (var tc in _listNotPass) + { + count++; + _listItem.Add(new ItemData { No = count, TCName = tc, Result = StrResult.NOTRUN }); + _tcIDList.Add(tc); + } } + Tizen.Log.Fatal("NUI.Components", "TCT : count:" + count.ToString()); foreach (String nameTc in _tcIDList) { @@ -234,7 +244,8 @@ namespace Tizen.NUI.Components.Tests btn.Focusable = true; btn.Text = text; btn.PointSize = _pointSize; - btn.Size = new Size(Window.Instance.Size.Width * 0.06f, Window.Instance.Size.Height * 0.046f); + float buttonWidth = ManualTest.IsMobile() ? Window.Instance.Size.Width * 0.18f : Window.Instance.Size.Width * 0.06f; + btn.Size = new Size(buttonWidth, Window.Instance.Size.Height * 0.046f); btn.Style.Text.TextColor = new Color(0, 0, 0, 1); btn.Style.ImageShadow = new ImageShadow { @@ -286,7 +297,7 @@ namespace Tizen.NUI.Components.Tests //To show all the test case information(Number _className._TCName [result]). _initList = new FlexibleView(); - _initList.Size = new Size(Window.Instance.Size.Width * 0.4f, Window.Instance.Size.Height * 0.74f); + _initList.Size = new Size(Window.Instance.Size.Width, Window.Instance.Size.Height * 0.74f); _adapter = new ListBridge(_tcIDList, _listItem); _initList.SetAdapter(_adapter); LinearLayoutManager layoutManager = new LinearLayoutManager(LinearLayoutManager.VERTICAL); @@ -465,10 +476,12 @@ namespace Tizen.NUI.Components.Tests void CreateButtons() { _notRun = new TextLabel(); - _notRun.HorizontalAlignment = HorizontalAlignment.Begin; + _notRun.HorizontalAlignment = HorizontalAlignment.Center; + _notRun.VerticalAlignment = VerticalAlignment.Center; _notRun.PointSize = _pointSize; _notRun.Text = "Not Run"; - _notRun.Size = new Size(Window.Instance.Size.Width * 0.06f, Window.Instance.Size.Height * 0.046f); + float buttonWidth = ManualTest.IsMobile() ? Window.Instance.Size.Width * 0.18f : Window.Instance.Size.Width * 0.06f; + _notRun.Size = new Size(buttonWidth, Window.Instance.Size.Height * 0.046f); _passButton = new Button(); SetCommonButtonStyle(_passButton, "Pass"); @@ -588,10 +601,18 @@ namespace Tizen.NUI.Components.Tests } }; - _runButton.DownFocusableView = _homeButton; - _homeButton.UpFocusableView = _runButton; + _passButton.RightFocusableView = _failButton; + _passButton.DownFocusableView = _homeButton; + _failButton.LeftFocusableView = _passButton; + _failButton.RightFocusableView = _blockButton; + _blockButton.LeftFocusableView = _failButton; + _blockButton.RightFocusableView = _runButton; + _blockButton.DownFocusableView = _preButton; + _runButton.LeftFocusableView = _blockButton; + _runButton.DownFocusableView = _nextButton; + _homeButton.UpFocusableView = _passButton; _homeButton.RightFocusableView = _preButton; - _preButton.UpFocusableView = _runButton; + _preButton.UpFocusableView = _blockButton; _preButton.LeftFocusableView = _homeButton; _preButton.RightFocusableView = _nextButton; _nextButton.UpFocusableView = _runButton; @@ -712,46 +733,48 @@ namespace Tizen.NUI.Components.Tests ResultNumber.Fail = 0; ResultNumber.Block = 0; _tcInfoList = new List(); - foreach (var testcaseItem in _listItem) - { - foreach (KeyValuePair pair in _tRunner.GetTestList()) - { - if (testcaseItem.TCName.Equals(pair.Key)) - { - List preconditions = new List(); - preconditions.Add("Preconditions:"); - List steps = new List(); - steps.Add("Steps:"); - List postconditions = new List(); - postconditions.Add("Postconditions:\n"); - IEnumerator customAttributes = pair.Value.Method.MethodInfo.CustomAttributes.GetEnumerator(); - while (customAttributes.MoveNext()) - { - if (customAttributes.Current.AttributeType.FullName.Equals(STEP_ATTRIBUTE_NAME)) - { - steps.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); - } - else if (customAttributes.Current.AttributeType.FullName.Equals(PRECONDITION_ATTRIBUTE_NAME)) - { - preconditions.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); - } - else if (customAttributes.Current.AttributeType.FullName.Equals(POSTCONDITION_ATTRIBUTE_NAME)) - { - postconditions.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); - } - } - _tcInfoList.Add(new TestcaseInfo - { - TestcaseName = pair.Key, - Preconditions = preconditions, - Steps = steps, - Postconditions = postconditions, - }); - break; - } - } - UpdateCurrentTCInfo(); + foreach (var testcaseItem in _listItem) + { + foreach (KeyValuePair pair in _tRunner.GetTestList()) + { + if (testcaseItem.TCName.Equals(pair.Key)) + { + IEnumerator customAttributes = pair.Value.Method.MethodInfo.CustomAttributes.GetEnumerator(); + List preconditions = new List(); + preconditions.Add("Preconditions:"); + List steps = new List(); + steps.Add("Steps:"); + List postconditions = new List(); + postconditions.Add("Postconditions:\n"); + + while (customAttributes.MoveNext()) + { + if (customAttributes.Current.AttributeType.FullName.Equals(STEP_ATTRIBUTE_NAME)) + { + steps.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); + } + else if (customAttributes.Current.AttributeType.FullName.Equals(PRECONDITION_ATTRIBUTE_NAME)) + { + preconditions.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); + } + else if (customAttributes.Current.AttributeType.FullName.Equals(POSTCONDITION_ATTRIBUTE_NAME)) + { + postconditions.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); + } + } + + _tcInfoList.Add(new TestcaseInfo + { + TestcaseName = pair.Key, + Preconditions = preconditions, + Steps = steps, + Postconditions = postconditions, + }); + break; + } + } } + UpdateCurrentTCInfo(); } //The data in CurrentTCInfo list will be show in _detailList. diff --git a/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/Utils.cs b/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/Utils.cs index 0c61417..c579608 100755 --- a/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/Utils.cs +++ b/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/Utils.cs @@ -222,6 +222,26 @@ namespace Tizen.NUI.Components.Tests return false; } + public static float GetPointSize() + { + float retValue = 10.0f; //default + string value; + Tizen.System.Information.TryGetValue("tizen.org/feature/profile", out value); + switch (value) + { + case "wearable": + retValue = 4.0f; + break; + case "mobile": + retValue = 5.0f; + break; + case "tv": + retValue = 20.0f; + break; + } + return retValue; + } + public static TextLabel CreateLabel(string information) { TextLabel mLabel = new TextLabel(); diff --git a/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/testcase/TSButton.cs b/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/testcase/TSButton.cs index 5c28591..90e99c0 100755 --- a/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/testcase/TSButton.cs +++ b/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/testcase/TSButton.cs @@ -32,7 +32,7 @@ namespace Tizen.NUI.Components.Tests private ManualTestComponents _testPage; private WearableManualTestNUI _wearTestPage; private Components.Button _button; - private float _pointSize = (Window.Instance.Size.Width / Window.Instance.Dpi.Length()) * 1.06f; + private float _pointSize = 20.0f; [SetUp] public void Init() @@ -45,6 +45,7 @@ namespace Tizen.NUI.Components.Tests } else { + _pointSize = ManualTest.GetPointSize(); _testPage = ManualTestComponents.GetInstance(); } } diff --git a/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/testcase/TSPopup.cs b/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/testcase/TSPopup.cs index 6d99c69..d6a9158 100755 --- a/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/testcase/TSPopup.cs +++ b/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/testcase/TSPopup.cs @@ -33,7 +33,7 @@ namespace Tizen.NUI.Components.Tests private WearableManualTestNUI _wearTestPage; private Popup _popup; - private float _pointSize = (Window.Instance.Size.Width / Window.Instance.Dpi.Length()) * 1.06f; + private float _pointSize = 20.0f; private string _resourcePath = Tizen.Applications.Application.Current.DirectoryInfo.Resource; [SetUp] @@ -47,6 +47,7 @@ namespace Tizen.NUI.Components.Tests } else { + _pointSize = ManualTest.GetPointSize(); _testPage = ManualTestComponents.GetInstance(); } } diff --git a/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/testcase/TSSlider.cs b/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/testcase/TSSlider.cs index 4b295e6..2e39288 100755 --- a/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/testcase/TSSlider.cs +++ b/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/testcase/TSSlider.cs @@ -33,7 +33,7 @@ namespace Tizen.NUI.Components.Tests private Window _window; private View _view; private Button _button; - private float _pointSize = (Window.Instance.Size.Width / Window.Instance.Dpi.Length()) * 1.06f; + private float _pointSize = 20.0f; private TextLabel _label; private Slider _slider; @@ -45,13 +45,13 @@ namespace Tizen.NUI.Components.Tests if (ManualTest.IsWearable()) { _label = ManualTest.CreateLabel("This case is unsuitable for wearable, please press PASS button to continue!"); - _pointSize = (Window.Instance.Size.Width / Window.Instance.Dpi.Length()) * 0.28f; _wearTestPage = WearableManualTestNUI.GetInstance(); } else { _testPage = ManualTestComponents.GetInstance(); } + _pointSize = ManualTest.GetPointSize(); _view = new View(); _view.Size = new Size2D(Window.Instance.Size.Width, (int)(Window.Instance.Size.Height * 0.8)); diff --git a/tct-suite-vs/Tizen.NUI.Manual.Tests/ManualTestPage.cs b/tct-suite-vs/Tizen.NUI.Manual.Tests/ManualTestPage.cs index c664903..231bdd4 100755 --- a/tct-suite-vs/Tizen.NUI.Manual.Tests/ManualTestPage.cs +++ b/tct-suite-vs/Tizen.NUI.Manual.Tests/ManualTestPage.cs @@ -64,8 +64,8 @@ namespace Tizen.NUI.Tests btn.Focusable = true; btn.Text = text; btn.Name = position.ToString(); - btn.PointSize = (Window.Instance.Size.Width / Window.Instance.Dpi.Length()) * 1.06f; - btn.Size = new Size(Window.Instance.Size.Width * 0.4f, Window.Instance.Size.Height * 0.046f); + btn.PointSize = ManualTest.GetPointSize(); + btn.Size = new Size(Window.Instance.Size.Width, Window.Instance.Size.Height * 0.046f); btn.Style.Text.TextColor = new Color(0, 0, 0, 1); btn.Style.ImageShadow = new ImageShadow { @@ -118,9 +118,7 @@ namespace Tizen.NUI.Tests private const string POSTCONDITION_ATTRIBUTE_NAME = "NUnit.Framework.PostconditionAttribute"; private List _listNotPass; private ToastMessage _toastMessage; - //For TV KantM - //private static float PointSize = 30.0f; - //private static float ButtonSizeWidth = 200; + //For TV private float _pointSize = 20.0f; //Save the information of every single test case @@ -170,21 +168,32 @@ namespace Tizen.NUI.Tests Window.Instance.BackgroundColor = Color.White; _toastMessage = new ToastMessage(); - _pointSize = (Window.Instance.Size.Width / Window.Instance.Dpi.Length()) * 1.06f; + _pointSize = ManualTest.GetPointSize(); RunType.Value = RunType.MANUAL; _tRunner = new TRunner(); _tRunner.LoadTestsuite(); _tRunner.SingleTestDone += OnSingleTestDone; - _listNotPass = new List(); _tcIDList = new List(); _listItem = new List(); _listNotPass = TSettings.GetInstance().GetNotPassListManual(); int count = 0; - foreach (var tc in _listNotPass) + if (_listNotPass.Count == 0) { - _listItem.Add(new ItemData { No = count, TCName = tc, Result = StrResult.NOTRUN }); - _tcIDList.Add(tc); - count++; + foreach (KeyValuePair pair in _tRunner.GetTestList()) + { + count++; + _listItem.Add(new ItemData { No = count, TCName = pair.Key, Result = StrResult.NOTRUN }); + _tcIDList.Add(pair.Key); + } + } + else + { + foreach (var tc in _listNotPass) + { + count++; + _listItem.Add(new ItemData { No = count, TCName = tc, Result = StrResult.NOTRUN }); + _tcIDList.Add(tc); + } } Tizen.Log.Fatal("NUI", "TCT : count:" + count.ToString()); foreach (String nameTc in _tcIDList) @@ -235,7 +244,8 @@ namespace Tizen.NUI.Tests btn.Focusable = true; btn.Text = text; btn.PointSize = _pointSize; - btn.Size = new Size(Window.Instance.Size.Width * 0.06f, Window.Instance.Size.Height * 0.046f); + float buttonWidth = ManualTest.IsMobile() ? Window.Instance.Size.Width * 0.18f : Window.Instance.Size.Width * 0.06f; + btn.Size = new Size(buttonWidth, Window.Instance.Size.Height * 0.046f); btn.Style.Text.TextColor = new Color(0, 0, 0, 1); btn.Style.ImageShadow = new ImageShadow { @@ -288,7 +298,7 @@ namespace Tizen.NUI.Tests //To show all the test case information(Number _className._TCName [result]). _initList = new FlexibleView(); _initList.Position = new Position(0, Window.Instance.Size.Height * 0.0925f); - _initList.Size = new Size(Window.Instance.Size.Width * 0.5f, Window.Instance.Size.Height * 0.79f); + _initList.Size = new Size(Window.Instance.Size.Width, Window.Instance.Size.Height * 0.74f); _adapter = new ListBridge(_tcIDList, _listItem); _initList.SetAdapter(_adapter); LinearLayoutManager layoutManager = new LinearLayoutManager(LinearLayoutManager.VERTICAL); @@ -466,10 +476,12 @@ namespace Tizen.NUI.Tests void CreateButtons() { _notRun = new TextLabel(); - _notRun.HorizontalAlignment = HorizontalAlignment.Begin; + _notRun.HorizontalAlignment = HorizontalAlignment.Center; + _notRun.VerticalAlignment = VerticalAlignment.Center; _notRun.PointSize = _pointSize; _notRun.Text = "Not Run"; - _notRun.Size = new Size(Window.Instance.Size.Width * 0.06f, Window.Instance.Size.Height * 0.046f); + float buttonWidth = ManualTest.IsMobile() ? Window.Instance.Size.Width * 0.18f : Window.Instance.Size.Width * 0.06f; + _notRun.Size = new Size(buttonWidth, Window.Instance.Size.Height * 0.046f); _passButton = new Button(); SetCommonButtonStyle(_passButton, "Pass"); @@ -589,10 +601,18 @@ namespace Tizen.NUI.Tests } }; - _runButton.DownFocusableView = _homeButton; - _homeButton.UpFocusableView = _runButton; + _passButton.RightFocusableView = _failButton; + _passButton.DownFocusableView = _homeButton; + _failButton.LeftFocusableView = _passButton; + _failButton.RightFocusableView = _blockButton; + _blockButton.LeftFocusableView = _failButton; + _blockButton.RightFocusableView = _runButton; + _blockButton.DownFocusableView = _preButton; + _runButton.LeftFocusableView = _blockButton; + _runButton.DownFocusableView = _nextButton; + _homeButton.UpFocusableView = _passButton; _homeButton.RightFocusableView = _preButton; - _preButton.UpFocusableView = _runButton; + _preButton.UpFocusableView = _blockButton; _preButton.LeftFocusableView = _homeButton; _preButton.RightFocusableView = _nextButton; _nextButton.UpFocusableView = _runButton; @@ -715,46 +735,48 @@ namespace Tizen.NUI.Tests ResultNumber.Fail = 0; ResultNumber.Block = 0; _tcInfoList = new List(); - foreach (var testcaseItem in _listItem) - { - foreach (KeyValuePair pair in _tRunner.GetTestList()) - { - if (testcaseItem.TCName.Equals(pair.Key)) - { - List preconditions = new List(); + foreach (var testcaseItem in _listItem) + { + foreach (KeyValuePair pair in _tRunner.GetTestList()) + { + if (testcaseItem.TCName.Equals(pair.Key)) + { + IEnumerator customAttributes = pair.Value.Method.MethodInfo.CustomAttributes.GetEnumerator(); + List preconditions = new List(); preconditions.Add("Preconditions:"); - List steps = new List(); + List steps = new List(); steps.Add("Steps:"); - List postconditions = new List(); + List postconditions = new List(); postconditions.Add("Postconditions:\n"); - IEnumerator customAttributes = pair.Value.Method.MethodInfo.CustomAttributes.GetEnumerator(); - while (customAttributes.MoveNext()) - { - if (customAttributes.Current.AttributeType.FullName.Equals(STEP_ATTRIBUTE_NAME)) - { - steps.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); - } - else if (customAttributes.Current.AttributeType.FullName.Equals(PRECONDITION_ATTRIBUTE_NAME)) - { - preconditions.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); - } - else if (customAttributes.Current.AttributeType.FullName.Equals(POSTCONDITION_ATTRIBUTE_NAME)) - { - postconditions.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); - } - } - _tcInfoList.Add(new TestcaseInfo - { - TestcaseName = pair.Key, - Preconditions = preconditions, - Steps = steps, - Postconditions = postconditions, - }); - break; - } - } - UpdateCurrentTCInfo(); + + while (customAttributes.MoveNext()) + { + if (customAttributes.Current.AttributeType.FullName.Equals(STEP_ATTRIBUTE_NAME)) + { + steps.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); + } + else if (customAttributes.Current.AttributeType.FullName.Equals(PRECONDITION_ATTRIBUTE_NAME)) + { + preconditions.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); + } + else if (customAttributes.Current.AttributeType.FullName.Equals(POSTCONDITION_ATTRIBUTE_NAME)) + { + postconditions.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); + } + } + + _tcInfoList.Add(new TestcaseInfo + { + TestcaseName = pair.Key, + Preconditions = preconditions, + Steps = steps, + Postconditions = postconditions, + }); + break; + } + } } + UpdateCurrentTCInfo(); } //The data in CurrentTCInfo list will be show in _detailList. diff --git a/tct-suite-vs/Tizen.NUI.Manual.Tests/Utils.cs b/tct-suite-vs/Tizen.NUI.Manual.Tests/Utils.cs index 73051a9..ae6ca51 100755 --- a/tct-suite-vs/Tizen.NUI.Manual.Tests/Utils.cs +++ b/tct-suite-vs/Tizen.NUI.Manual.Tests/Utils.cs @@ -220,6 +220,26 @@ namespace Tizen.NUI.Tests } return false; + } + + public static float GetPointSize() + { + float retValue = 10.0f; //default + string value; + Tizen.System.Information.TryGetValue("tizen.org/feature/profile", out value); + switch (value) + { + case "wearable": + retValue = 4.0f; + break; + case "mobile": + retValue = 5.0f; + break; + case "tv": + retValue = 20.0f; + break; + } + return retValue; } public static TextLabel CreateLabel(string information) diff --git a/tct-suite-vs/Tizen.NUI.Manual.Tests/testcase/TSFocusManager.cs b/tct-suite-vs/Tizen.NUI.Manual.Tests/testcase/TSFocusManager.cs index b6d868e..6ba1f11 100755 --- a/tct-suite-vs/Tizen.NUI.Manual.Tests/testcase/TSFocusManager.cs +++ b/tct-suite-vs/Tizen.NUI.Manual.Tests/testcase/TSFocusManager.cs @@ -31,7 +31,7 @@ namespace Tizen.NUI.Tests private WearableManualTestNUI _wearTestPage; private Button _button1; private FocusManager _focusManager; - private float _pointSize = (Window.Instance.Size.Width / Window.Instance.Dpi.Length()) * 1.06f; + private float _pointSize = 20.0f; private TextLabel _label; [SetUp] @@ -48,6 +48,7 @@ namespace Tizen.NUI.Tests } else { + _pointSize = ManualTest.GetPointSize(); _testPage = ManualTestNUI.GetInstance(); } } diff --git a/tct-suite-vs/Tizen.NUI.Manual.Tests/testcase/TSInputMethodContext.cs b/tct-suite-vs/Tizen.NUI.Manual.Tests/testcase/TSInputMethodContext.cs index 5f4c24c..66664b5 100755 --- a/tct-suite-vs/Tizen.NUI.Manual.Tests/testcase/TSInputMethodContext.cs +++ b/tct-suite-vs/Tizen.NUI.Manual.Tests/testcase/TSInputMethodContext.cs @@ -31,7 +31,7 @@ namespace Tizen.NUI.Tests private WearableManualTestNUI _wearTestPage; private Window _window; private Button _button; - private float _pointSize = (Window.Instance.Size.Width / Window.Instance.Dpi.Length()) * 1.06f; + private float _pointSize = 20.0f; private TextLabel _label; private TextEditor _textEditor; @@ -48,6 +48,7 @@ namespace Tizen.NUI.Tests } else { + _pointSize = ManualTest.GetPointSize(); _testPage = ManualTestNUI.GetInstance(); } } diff --git a/tct-suite-vs/Tizen.NUI.Manual.Tests/testcase/TSNUIWidgetApplication.cs b/tct-suite-vs/Tizen.NUI.Manual.Tests/testcase/TSNUIWidgetApplication.cs index 86b8eb2..5ccc5c5 100755 --- a/tct-suite-vs/Tizen.NUI.Manual.Tests/testcase/TSNUIWidgetApplication.cs +++ b/tct-suite-vs/Tizen.NUI.Manual.Tests/testcase/TSNUIWidgetApplication.cs @@ -30,7 +30,6 @@ namespace Tizen.NUI.Tests { private ManualTestNUI _testPage; private WearableManualTestNUI _wearTestPage; - private float _pointSize = (Window.Instance.Size.Width / Window.Instance.Dpi.Length()) * 1.06f; private bool _isMobile = false; private bool _isWearable = false; private bool _isEmulator = false; @@ -56,7 +55,6 @@ namespace Tizen.NUI.Tests if(ManualTest.IsWearable()) { - _pointSize = 4.0f; _wearTestPage = WearableManualTestNUI.GetInstance(); } else diff --git a/tct-suite-vs/Tizen.NUI.Manual.Tests/testcase/TSTouch.cs b/tct-suite-vs/Tizen.NUI.Manual.Tests/testcase/TSTouch.cs index 8d128e9..48bd5b1 100755 --- a/tct-suite-vs/Tizen.NUI.Manual.Tests/testcase/TSTouch.cs +++ b/tct-suite-vs/Tizen.NUI.Manual.Tests/testcase/TSTouch.cs @@ -32,7 +32,7 @@ namespace Tizen.NUI.Tests private WearableManualTestNUI _wearTestPage; private Window _window; private Button _button; - private float _pointSize = (Window.Instance.Size.Width / Window.Instance.Dpi.Length()) * 1.06f; + private float _pointSize = 20.0f; private TextLabel _label; [SetUp] @@ -48,6 +48,7 @@ namespace Tizen.NUI.Tests } else { + _pointSize = ManualTest.GetPointSize(); _testPage = ManualTestNUI.GetInstance(); } } diff --git a/tct-suite-vs/Tizen.NUI.Manual.Tests/testcase/TSView.cs b/tct-suite-vs/Tizen.NUI.Manual.Tests/testcase/TSView.cs index 603c0bd..2869703 100755 --- a/tct-suite-vs/Tizen.NUI.Manual.Tests/testcase/TSView.cs +++ b/tct-suite-vs/Tizen.NUI.Manual.Tests/testcase/TSView.cs @@ -31,7 +31,7 @@ namespace Tizen.NUI.Tests private ManualTestNUI _testPage; private WearableManualTestNUI _wearTestPage; private Button _button; - private float _pointSize = (Window.Instance.Size.Width / Window.Instance.Dpi.Length()) * 1.06f; + private float _pointSize = 20.0f; private TextLabel _label; [SetUp] @@ -46,6 +46,7 @@ namespace Tizen.NUI.Tests } else { + _pointSize = ManualTest.GetPointSize(); _testPage = ManualTestNUI.GetInstance(); } } diff --git a/tct-suite-vs/Tizen.NUI.Manual.Tests/testcase/TSWidget.cs b/tct-suite-vs/Tizen.NUI.Manual.Tests/testcase/TSWidget.cs index 752f966..514909e 100755 --- a/tct-suite-vs/Tizen.NUI.Manual.Tests/testcase/TSWidget.cs +++ b/tct-suite-vs/Tizen.NUI.Manual.Tests/testcase/TSWidget.cs @@ -30,7 +30,6 @@ namespace Tizen.NUI.Tests { private ManualTestNUI _testPage; private WearableManualTestNUI _wearTestPage; - private float _pointSize = (Window.Instance.Size.Width / Window.Instance.Dpi.Length()) * 1.06f; [SetUp] public void Init() @@ -50,7 +49,6 @@ namespace Tizen.NUI.Tests AppControl.SendLaunchRequest(myAppControl); if(ManualTest.IsWearable()) { - _pointSize = 4.0f; _wearTestPage = WearableManualTestNUI.GetInstance(); } else diff --git a/tct-suite-vs/Tizen.NUI.Manual.Tests/testcase/TSWidgetView.cs b/tct-suite-vs/Tizen.NUI.Manual.Tests/testcase/TSWidgetView.cs index 164d9b2..dae9a50 100755 --- a/tct-suite-vs/Tizen.NUI.Manual.Tests/testcase/TSWidgetView.cs +++ b/tct-suite-vs/Tizen.NUI.Manual.Tests/testcase/TSWidgetView.cs @@ -30,7 +30,6 @@ namespace Tizen.NUI.Tests { private ManualTestNUI _testPage; private WearableManualTestNUI _wearTestPage; - private float _pointSize = (Window.Instance.Size.Width / Window.Instance.Dpi.Length()) * 1.06f; [SetUp] public void Init() @@ -51,7 +50,6 @@ namespace Tizen.NUI.Tests if (ManualTest.IsWearable()) { - _pointSize = 4.0f; _wearTestPage = WearableManualTestNUI.GetInstance(); } else diff --git a/tct-suite-vs/Tizen.NUI.Manual.Tests/testcase/TSWindow.cs b/tct-suite-vs/Tizen.NUI.Manual.Tests/testcase/TSWindow.cs index 3ff0703..aa0fc9a 100755 --- a/tct-suite-vs/Tizen.NUI.Manual.Tests/testcase/TSWindow.cs +++ b/tct-suite-vs/Tizen.NUI.Manual.Tests/testcase/TSWindow.cs @@ -32,7 +32,7 @@ namespace Tizen.NUI.Tests private WearableManualTestNUI _wearTestPage; private Window _window; private Button _button; - private float _pointSize = (Window.Instance.Size.Width / Window.Instance.Dpi.Length()) * 1.06f; + private float _pointSize = 20.0f; private TextLabel _label; [SetUp] @@ -48,6 +48,7 @@ namespace Tizen.NUI.Tests } else { + _pointSize = ManualTest.GetPointSize(); _testPage = ManualTestNUI.GetInstance(); } }