aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/quick/qquickgridview/qquickgridview.pro2
-rw-r--r--tests/auto/quick/qquicklistview/data/outsideViewportChangeNotAffectingView.qml67
-rw-r--r--tests/auto/quick/qquicklistview/tst_qquicklistview.cpp38
-rw-r--r--tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp13
-rw-r--r--tests/auto/quick/qquickwindow/tst_qquickwindow.cpp2
-rw-r--r--tests/auto/quick/rendernode/tst_rendernode.cpp2
-rw-r--r--tests/auto/quick/touchmouse/touchmouse.pro2
7 files changed, 111 insertions, 15 deletions
diff --git a/tests/auto/quick/qquickgridview/qquickgridview.pro b/tests/auto/quick/qquickgridview/qquickgridview.pro
index dd69cda49e..0e679387cc 100644
--- a/tests/auto/quick/qquickgridview/qquickgridview.pro
+++ b/tests/auto/quick/qquickgridview/qquickgridview.pro
@@ -12,5 +12,3 @@ TESTDATA = data/*
QT += core-private gui-private v8-private qml-private quick-private testlib
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
-
-mac:CONFIG+=insignificant_test # QTBUG-27890
diff --git a/tests/auto/quick/qquicklistview/data/outsideViewportChangeNotAffectingView.qml b/tests/auto/quick/qquicklistview/data/outsideViewportChangeNotAffectingView.qml
new file mode 100644
index 0000000000..7903c392d1
--- /dev/null
+++ b/tests/auto/quick/qquicklistview/data/outsideViewportChangeNotAffectingView.qml
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.1
+import QtTest 1.0
+
+Item {
+ function resizeThirdItem(size) {
+ resizingListModel.setProperty(3, "size", size)
+ }
+
+ ListView {
+ width: 300
+ height: 542
+ model: ListModel {
+ id: resizingListModel
+ ListElement { size: 300; }
+ ListElement { size: 300; }
+ ListElement { size: 300; }
+ ListElement { size: 300; }
+ ListElement { size: 300; }
+ ListElement { size: 300; }
+ }
+ delegate: Rectangle {
+ width: parent.width
+ color: index % 2 == 0 ? "red" : "blue"
+ height: size
+ }
+ }
+}
diff --git a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
index bec61eaccb..2268f0754c 100644
--- a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
+++ b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
@@ -209,6 +209,7 @@ private slots:
void defaultHighlightMoveDuration();
void accessEmptyCurrentItem_QTBUG_30227();
void delayedChanges_QTBUG_30555();
+ void outsideViewportChangeNotAffectingView();
private:
template <class T> void items(const QUrl &source);
@@ -6880,6 +6881,43 @@ void tst_QQuickListView::delayedChanges_QTBUG_30555()
delete window;
}
+void tst_QQuickListView::outsideViewportChangeNotAffectingView()
+{
+ QQuickView *window = createView();
+ window->setSource(testFileUrl("outsideViewportChangeNotAffectingView.qml"));
+
+ QQuickListView *listview = window->rootObject()->findChild<QQuickListView*>();
+ QTRY_VERIFY(listview != 0);
+
+ window->show();
+ QVERIFY(QTest::qWaitForWindowExposed(window));
+
+ flick(window, QPoint(20, 200), QPoint(20, 20), 10);
+
+ QTRY_COMPARE(listview->isFlicking(), false);
+
+ QTRY_COMPARE(listview->indexAt(0, listview->contentY()), 4);
+ QTRY_COMPARE(listview->itemAt(0, listview->contentY())->y(), 1200.);
+
+ QMetaObject::invokeMethod(window->rootObject(), "resizeThirdItem", Q_ARG(QVariant, 290));
+ QTRY_COMPARE(listview->indexAt(0, listview->contentY()), 4);
+ QTRY_COMPARE(listview->itemAt(0, listview->contentY())->y(), 1200.);
+
+ QMetaObject::invokeMethod(window->rootObject(), "resizeThirdItem", Q_ARG(QVariant, 300));
+ QTRY_COMPARE(listview->indexAt(0, listview->contentY()), 4);
+ QTRY_COMPARE(listview->itemAt(0, listview->contentY())->y(), 1200.);
+
+ QMetaObject::invokeMethod(window->rootObject(), "resizeThirdItem", Q_ARG(QVariant, 310));
+ QTRY_COMPARE(listview->indexAt(0, listview->contentY()), 4);
+ QTRY_COMPARE(listview->itemAt(0, listview->contentY())->y(), 1200.);
+
+ QMetaObject::invokeMethod(window->rootObject(), "resizeThirdItem", Q_ARG(QVariant, 400));
+ QTRY_COMPARE(listview->indexAt(0, listview->contentY()), 4);
+ QTRY_COMPARE(listview->itemAt(0, listview->contentY())->y(), 1200.);
+
+ delete window;
+}
+
QTEST_MAIN(tst_QQuickListView)
#include "tst_qquicklistview.moc"
diff --git a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
index 8c72be56a4..06b757d198 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<QQuickTextInput*>("text");
QVERIFY(textInput != 0);
- window.show();
+ window.showNormal();
QCOMPARE(textInput->vAlign(), QQuickTextInput::AlignTop);
QVERIFY(textInput->boundingRect().bottom() < window.height() / 2);
@@ -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<QQuickItem*>("cursorInstance"));
- server.sendDelayedItem();
-
// Wait for component to load.
QTRY_COMPARE(component.status(), QQmlComponent::Ready);
QVERIFY(textInputObject->findChild<QQuickItem*>("cursorInstance"));
@@ -3314,7 +3309,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 +3372,7 @@ void tst_qquicktextinput::openInputPanel()
inputMethodPrivate->testContext = &platformInputContext;
QQuickView view(testFileUrl("openInputPanel.qml"));
- view.show();
+ view.showNormal();
view.requestActivate();
QTest::qWaitForWindowActive(&view);
@@ -3769,7 +3764,7 @@ void tst_qquicktextinput::inputContextMouseHandler()
input->setFocus(true);
input->setText("");
- view.show();
+ view.showNormal();
view.requestActivate();
QTest::qWaitForWindowActive(&view);
diff --git a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
index e2bb6b431c..fbbc77c31c 100644
--- a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
+++ b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
@@ -1072,7 +1072,7 @@ void tst_qquickwindow::noUpdateWhenNothingChanges()
QQuickRectangle rect(window.contentItem());
- window.show();
+ window.showNormal();
QTRY_VERIFY(window.isExposed());
if (window.openglContext()->thread() == QGuiApplication::instance()->thread()) {
diff --git a/tests/auto/quick/rendernode/tst_rendernode.cpp b/tests/auto/quick/rendernode/tst_rendernode.cpp
index 509b209654..04b32499ff 100644
--- a/tests/auto/quick/rendernode/tst_rendernode.cpp
+++ b/tests/auto/quick/rendernode/tst_rendernode.cpp
@@ -59,7 +59,7 @@ public:
QQuickView view;
view.setSource(testFileUrl(fileName));
- view.show();
+ view.showNormal();
QTest::qWaitForWindowExposed(&view);
return view.grabWindow();
diff --git a/tests/auto/quick/touchmouse/touchmouse.pro b/tests/auto/quick/touchmouse/touchmouse.pro
index 378e199bf5..af6d536cbc 100644
--- a/tests/auto/quick/touchmouse/touchmouse.pro
+++ b/tests/auto/quick/touchmouse/touchmouse.pro
@@ -14,5 +14,3 @@ TESTDATA = data/*
# OTHER_FILES += data/foo.qml
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
-
-mac:CONFIG+=insignificant_test # QTBUG-27890