Commit 004c0f38 authored by Martin Flöser's avatar Martin Flöser

[autotests] Test creating core context profile

Extends OpenGL testRestart to once with GLCore and once with legacy.
parent a4d401c0
......@@ -80,9 +80,24 @@ void GenericSceneOpenGLTest::initTestCase()
QVERIFY(Compositor::self());
}
void GenericSceneOpenGLTest::testRestart_data()
{
QTest::addColumn<bool>("core");
QTest::newRow("GLCore") << true;
QTest::newRow("Legacy") << false;
}
void GenericSceneOpenGLTest::testRestart()
{
// simple restart of the OpenGL compositor without any windows being shown
// setup opengl compositing options
auto compositingGroup = kwinApp()->config()->group("Compositing");
QFETCH(bool, core);
compositingGroup.writeEntry("GLCore", core);
compositingGroup.sync();
QSignalSpy sceneCreatedSpy(KWin::Compositor::self(), &Compositor::sceneCreated);
QVERIFY(sceneCreatedSpy.isValid());
KWin::Compositor::self()->slotReinitialize();
......
......@@ -32,6 +32,7 @@ protected:
private Q_SLOTS:
void initTestCase();
void cleanup();
void testRestart_data();
void testRestart();
private:
......
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