aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickscreen
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qquickscreen')
-rw-r--r--tests/auto/quick/qquickscreen/data/screen.qml1
-rw-r--r--tests/auto/quick/qquickscreen/tst_qquickscreen.cpp2
2 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickscreen/data/screen.qml b/tests/auto/quick/qquickscreen/data/screen.qml
index dc3803f4e3..c246b3cd83 100644
--- a/tests/auto/quick/qquickscreen/data/screen.qml
+++ b/tests/auto/quick/qquickscreen/data/screen.qml
@@ -9,6 +9,7 @@ Item {
property int curOrientation: Window.Screen.orientation
property int priOrientation: Window.Screen.primaryOrientation
property int updateMask: Window.Screen.orientationUpdateMask
+ property real devicePixelRatio: Window.Screen.devicePixelRatio
Window.Screen.orientationUpdateMask: Qt.LandscapeOrientation | Qt.InvertedLandscapeOrientation
}
diff --git a/tests/auto/quick/qquickscreen/tst_qquickscreen.cpp b/tests/auto/quick/qquickscreen/tst_qquickscreen.cpp
index be543e8022..70ecff51eb 100644
--- a/tests/auto/quick/qquickscreen/tst_qquickscreen.cpp
+++ b/tests/auto/quick/qquickscreen/tst_qquickscreen.cpp
@@ -63,6 +63,8 @@ void tst_qquickscreen::basicProperties()
QCOMPARE(int(screen->orientation()), root->property("curOrientation").toInt());
QCOMPARE(int(screen->primaryOrientation()), root->property("priOrientation").toInt());
QCOMPARE(int(screen->orientationUpdateMask()), root->property("updateMask").toInt());
+ QCOMPARE(screen->devicePixelRatio(), root->property("devicePixelRatio").toReal());
+ QVERIFY(screen->devicePixelRatio() >= 1.0);
}
QTEST_MAIN(tst_qquickscreen)