summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-07-16 06:32:27 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-07-16 06:32:27 (GMT)
commit6d5d19b5d92868ed1cd53ea9e6bf8b1119d0da10 (patch)
tree03f51769cb95edd8314cc8198fe9331921f0cc29 /tests
parent368dec26e5dccd6bbaf4f485180bc2ce47294953 (diff)
downloadQt-6d5d19b5d92868ed1cd53ea9e6bf8b1119d0da10.zip
Qt-6d5d19b5d92868ed1cd53ea9e6bf8b1119d0da10.tar.gz
Qt-6d5d19b5d92868ed1cd53ea9e6bf8b1119d0da10.tar.bz2
Allow test to pass on smaller screens (eg. 480 high).
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp b/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp
index b08da0f..de8d222 100644
--- a/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp
+++ b/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp
@@ -152,16 +152,16 @@ void tst_QDeclarativeViewer::loading()
TEST_INITIAL_SIZES(viewer);
- viewer->resize(QSize(400, 500));
+ viewer->resize(QSize(250, 350));
qApp->processEvents();
// window resized
- QTRY_COMPARE(rootItem->width(), 400.0);
- QTRY_COMPARE(rootItem->height(), 500.0 - MENUBAR_HEIGHT(viewer));
- QCOMPARE(viewer->view()->size(), QSize(400, 500 - MENUBAR_HEIGHT(viewer)));
+ QTRY_COMPARE(rootItem->width(), 250.0);
+ QTRY_COMPARE(rootItem->height(), 350.0 - MENUBAR_HEIGHT(viewer));
+ QCOMPARE(viewer->view()->size(), QSize(250, 350 - MENUBAR_HEIGHT(viewer)));
QCOMPARE(viewer->view()->initialSize(), QSize(200, 300));
- QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(400, 500 - MENUBAR_HEIGHT(viewer)));
- QCOMPARE(viewer->size(), QSize(400, 500));
+ QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(250, 350 - MENUBAR_HEIGHT(viewer)));
+ QCOMPARE(viewer->size(), QSize(250, 350));
QCOMPARE(viewer->size(), viewer->sizeHint());
viewer->reload();
@@ -177,16 +177,16 @@ void tst_QDeclarativeViewer::loading()
QCOMPARE(viewer->size(), QSize(200, 300 + MENUBAR_HEIGHT(viewer)));
QCOMPARE(viewer->size(), viewer->sizeHint());
- viewer->resize(QSize(400, 500));
+ viewer->resize(QSize(250, 350));
qApp->processEvents();
// window resized again
- QTRY_COMPARE(rootItem->width(), 400.0);
- QTRY_COMPARE(rootItem->height(), 500.0 - MENUBAR_HEIGHT(viewer));
- QCOMPARE(viewer->view()->size(), QSize(400, 500 - MENUBAR_HEIGHT(viewer)));
+ QTRY_COMPARE(rootItem->width(), 250.0);
+ QTRY_COMPARE(rootItem->height(), 350.0 - MENUBAR_HEIGHT(viewer));
+ QCOMPARE(viewer->view()->size(), QSize(250, 350 - MENUBAR_HEIGHT(viewer)));
QCOMPARE(viewer->view()->initialSize(), QSize(200, 300));
- QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(400, 500 - MENUBAR_HEIGHT(viewer)));
- QCOMPARE(viewer->size(), QSize(400, 500));
+ QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(250, 350 - MENUBAR_HEIGHT(viewer)));
+ QCOMPARE(viewer->size(), QSize(250, 350));
QCOMPARE(viewer->size(), viewer->sizeHint());
viewer->open(SRCDIR "/data/orientation.qml");