Beispiel #1
0
// Called on loadFinished on WebPage
void TestRunner::maybeDump(bool /*success*/)
{

    // This can happen on any of the http/tests/security/window-events-*.html tests, where the test opens
    // a new window, calls the unload and load event handlers on the window's page, and then immediately
    // issues a notifyDone. Needs investigation.
    if (!m_topLoadingFrame)
        return;

    // It is possible that we get called by windows created from the main page that have finished
    // loading, so we don't ASSERT here. At the moment we do not gather results from such windows,
    // but may need to in future.
    if (sender() != m_topLoadingFrame->page())
        return;

    m_loadFinished = true;
    // as the function is called on loadFinished, the test might
    // already have dumped and thus no longer be active, thus
    // bail out here.
    if (m_hasDumped)
        return;

    WorkQueue::shared()->setFrozen(true); // first complete load freezes the queue for the rest of this test
    if (WorkQueue::shared()->count())
        QTimer::singleShot(0, this, SLOT(processWork()));
    else if (!shouldWaitUntilDone()) {
        emit done();
        m_hasDumped = true;
    }
}
Beispiel #2
0
void LayoutTestController::maybeDump(bool ok)
{
    m_topLoadingFrame = 0;

    if (!shouldWaitUntilDone()) {
        emit done();
        m_isLoading = false;
    }
}
Beispiel #3
0
void TestRunner::processWork()
{
    // qDebug() << ">>>processWork";

    // if we didn't start a new load, then we finished all the commands, so we're ready to dump state
    if (WorkQueue::shared()->processWork() && !shouldWaitUntilDone()) {
        emit done();
        m_hasDumped = true;
    }
}
Beispiel #4
0
void LayoutTestController::maybeDump(bool)
{
    m_topLoadingFrame = 0;
    WorkQueue::shared()->setFrozen(true); // first complete load freezes the queue for the rest of this test

    if (!shouldWaitUntilDone()) {
        if (WorkQueue::shared()->count())
            QTimer::singleShot(0, this, SLOT(processWork()));
        else {
            emit done();
            m_isLoading = false;
        }
    }
}
Beispiel #5
0
void LayoutTestController::processWork()
{
    qDebug() << ">>>processWork";

    // quit doing work once a load is in progress
    while (WorkQueue::shared()->count() > 0 && !m_topLoadingFrame) {
        WorkQueueItem* item = WorkQueue::shared()->dequeue();
        Q_ASSERT(item);
        item->invoke();
        delete item;
    }

    // if we didn't start a new load, then we finished all the commands, so we're ready to dump state
    if (!m_topLoadingFrame && !shouldWaitUntilDone()) {
        emit done();
        m_isLoading = false;
    }
}