mirror of
https://github.com/thoughtbot/capybara-webkit
synced 2023-03-27 23:22:28 -04:00
Remove m_commandWaiting and add logging to TimeoutCommand
This commit is contained in:
parent
cbb58d05f1
commit
67b8a3391a
3 changed files with 1 additions and 3 deletions
|
@ -16,7 +16,6 @@ Connection::Connection(QTcpSocket *socket, WebPageManager *manager, QObject *par
|
|||
m_commandFactory = new CommandFactory(m_manager, this);
|
||||
m_commandParser = new CommandParser(socket, m_commandFactory, this);
|
||||
m_pageSuccess = true;
|
||||
m_commandWaiting = false;
|
||||
connect(m_socket, SIGNAL(readyRead()), m_commandParser, SLOT(checkNext()));
|
||||
connect(m_commandParser, SIGNAL(commandReady(Command *)), this, SLOT(commandReady(Command *)));
|
||||
connect(m_manager, SIGNAL(pageFinished(bool)), this, SLOT(pendingLoadFinished(bool)));
|
||||
|
@ -29,7 +28,6 @@ void Connection::commandReady(Command *command) {
|
|||
}
|
||||
|
||||
void Connection::startCommand() {
|
||||
m_commandWaiting = false;
|
||||
if (m_pageSuccess) {
|
||||
m_runningCommand = new PageLoadingCommand(m_queuedCommand, m_manager, this);
|
||||
m_runningCommand = new TimeoutCommand(m_runningCommand, m_manager, this);
|
||||
|
|
|
@ -33,7 +33,6 @@ class Connection : public QObject {
|
|||
CommandFactory *m_commandFactory;
|
||||
Command *m_runningCommand;
|
||||
bool m_pageSuccess;
|
||||
bool m_commandWaiting;
|
||||
WebPage *currentPage();
|
||||
};
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ TimeoutCommand::TimeoutCommand(Command *command, WebPageManager *manager, QObjec
|
|||
|
||||
void TimeoutCommand::start() {
|
||||
if (m_manager->isLoading()) {
|
||||
m_manager->logger() << this->toString() << "waiting for load to finish";
|
||||
connect(m_manager, SIGNAL(pageFinished(bool)), this, SLOT(pendingLoadFinished(bool)));
|
||||
startTimeout();
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue