[autotests] Extend TestDataDevice for unbound check in createDataOffer
Extends the test case for checking that the nullptr check is taken when trying to send a selection on an already unbound DataDevice.
This commit is contained in:
parent
e2d46c574c
commit
2417faff4d
1 changed files with 11 additions and 0 deletions
|
@ -380,6 +380,17 @@ void TestDataDevice::testSetSelection()
|
|||
QCOMPARE(selectionChangedSpy.count(), 1);
|
||||
QCOMPARE(selectionClearedSpy.count(), 1);
|
||||
QVERIFY(!deviceInterface->selection());
|
||||
|
||||
// set another selection
|
||||
dataDevice->setSelection(2, dataSource.data());
|
||||
QVERIFY(selectionChangedSpy.wait());
|
||||
// now unbind the dataDevice
|
||||
QSignalSpy unboundSpy(deviceInterface, &DataDeviceInterface::unbound);
|
||||
QVERIFY(unboundSpy.isValid());
|
||||
dataDevice.reset();
|
||||
QVERIFY(unboundSpy.wait());
|
||||
// send a selection to the unbound data device
|
||||
deviceInterface->sendSelection(deviceInterface);
|
||||
}
|
||||
|
||||
void TestDataDevice::testSendSelectionOnSeat()
|
||||
|
|
Loading…
Reference in a new issue