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