X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Futc-Dali-TextField.cpp;h=f762e8df4d78bf658e0546341f0bc8d463cfda8d;hp=18200b892031e971f2c4cb9f0031b6e94e89da99;hb=ea3acc2d51380bd70ebe63cf121bcaa8d423b340;hpb=aaa8f34f5cbfdb73d82d3b145ff76ccc077f6365 diff --git a/automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp b/automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp index 18200b8..f762e8d 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp @@ -19,17 +19,20 @@ #include #include -#include -#include -#include #include #include #include +#include #include #include +#include #include +#include #include +#include +#include +#include #include "test-text-geometry-utils.h" #include "toolkit-clipboard.h" @@ -71,6 +74,7 @@ const char* const PROPERTY_NAME_GRAB_HANDLE_IMAGE = "grabHand const char* const PROPERTY_NAME_GRAB_HANDLE_PRESSED_IMAGE = "grabHandlePressedImage"; const char* const PROPERTY_NAME_SCROLL_THRESHOLD = "scrollThreshold"; const char* const PROPERTY_NAME_SCROLL_SPEED = "scrollSpeed"; +const char* const PROPERTY_NAME_SELECTION_POPUP_STYLE = "selectionPopupStyle"; const char* const PROPERTY_NAME_SELECTION_HANDLE_IMAGE_LEFT = "selectionHandleImageLeft"; const char* const PROPERTY_NAME_SELECTION_HANDLE_IMAGE_RIGHT = "selectionHandleImageRight"; const char* const PROPERTY_NAME_SELECTION_HANDLE_PRESSED_IMAGE_LEFT = "selectionHandlePressedImageLeft"; @@ -402,6 +406,56 @@ bool DaliTestCheckMaps(const Property::Map& fontStyleMapGet, const Property::Map return true; } + +// Stores data that is populated in the callback and will be read by the test cases +struct SignalData +{ + SignalData() + : functorCalled(false), + voidFunctorCalled(false), + receivedGesture() + { + } + + void Reset() + { + functorCalled = false; + voidFunctorCalled = false; + + receivedGesture.Reset(); + + pannedActor.Reset(); + } + + bool functorCalled; + bool voidFunctorCalled; + PanGesture receivedGesture; + Actor pannedActor; +}; + +// Functor that sets the data when called +struct GestureReceivedFunctor +{ + GestureReceivedFunctor(SignalData& data) + : signalData(data) + { + } + + void operator()(Actor actor, const PanGesture& pan) + { + signalData.functorCalled = true; + signalData.receivedGesture = pan; + signalData.pannedActor = actor; + } + + void operator()() + { + signalData.voidFunctorCalled = true; + } + + SignalData& signalData; +}; + } // namespace int UtcDaliToolkitTextFieldConstructorP(void) @@ -590,6 +644,7 @@ int UtcDaliTextFieldGetPropertyP(void) DALI_TEST_CHECK(field.GetPropertyIndex(PROPERTY_NAME_INPUT_FILTER) == DevelTextField::Property::INPUT_FILTER); DALI_TEST_CHECK(field.GetPropertyIndex(PROPERTY_NAME_STRIKETHROUGH) == DevelTextField::Property::STRIKETHROUGH); DALI_TEST_CHECK(field.GetPropertyIndex(PROPERTY_NAME_INPUT_STRIKETHROUGH) == DevelTextField::Property::INPUT_STRIKETHROUGH); + DALI_TEST_CHECK(field.GetPropertyIndex(PROPERTY_NAME_SELECTION_POPUP_STYLE) == DevelTextField::Property::SELECTION_POPUP_STYLE); END_TEST; } @@ -764,6 +819,64 @@ int UtcDaliTextFieldSetPropertyP(void) DALI_TEST_CHECK(SetPropertyMapRetrieved(field, TextField::Property::SELECTION_HANDLE_MARKER_IMAGE_LEFT, "filename", "leftHandleMarkerImage")); DALI_TEST_CHECK(SetPropertyMapRetrieved(field, TextField::Property::SELECTION_HANDLE_MARKER_IMAGE_RIGHT, "filename", "rightHandleMarkerImage")); + // Check the selection popup style + const Vector2 popupMaxSize(200.0f, 300.0f); + const Vector2 optionDividerSize(30.0f, 5.0f); + const Vector4 optionDividerPadding(20.0f, 20.0f, 10.0f, 10.0f); + const Vector4 labelPadding(5.0f, 5.0f, 50.0f, 25.0f); + + Property::Map selectionPopupStyle; + selectionPopupStyle.Insert(TextSelectionPopup::Property::POPUP_MAX_SIZE, popupMaxSize); + selectionPopupStyle.Insert(TextSelectionPopup::Property::OPTION_DIVIDER_SIZE, optionDividerSize); + selectionPopupStyle.Insert(TextSelectionPopup::Property::OPTION_DIVIDER_PADDING, optionDividerPadding); + selectionPopupStyle.Insert(TextSelectionPopup::Property::LABEL_PADDING, labelPadding); + + field.SetProperty(DevelTextField::Property::SELECTION_POPUP_STYLE, selectionPopupStyle); + + Property::Map selectionPopupStyleGet; + selectionPopupStyleGet = field.GetProperty(DevelTextField::Property::SELECTION_POPUP_STYLE); + + Property::Value* popupValue; + popupValue = selectionPopupStyleGet.Find(TextSelectionPopup::Property::POPUP_MAX_SIZE); + DALI_TEST_CHECK(NULL != popupValue); + if(popupValue) + { + Vector2 popupMaxSizeGet; + popupValue->Get(popupMaxSizeGet); + DALI_TEST_EQUALS(popupMaxSizeGet, popupMaxSize, TEST_LOCATION); + } + + popupValue = selectionPopupStyleGet.Find(TextSelectionPopup::Property::OPTION_DIVIDER_SIZE); + DALI_TEST_CHECK(NULL != popupValue); + if(popupValue) + { + Vector2 optionDividerSizeGet; + popupValue->Get(optionDividerSizeGet); + DALI_TEST_EQUALS(optionDividerSizeGet, optionDividerSize, TEST_LOCATION); + } + + popupValue = selectionPopupStyleGet.Find(TextSelectionPopup::Property::OPTION_DIVIDER_PADDING); + DALI_TEST_CHECK(NULL != popupValue); + if(popupValue) + { + Vector4 optionDividerPaddingGet; + popupValue->Get(optionDividerPaddingGet); + DALI_TEST_EQUALS(optionDividerPaddingGet, optionDividerPadding, TEST_LOCATION); + } + + popupValue = selectionPopupStyleGet.Find(TextSelectionPopup::Property::LABEL_PADDING); + DALI_TEST_CHECK(NULL != popupValue); + if(popupValue) + { + Vector4 labelPaddingGet; + popupValue->Get(labelPaddingGet); + DALI_TEST_EQUALS(labelPaddingGet, labelPadding, TEST_LOCATION); + } + + // Reset selection popup style + selectionPopupStyle.Clear(); + field.SetProperty(DevelTextField::Property::SELECTION_POPUP_STYLE, selectionPopupStyle); + // Check the highlight color field.SetProperty(TextField::Property::SELECTION_HIGHLIGHT_COLOR, Color::GREEN); DALI_TEST_EQUALS(field.GetProperty(TextField::Property::SELECTION_HIGHLIGHT_COLOR), Color::GREEN, TEST_LOCATION); @@ -1598,6 +1711,83 @@ int utcDaliTextFieldTextChangedWithInputMethodContext(void) END_TEST; } +int utcDaliTextFieldSelectionWithInputMethodContext(void) +{ + ToolkitTestApplication application; + tet_infoline(" utcDaliTextFieldSelectionWithInputMethodContext"); + TextField field = TextField::New(); + DALI_TEST_CHECK(field); + + field.SetProperty(TextField::Property::TEXT, "Hello world"); + + application.GetScene().Add(field); + + // connect to the selection changed signal. + ConnectionTracker* testTracker = new ConnectionTracker(); + DevelTextField::SelectionChangedSignal(field).Connect(&TestSelectionChangedCallback); + bool selectionChangedSignal = false; + field.ConnectSignal(testTracker, "selectionChanged", CallbackFunctor(&selectionChangedSignal)); + + // get InputMethodContext + std::string text; + InputMethodContext::EventData imfEvent; + InputMethodContext inputMethodContext = DevelTextField::GetInputMethodContext(field); + + field.SetKeyInputFocus(); + field.SetProperty(DevelTextField::Property::ENABLE_EDITING, true); + + // input text + gSelectionChangedCallbackCalled = false; + imfEvent = InputMethodContext::EventData(InputMethodContext::SELECTION_SET, 1, 4); + inputMethodContext.EventReceivedSignal().Emit(inputMethodContext, imfEvent); + application.SendNotification(); + application.Render(); + DALI_TEST_CHECK(gSelectionChangedCallbackCalled); + + DALI_TEST_EQUALS(field.GetProperty(DevelTextField::Property::SELECTED_TEXT_START).Get(), 1, TEST_LOCATION); + DALI_TEST_EQUALS(field.GetProperty(DevelTextField::Property::SELECTED_TEXT_END).Get(), 4, TEST_LOCATION); + + END_TEST; +} + +int utcDaliTextFieldPositionWithInputMethodContext(void) +{ + ToolkitTestApplication application; + tet_infoline(" utcDaliTextFieldPositionWithInputMethodContext"); + TextField field = TextField::New(); + DALI_TEST_CHECK(field); + + field.SetProperty(TextField::Property::TEXT, "Hello world"); + + application.GetScene().Add(field); + + // connect to the selection changed signal. + ConnectionTracker* testTracker = new ConnectionTracker(); + DevelTextField::CursorPositionChangedSignal(field).Connect(&TestCursorPositionChangedCallback); + bool cursorPositionChangedSignal = false; + field.ConnectSignal(testTracker, "cursorPositionChanged", CallbackFunctor(&cursorPositionChangedSignal)); + + // get InputMethodContext + std::string text; + InputMethodContext::EventData imfEvent; + InputMethodContext inputMethodContext = DevelTextField::GetInputMethodContext(field); + + field.SetKeyInputFocus(); + field.SetProperty(DevelTextField::Property::ENABLE_EDITING, true); + + // input text + gCursorPositionChangedCallbackCalled = false; + imfEvent = InputMethodContext::EventData(InputMethodContext::SELECTION_SET, 2, 2); + inputMethodContext.EventReceivedSignal().Emit(inputMethodContext, imfEvent); + application.SendNotification(); + application.Render(); + DALI_TEST_CHECK(gCursorPositionChangedCallbackCalled); + + DALI_TEST_EQUALS(field.GetProperty(DevelTextField::Property::PRIMARY_CURSOR_POSITION).Get(), 2, TEST_LOCATION); + + END_TEST; +} + // Negative test for the textChanged signal. int utcDaliTextFieldTextChangedN(void) { @@ -2372,7 +2562,7 @@ int utcDaliTextFieldEvent02(void) application.SendNotification(); application.Render(); - Actor layer = field.GetChildAt(1u); + Actor layer = field.GetChildAt(2u); DALI_TEST_EQUALS(layer.GetChildCount(), 1u, TEST_LOCATION); // The cursor. DALI_TEST_EQUALS(stencil.GetChildCount(), 0u, TEST_LOCATION); @@ -2386,7 +2576,7 @@ int utcDaliTextFieldEvent02(void) // Checks the cursor and the renderer have been created. DALI_TEST_EQUALS(layer.GetChildCount(), 1u, TEST_LOCATION); // The cursor. - DALI_TEST_EQUALS(stencil.GetChildCount(), 1u, TEST_LOCATION); // The renderer + DALI_TEST_EQUALS(stencil.GetChildCount(), 2u, TEST_LOCATION); // The renderer, clipped cursor Control cursor = Control::DownCast(layer.GetChildAt(0u)); DALI_TEST_CHECK(cursor); @@ -2468,8 +2658,8 @@ int utcDaliTextFieldEvent02(void) DALI_TEST_EQUALS(position4, position7, TEST_LOCATION); // Should be in the same position2. - // Should not be a renderer. - DALI_TEST_EQUALS(stencil.GetChildCount(), 0u, TEST_LOCATION); + // Should not be a renderer, there is only a clipped cursor. + DALI_TEST_EQUALS(stencil.GetChildCount(), 1u, TEST_LOCATION); // Chanege exceed policy (EXCEED_POLICY_ORIGINAL doesn't use stencil ) field.SetProperty(TextField::Property::TEXT, "This is a long text for the size of the text-field."); @@ -2511,14 +2701,14 @@ int utcDaliTextFieldEvent03(void) application.Render(); // Tap first to get the focus. - TestGenerateTap(application, 3.0f, 25.0f); + TestGenerateTap(application, 3.0f, 25.0f, 100); // Render and notify application.SendNotification(); application.Render(); // Double tap to select a word. - TestGenerateTap(application, 3.0f, 25.0f); + TestGenerateTap(application, 3.0f, 25.0f, 200); // Render and notify application.SendNotification(); @@ -3147,6 +3337,14 @@ int utcDaliTextFieldSomeSpecialKeys(void) application.SendNotification(); application.Render(); + // Generate a Back key event. Nothing happens to the text field. + application.ProcessEvent(GenerateKey("XF86Back", "", "XF86Back", DALI_KEY_BACK, 0, 0, Integration::KeyEvent::DOWN, "XF86Back", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE)); + application.ProcessEvent(GenerateKey("XF86Back", "", "XF86Back", DALI_KEY_BACK, 0, 0, Integration::KeyEvent::UP, "XF86Back", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE)); + + // Render and notify + application.SendNotification(); + application.Render(); + // The text shouldn't be deleted. DALI_TEST_EQUALS(field.GetProperty(TextField::Property::TEXT), longText, TEST_LOCATION); @@ -3836,6 +4034,9 @@ int UtcDaliTextFieldEnableEditing(void) application.SendNotification(); application.Render(); + textField.SetProperty(DevelActor::Property::USER_INTERACTION_ENABLED, true); + DALI_TEST_EQUALS(textField.GetProperty(DevelActor::Property::USER_INTERACTION_ENABLED).Get(), true, TEST_LOCATION); + textField.SetKeyInputFocus(); textField.SetProperty(DevelTextField::Property::ENABLE_EDITING, false); application.ProcessEvent(GenerateKey("D", "", "D", KEY_D_CODE, 0, 0, Integration::KeyEvent::DOWN, "D", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE)); @@ -3858,6 +4059,24 @@ int UtcDaliTextFieldEnableEditing(void) DALI_TEST_EQUALS(textField.GetProperty(TextField::Property::TEXT).Get(), "D", TEST_LOCATION); DALI_TEST_EQUALS(textField.GetProperty(DevelTextField::Property::ENABLE_EDITING).Get(), true, TEST_LOCATION); + // Check the user interaction enabled and for coverage + DevelTextField::SelectWholeText(textField); + + // Render and notify + application.SendNotification(); + application.Render(); + + textField.SetKeyInputFocus(); + textField.SetProperty(DevelActor::Property::USER_INTERACTION_ENABLED, false); + application.ProcessEvent(GenerateKey("D", "", "D", KEY_D_CODE, 0, 0, Integration::KeyEvent::DOWN, "D", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE)); + + // Render and notify + application.SendNotification(); + application.Render(); + + DALI_TEST_EQUALS(textField.GetProperty(TextField::Property::TEXT).Get(), "D", TEST_LOCATION); + DALI_TEST_EQUALS(textField.GetProperty(DevelActor::Property::USER_INTERACTION_ENABLED).Get(), false, TEST_LOCATION); + END_TEST; } @@ -5216,6 +5435,30 @@ int UtcDaliToolkitTextFieldUnderlineTypesGeneration2(void) DALI_TEST_EQUALS(DaliTestCheckMaps(underlineMapGet3, underlineMapSet3), true, TEST_LOCATION); application.GetScene().Add(field3); + + application.SendNotification(); + application.Render(); + + END_TEST; +} + +int UtcDaliTextFieldCharacterSpacing(void) +{ + ToolkitTestApplication application; + tet_infoline(" UtcDaliTextFieldCharacterSpacing "); + + TextField textField = TextField::New(); + + textField.SetProperty(Actor::Property::SIZE, Vector2(150.0f, 300.f)); + + application.GetScene().Add(textField); + application.SendNotification(); + application.Render(); + + textField.SetProperty(TextField::Property::TEXT, "Hi Experiment"); + textField.SetProperty(DevelTextField::Property::CHARACTER_SPACING, 10.f); + DALI_TEST_EQUALS(textField.GetProperty(DevelTextField::Property::CHARACTER_SPACING), 10.f, Math::MACHINE_EPSILON_1000, TEST_LOCATION); + application.SendNotification(); application.Render(); @@ -5256,4 +5499,194 @@ int UtcDaliToolkitTextFieldUnderlineTypesGeneration3(void) application.Render(); END_TEST; -} \ No newline at end of file +} + +int UtcDaliToolkitTextfieldParagraphTag(void) +{ + ToolkitTestApplication application; + tet_infoline(" UtcDaliToolkitTextfieldParagraphTag"); + TextField fieldNewlineSeparator = TextField::New(); + TextField fieldParagraphTag = TextField::New(); + DALI_TEST_CHECK(fieldNewlineSeparator); + DALI_TEST_CHECK(fieldParagraphTag); + + application.GetScene().Add(fieldNewlineSeparator); + application.GetScene().Add(fieldParagraphTag); + + //Same utterance uses new-line to split paragraphs should give similar results for paragraph tag. + fieldNewlineSeparator.SetProperty(TextField::Property::ENABLE_MARKUP, true); + fieldNewlineSeparator.SetProperty(Actor::Property::SIZE, Vector2(100.f, 50.f)); + fieldNewlineSeparator.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT); + fieldNewlineSeparator.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT); + fieldNewlineSeparator.SetProperty(TextField::Property::TEXT, "test paragraph tag \ntest paragraph tag \ntest paragraph tag "); + + fieldParagraphTag.SetProperty(TextField::Property::ENABLE_MARKUP, true); + fieldParagraphTag.SetProperty(Actor::Property::SIZE, Vector2(100.f, 50.f)); + fieldParagraphTag.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT); + fieldParagraphTag.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT); + fieldParagraphTag.SetProperty(TextField::Property::TEXT, "test paragraph tag

test paragraph tag

test paragraph tag "); + + application.SendNotification(); + application.Render(); + + Vector3 textNaturalSizeNewlineSeparator = fieldNewlineSeparator.GetNaturalSize(); + Vector3 textNaturalSizeParagraphTag = fieldParagraphTag.GetNaturalSize(); + + DALI_TEST_EQUALS(textNaturalSizeNewlineSeparator, textNaturalSizeParagraphTag, TEST_LOCATION); + + application.SendNotification(); + application.Render(); + + END_TEST; +} + +//Handle Emoji clustering for cursor handling +int utcDaliTextFieldClusteredEmojiDeletionBackSpaceKey(void) +{ + ToolkitTestApplication application; + tet_infoline(" utcDaliTextFieldClusteredEmojiDeletionBackSpaceKey "); + TextField textField = TextField::New(); + DALI_TEST_CHECK(textField); + + application.GetScene().Add(textField); + + // Avoid a crash when core load gl resources. + application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE); + + textField.SetProperty(TextField::Property::TEXT, "ABC👨‍👩‍👧‍👦XY"); + textField.SetProperty(Dali::Toolkit::TextField::Property::ENABLE_MARKUP, true); + + // Render and notify + application.SendNotification(); + application.Render(); + + // Set currsor + textField.SetProperty(DevelTextField::Property::PRIMARY_CURSOR_POSITION, 10); + application.SendNotification(); + application.Render(); + + // Set focus and remove Emoji + textField.SetKeyInputFocus(); + application.ProcessEvent(GenerateKey("", "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE)); + + //Check the changed text and cursor position + DALI_TEST_EQUALS(textField.GetProperty(TextField::Property::TEXT).Get(), "ABCXY", TEST_LOCATION); + DALI_TEST_EQUALS(textField.GetProperty(DevelTextField::Property::PRIMARY_CURSOR_POSITION).Get(), 3, TEST_LOCATION); + + // Render and notify + application.SendNotification(); + application.Render(); + + END_TEST; +} + +int utcDaliTextFieldClusteredEmojiDeletionDeleteKey(void) +{ + ToolkitTestApplication application; + tet_infoline(" utcDaliTextFieldClusteredEmojiDeletionDeleteKey "); + TextField textField = TextField::New(); + DALI_TEST_CHECK(textField); + + application.GetScene().Add(textField); + + // Avoid a crash when core load gl resources. + application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE); + + textField.SetProperty(TextField::Property::TEXT, "ABC👨‍👩‍👧‍👦XY"); + textField.SetProperty(Dali::Toolkit::TextField::Property::ENABLE_MARKUP, true); + + // Render and notify + application.SendNotification(); + application.Render(); + + // Set currsor + textField.SetProperty(DevelTextField::Property::PRIMARY_CURSOR_POSITION, 3); + application.SendNotification(); + application.Render(); + + // Set focus and remove Emoji + textField.SetKeyInputFocus(); + application.ProcessEvent(GenerateKey("", "", "", Dali::DevelKey::DALI_KEY_DELETE, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE)); + + //Check the changed text and cursor position + DALI_TEST_EQUALS(textField.GetProperty(TextField::Property::TEXT).Get(), "ABCXY", TEST_LOCATION); + DALI_TEST_EQUALS(textField.GetProperty(DevelTextField::Property::PRIMARY_CURSOR_POSITION).Get(), 3, TEST_LOCATION); + + // Render and notify + application.SendNotification(); + application.Render(); + + END_TEST; +} + +int utcDaliTextFieldPanGesturePropagation(void) +{ + ToolkitTestApplication application; + tet_infoline(" utcDaliTextFieldPanGesturePropagation"); + + Actor actor = Actor::New(); + actor.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f)); + actor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT); + application.GetScene().Add(actor); + + TextField field = TextField::New(); + DALI_TEST_CHECK(field); + + field.SetProperty(TextField::Property::TEXT, "This is a long text for the size of the text-field."); + field.SetProperty(TextField::Property::POINT_SIZE, 10.f); + + field.SetProperty(Actor::Property::SIZE, Vector2(50.f, 100.f)); + field.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT); + field.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT); + + actor.Add(field); + + // Render and notify + application.SendNotification(); + application.Render(); + + SignalData data; + GestureReceivedFunctor functor(data); + + PanGestureDetector detector = PanGestureDetector::New(); + detector.Attach(actor); + detector.DetectedSignal().Connect(&application, functor); + + // Tap first to get the focus. + TestGenerateTap(application, 3.0f, 25.0f, 100); + + // Render and notify + application.SendNotification(); + application.Render(); + + // Pan the text field + uint32_t time = 100; + TestStartPan(application, Vector2(40.0f, 50.0f), Vector2(40.0f, 50.0f), time); + TestMovePan(application, Vector2(10.0f, 50.0f), time); + TestEndPan(application, Vector2(40.0f, 50.0f), time); + application.SendNotification(); + application.Render(); + + // The text scrolls because there is text that is scrolling. + DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION); + data.Reset(); + + // Set the size large enough to prevent scrolling. + field.SetProperty(Actor::Property::SIZE, Vector2(700.f, 100.f)); + + // Render and notify + application.SendNotification(); + application.Render(); + + time = 200; + TestStartPan(application, Vector2(40.0f, 50.0f), Vector2(40.0f, 50.0f), time); + TestMovePan(application, Vector2(10.0f, 50.0f), time); + TestEndPan(application, Vector2(40.0f, 50.0f), time); + + // Because scrolling is not possible, the pan gesture is propagated. + DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); + data.Reset(); + + + END_TEST; +}