Commit fcea0eb2 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

[autotests] Fix PointerInputTest::testCursorImage()

Summary:
    FAIL!  : KWin::PointerInputTest::testCursorImage() Compared QImages differ in device pixel ratio.
       Actual   (((p->cursorImage()))): 2
       Expected (blueScaled): 1
       Loc: [/home/vlad/Workspace/KDE/src/kde/workspace/kwin/autotests/integration/pointer_input.cpp(1058)]

Test Plan: The test passes.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27725
parent fb114dfb
......@@ -1048,6 +1048,7 @@ void PointerInputTest::testCursorImage()
// scaled cursor
QImage blueScaled = QImage(QSize(20, 20), QImage::Format_ARGB32_Premultiplied);
blueScaled.setDevicePixelRatio(2);
blueScaled.fill(Qt::blue);
auto bs = Test::waylandShmPool()->createBuffer(blueScaled);
cursorSurface->attachBuffer(bs);
......@@ -1056,7 +1057,6 @@ void PointerInputTest::testCursorImage()
cursorSurface->commit();
QVERIFY(cursorRenderedSpy.wait());
QTRY_COMPARE(p->cursorImage(), blueScaled);
QCOMPARE(p->cursorImage().devicePixelRatio(), 2.0);
QCOMPARE(p->cursorHotSpot(), QPoint(6, 6)); //surface-local (so not changed)
// hide the cursor
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment