diff options
Diffstat (limited to 'Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp')
-rw-r--r-- | Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp b/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp index 6af6fc2..97d9f20 100644 --- a/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp +++ b/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp @@ -32,7 +32,7 @@ #include "config.h" #include "DumpRenderTreeQt.h" -#include "../../../Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h" +#include "DumpRenderTreeSupportQt.h" #include "EventSenderQt.h" #include "GCControllerQt.h" #include "LayoutTestControllerQt.h" @@ -499,6 +499,10 @@ DumpRenderTree::DumpRenderTree() DumpRenderTree::~DumpRenderTree() { + if (!m_redirectOutputFileName.isEmpty()) + fclose(stdout); + if (!m_redirectErrorFileName.isEmpty()) + fclose(stderr); delete m_mainView; delete m_stdin; DumpRenderTreeSupportQt::removeMockDeviceOrientation(); @@ -676,9 +680,7 @@ void DumpRenderTree::processArgsLine(const QStringList &args) { setStandAloneMode(true); - for (int i = 1; i < args.size(); ++i) - if (!args.at(i).startsWith('-')) - m_standAloneModeTestList.append(args[i]); + m_standAloneModeTestList = args; QFileInfo firstEntry(m_standAloneModeTestList.first()); if (firstEntry.isDir()) { @@ -690,11 +692,12 @@ void DumpRenderTree::processArgsLine(const QStringList &args) for (int i = 0; i < m_standAloneModeTestList.size(); ++i) m_standAloneModeTestList[i] = folderEntry.absoluteFilePath(m_standAloneModeTestList[i]); } - - processLine(m_standAloneModeTestList.first()); - m_standAloneModeTestList.removeFirst(); - connect(this, SIGNAL(ready()), this, SLOT(loadNextTestInStandAloneMode())); + + if (!m_standAloneModeTestList.isEmpty()) { + QString first = m_standAloneModeTestList.takeFirst(); + processLine(first); + } } void DumpRenderTree::loadNextTestInStandAloneMode() @@ -703,9 +706,8 @@ void DumpRenderTree::loadNextTestInStandAloneMode() emit quit(); return; } - - processLine(m_standAloneModeTestList.first()); - m_standAloneModeTestList.removeFirst(); + QString first = m_standAloneModeTestList.takeFirst(); + processLine(first); } void DumpRenderTree::processLine(const QString &input) |