[autotests] Test creating core context profile

Extends OpenGL testRestart to once with GLCore and once with legacy.
icc-effect-5.14.5
Martin Flöser 2017-06-25 09:48:46 +02:00
parent a4d401c028
commit 004c0f3892
2 changed files with 16 additions and 0 deletions

View File

@ -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();

View File

@ -32,6 +32,7 @@ protected:
private Q_SLOTS:
void initTestCase();
void cleanup();
void testRestart_data();
void testRestart();
private: