{
/* TEST CODE */
var manager = ImfManager.Get();
- Assert.IsInstanceOf<ImfManager>(manager, "Should be an instance of ImfManager type.");
- try
- {
- _flagOnLanguageChangedEvent = false;
- Assert.False(_flagOnLanguageChangedEvent, "_flagOnLanguageChangedEvent should false initial");
- manager.LanguageChanged += OnLanguageChangedEvent;
- manager.Deactivate();
- manager.HideInputPanel();
- await Task.Delay(500);
- manager.Activate();
- manager.ShowInputPanel();
- await Task.Delay(500);
- Tizen.Log.Fatal("NUI", "LanguageChanged_CHECK_EVENT()!!!");
- Assert.True(_flagOnLanguageChangedEvent, "Should be true after triger LanguageChanged event.");
- }
- catch (Exception e)
- {
- Tizen.Log.Error(TAG, "Caught Exception" + e.ToString());
- LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
- Assert.Fail("Caught Exception" + e.ToString());
- }
- finally
- {
- manager.LanguageChanged -= OnLanguageChangedEvent;
+ Assert.IsInstanceOf<ImfManager>(manager, "Should be an instance of ImfManager type.");\r
+\r
+ if (manager.GetInputPanelLocale() != null)\r
+ {\r
+ if (manager.GetInputPanelLocale() == "")\r
+ {\r
+ Assert.Pass("InputPanelLocale of ImfManager is not set in this profile");\r
+ }\r
+ else\r
+ {\r
+ try\r
+ {\r
+ _flagOnLanguageChangedEvent = false;\r
+ Assert.False(_flagOnLanguageChangedEvent, "_flagOnLanguageChangedEvent should false initial");\r
+ manager.LanguageChanged += OnLanguageChangedEvent;\r
+ manager.Deactivate();\r
+ manager.HideInputPanel();\r
+ await Task.Delay(500);\r
+ manager.Activate();\r
+ manager.ShowInputPanel();\r
+ await Task.Delay(500);\r
+ Tizen.Log.Fatal("NUI", "LanguageChanged_CHECK_EVENT()!!!");\r
+ Assert.True(_flagOnLanguageChangedEvent, "Should be true after triger LanguageChanged event.");\r
+\r
+ }\r
+ catch (Exception e)\r
+ {\r
+ Tizen.Log.Error(TAG, "Caught Exception" + e.ToString());\r
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());\r
+ Assert.Fail("Caught Exception" + e.ToString());\r
+ }\r
+ finally\r
+ {\r
+ manager.LanguageChanged -= OnLanguageChangedEvent;\r
+ }\r
+ }\r
}
}
await Task.Delay(500);
if (inputMethodContext)
{
- Assert.IsTrue(inputMethodContext.GetInputPanelLocale().Contains("en_US"), "Default value is not en_US");
+ if(inputMethodContext.GetInputPanelLocale() != null)\r
+ {\r
+ if (inputMethodContext.GetInputPanelLocale() != "")\r
+ {\r
+ Assert.IsTrue(inputMethodContext.GetInputPanelLocale().Contains("en_US"), "Default value is not en_US");\r
+ }\r
+ else\r
+ {\r
+ Assert.Pass("InputPanelLocale of InputMethod is not set in this profile");\r
+ }\r
+ }
}
inputMethodContext.Dispose();
};
Window.Instance.GetDefaultLayer().Add(_editor);
InputMethodContext inputMethodContext = _editor.GetInputMethodContext();
- if (inputMethodContext)
- {
- _temp = 0;
- inputMethodContext.LanguageChanged += OnInputMethodContextEvent1;
- inputMethodContext.Deactivate();
- inputMethodContext.HideInputPanel();
- await Task.Delay(500);
- Tizen.Log.Debug("NUI", $"TP#1 LanguageChanged_EVENT() HideInputPanel() TimeStamp={DateTime.Now.ToString("hh:mm:ss.fff")}");
- inputMethodContext.Activate();
- inputMethodContext.ShowInputPanel();
- await Task.Delay(500);
- Tizen.Log.Debug("NUI", $"TP#2 LanguageChanged_EVENT() ShowInputPanel() TimeStamp={DateTime.Now.ToString("hh:mm:ss.fff")}");
- Assert.AreEqual(10, _temp, "Should be 10");
- inputMethodContext.LanguageChanged -= OnInputMethodContextEvent1;
+ if (inputMethodContext)
+ {\r
+ if (inputMethodContext.GetInputPanelLocale() != null)\r
+ {\r
+ if (inputMethodContext.GetInputPanelLocale() == "")\r
+ {\r
+ Assert.Pass("InputPanelLocale of InputMethod is not set in this profile");\r
+ }\r
+ else\r
+ {\r
+ _temp = 0;\r
+ inputMethodContext.LanguageChanged += OnInputMethodContextEvent1;\r
+ inputMethodContext.Deactivate();\r
+ inputMethodContext.HideInputPanel();\r
+ await Task.Delay(500);\r
+ Tizen.Log.Debug("NUI", $"TP#1 LanguageChanged_EVENT() HideInputPanel() TimeStamp={DateTime.Now.ToString("hh:mm:ss.fff")}");\r
+ inputMethodContext.Activate();\r
+ inputMethodContext.ShowInputPanel();\r
+ await Task.Delay(500);\r
+ Tizen.Log.Debug("NUI", $"TP#2 LanguageChanged_EVENT() ShowInputPanel() TimeStamp={DateTime.Now.ToString("hh:mm:ss.fff")}");\r
+\r
+ Assert.AreEqual(10, _temp, "Should be 10");\r
+ inputMethodContext.LanguageChanged -= OnInputMethodContextEvent1;\r
+ }\r
+ }
}
Window.Instance.GetDefaultLayer().Remove(_editor);