From 4f8b87e3066c007e2ef3d1a105e75e307d54bcac Mon Sep 17 00:00:00 2001 From: Rafael Roquetto Date: Tue, 23 Jul 2013 15:59:16 -0300 Subject: Fix tst_qquicktextinput for fullscreen platforms Change-Id: I42683f69a439608f778fbccf90573173bbc03f5b Reviewed-by: Wolfgang Bremer Reviewed-by: Frederik Gladhorn --- tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp') diff --git a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp index 8c72be56a4..def1c76ba1 100644 --- a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp +++ b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp @@ -1573,7 +1573,7 @@ void tst_qquicktextinput::verticalAlignment() QQuickView window(testFileUrl("horizontalAlignment.qml")); QQuickTextInput *textInput = window.rootObject()->findChild("text"); QVERIFY(textInput != 0); - window.show(); + window.showNormal(); QCOMPARE(textInput->vAlign(), QQuickTextInput::AlignTop); QVERIFY(textInput->boundingRect().bottom() < window.height() / 2); @@ -3314,7 +3314,7 @@ void tst_qquicktextinput::focusOnPress() QQuickWindow window; window.resize(100, 50); textInputObject->setParentItem(window.contentItem()); - window.show(); + window.showNormal(); window.requestActivate(); QTest::qWaitForWindowActive(&window); @@ -3377,7 +3377,7 @@ void tst_qquicktextinput::openInputPanel() inputMethodPrivate->testContext = &platformInputContext; QQuickView view(testFileUrl("openInputPanel.qml")); - view.show(); + view.showNormal(); view.requestActivate(); QTest::qWaitForWindowActive(&view); @@ -3769,7 +3769,7 @@ void tst_qquicktextinput::inputContextMouseHandler() input->setFocus(true); input->setText(""); - view.show(); + view.showNormal(); view.requestActivate(); QTest::qWaitForWindowActive(&view); -- cgit v1.2.3 From 54c13c0e9524fb97802318bacc602c5fcf504a20 Mon Sep 17 00:00:00 2001 From: Rafael Roquetto Date: Tue, 23 Jul 2013 16:04:41 -0300 Subject: Fix tst_qquicktextinput::remoteCursorDelegate Do not query for QQmlComponent::Loading on remoteCursorDelegate: when a new connection is established to the test http server, it will setup a single shot QTimer with a 500ms timeout that will trigger the reply to be sent back, making the call to sendDelayedItem() obsolete and reduntant. Also, it means that in some platforms, data will arrive back to the component before the check for QQmlComponent::Loading is executed, causing the test to fail since at this point the status will already be QQmlComponent::Ready instead. Change-Id: I30adeed2a669d5f6618f56d8a023fe7eaea16bc0 Reviewed-by: Wolfgang Bremer Reviewed-by: Frederik Gladhorn --- tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp') diff --git a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp index def1c76ba1..06b757d198 100644 --- a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp +++ b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp @@ -2775,7 +2775,6 @@ void tst_qquicktextinput::cursorDelegate() void tst_qquicktextinput::remoteCursorDelegate() { - QSKIP("This test is unstable"); TestHTTPServer server(SERVER_PORT); server.serveDirectory(dataDirectory(), TestHTTPServer::Delay); @@ -2799,10 +2798,6 @@ void tst_qquicktextinput::remoteCursorDelegate() textInputObject->setFocus(true); QVERIFY(textInputObject->isCursorVisible()); - QCOMPARE(component.status(), QQmlComponent::Loading); - QVERIFY(!textInputObject->findChild("cursorInstance")); - server.sendDelayedItem(); - // Wait for component to load. QTRY_COMPARE(component.status(), QQmlComponent::Ready); QVERIFY(textInputObject->findChild("cursorInstance")); -- cgit v1.2.3