The test has some strict focus requirements, but if they are not met
then the test should FAIL with a bit of explanation instead of crash.
Change-Id: I796e8a8092833f3413b3dc98a22466575dfe241d
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
textinputObject->setCursorPosition(0);
{ QInputMethodEvent inputEvent(preeditText, QList<QInputMethodEvent::Attribute>());
+ QVERIFY(qGuiApp->focusObject());
QGuiApplication::sendEvent(qGuiApp->focusObject(), &inputEvent); }
// Check all points within the preedit text return the same position.
QCOMPARE(textinputObject->positionToRectangle(1).x(), x1);
{ QInputMethodEvent inputEvent;
+ QVERIFY(qGuiApp->focusObject());
QGuiApplication::sendEvent(qGuiApp->focusObject(), &inputEvent); }
// With wrapping.