Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/dont_crash_empty_deco.cpp
Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Line(s) | 50 | { | |||
---|---|---|---|---|---|
51 | if (!QFile::exists(QStringLiteral("/dev/dri/card0"))) { | 51 | if (!QFile::exists(QStringLiteral("/dev/dri/card0"))) { | ||
52 | QSKIP("Needs a dri device"); | 52 | QSKIP("Needs a dri device"); | ||
53 | } | 53 | } | ||
54 | qRegisterMetaType<KWin::ShellClient*>(); | 54 | qRegisterMetaType<KWin::ShellClient*>(); | ||
55 | qRegisterMetaType<KWin::AbstractClient*>(); | 55 | qRegisterMetaType<KWin::AbstractClient*>(); | ||
56 | QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); | 56 | QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); | ||
57 | QVERIFY(workspaceCreatedSpy.isValid()); | 57 | QVERIFY(workspaceCreatedSpy.isValid()); | ||
58 | kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); | 58 | kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); | ||
59 | QMetaObject::invokeMethod(kwinApp()->platform(), "setOutputCount", Qt::DirectConnection, Q_ARG(int, 2)); | 59 | QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); | ||
60 | QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); | 60 | QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); | ||
61 | 61 | | |||
62 | // this test needs to enforce OpenGL compositing to get into the crashy condition | 62 | // this test needs to enforce OpenGL compositing to get into the crashy condition | ||
63 | qputenv("KWIN_COMPOSE", QByteArrayLiteral("O2")); | 63 | qputenv("KWIN_COMPOSE", QByteArrayLiteral("O2")); | ||
64 | kwinApp()->start(); | 64 | kwinApp()->start(); | ||
65 | QVERIFY(workspaceCreatedSpy.wait()); | 65 | QVERIFY(workspaceCreatedSpy.wait()); | ||
66 | QCOMPARE(screens()->count(), 2); | 66 | QCOMPARE(screens()->count(), 2); | ||
67 | QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); | 67 | QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); | ||
▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines |