diff --git a/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp b/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp
index 2250d0b..6e0673d 100644
--- a/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp
+++ b/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp
@@ -198,6 +198,7 @@ private slots:
     void nestedLoops();
 
     void testQuitLock();
+    void deleteLaterAndExitLoop();
 
 protected:
     void customEvent(QEvent *e);
@@ -721,5 +722,45 @@ void tst_QEventLoop::testQuitLock()
     QVERIFY(timerSpy.count() > 17);
 }
 
+class EventLoopNester : public QObject
+{
+    Q_OBJECT
+public:
+    ~EventLoopNester()
+       {
+           qDebug() << this << __FUNCTION__;
+       }
+
+public slots:
+    void deleteLaterAndExitLoop()
+    {
+        // Check that 'p' is not deleted before exec returns, since the call
+        // to QEventLoop::quit() should stop 'eventLoop' from processing
+        // any more events (that is, delete later) until we return to the
+        // _current_ event loop:
+        QEventLoop eventLoop;
+        QPointer<QObject> p(this);
+        QMetaObject::invokeMethod(this, "deleteLater", Qt::QueuedConnection);
+        QMetaObject::invokeMethod(&eventLoop, "quit", Qt::QueuedConnection);
+        eventLoop.exec();
+        qDebug() << "Checking on p";
+        QVERIFY(p); // not dead yet
+    }
+};
+
+void tst_QEventLoop::deleteLaterAndExitLoop()
+{
+    // When the event loop that calls deleteLater() is exited
+    // immediately, the object should die when returning to the
+    // parent event loop
+    QEventLoop loop;
+    QPointer<EventLoopNester> nester = new EventLoopNester;
+    QTimer::singleShot(3000, &loop, SLOT(quit()));
+    QTimer::singleShot(0, nester, SLOT(deleteLaterAndExitLoop()));
+
+    loop.exec();
+    QVERIFY(!nester);
+}
+
 QTEST_MAIN(tst_QEventLoop)
 #include "tst_qeventloop.moc"
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
index 52cd105..7014e9f 100644
--- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
+++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
@@ -1300,6 +1300,12 @@ void tst_QApplication::testDeleteLater()
 class EventLoopNester : public QObject
 {
     Q_OBJECT
+public:
+    ~EventLoopNester()
+    {
+        qDebug() << this << __FUNCTION__;
+    }
+
 public slots:
     void deleteLaterAndEnterLoop()
     {
@@ -1327,6 +1333,7 @@ public slots:
         QMetaObject::invokeMethod(this, "deleteLater", Qt::QueuedConnection);
         QMetaObject::invokeMethod(&eventLoop, "quit", Qt::QueuedConnection);
         eventLoop.exec();
+        qDebug() << "Checking on p";
         QVERIFY(p); // not dead yet
     }
 
@@ -1374,52 +1381,6 @@ void tst_QApplication::testDeleteLaterProcessEvents()
 {
     int argc = 0;
 
-    // Calling processEvents() with no event dispatcher does nothing.
-    QObject *object = new QObject;
-    QPointer<QObject> p(object);
-    object->deleteLater();
-    QApplication::processEvents();
-    QVERIFY(p);
-    delete object;
-
-    {
-        QApplication app(argc, 0);
-        // If you call processEvents() with an event dispatcher present, but
-        // outside any event loops, deferred deletes are not processed unless
-        // sendPostedEvents(0, DeferredDelete) is called.
-        object = new QObject;
-        p = object;
-        object->deleteLater();
-        app.processEvents();
-        QVERIFY(p);
-        QApplication::sendPostedEvents(0, QEvent::DeferredDelete);
-        QVERIFY(!p);
-
-        // If you call deleteLater() on an object when there is no parent
-        // event loop, and then enter an event loop, the object will get
-        // deleted.
-        object = new QObject;
-        p = object;
-        object->deleteLater();
-        QEventLoop loop;
-        QTimer::singleShot(1000, &loop, SLOT(quit()));
-        loop.exec();
-        QVERIFY(!p);
-    }
-    {
-        // When an object is in an event loop, then calls deleteLater() and enters
-        // an event loop recursively, it should not die until the parent event
-        // loop continues.
-        QApplication app(argc, 0);
-        QEventLoop loop;
-        EventLoopNester *nester = new EventLoopNester;
-        p = nester;
-        QTimer::singleShot(3000, &loop, SLOT(quit()));
-        QTimer::singleShot(0, nester, SLOT(deleteLaterAndEnterLoop()));
-
-        loop.exec();
-        QVERIFY(!p);
-    }
 
     {
         // When the event loop that calls deleteLater() is exited
@@ -1427,29 +1388,14 @@ void tst_QApplication::testDeleteLaterProcessEvents()
         // parent event loop
         QApplication app(argc, 0);
         QEventLoop loop;
-        EventLoopNester *nester = new EventLoopNester;
-        p = nester;
+        QPointer<EventLoopNester> nester = new EventLoopNester;
         QTimer::singleShot(3000, &loop, SLOT(quit()));
         QTimer::singleShot(0, nester, SLOT(deleteLaterAndExitLoop()));
 
         loop.exec();
-        QVERIFY(!p);
+        QVERIFY(!nester);
     }
 
-    {
-        // when the event loop that calls deleteLater() also calls
-        // processEvents() immediately afterwards, the object should
-        // not die until the parent loop continues
-        QApplication app(argc, 0);
-        QEventLoop loop;
-        EventLoopNester *nester = new EventLoopNester();
-        p = nester;
-        QTimer::singleShot(3000, &loop, SLOT(quit()));
-        QTimer::singleShot(0, nester, SLOT(deleteLaterAndProcessEvents()));
-
-        loop.exec();
-        QVERIFY(!p);
-    }
 }
 
 /*
