2011-08-02 14:20:18 +00:00
|
|
|
#ifndef JHW_TEST_PAGE
|
|
|
|
#define JHW_TEST_PAGE
|
|
|
|
|
2011-08-02 19:47:14 +00:00
|
|
|
#include <QtTest/QtTest>
|
2011-08-02 14:20:18 +00:00
|
|
|
|
2011-08-03 16:26:39 +00:00
|
|
|
#include "Page.h"
|
2011-08-02 14:20:18 +00:00
|
|
|
|
|
|
|
namespace HeadlessSpecRunner {
|
2011-08-02 19:47:14 +00:00
|
|
|
class PageTest : public QObject {
|
2011-08-02 14:20:18 +00:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
PageTest();
|
2011-08-02 19:47:14 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
bool internalLogCalled;
|
|
|
|
bool consoleLogCalled;
|
2011-08-02 14:20:18 +00:00
|
|
|
HeadlessSpecRunner::Page page;
|
|
|
|
|
2011-08-02 19:47:14 +00:00
|
|
|
private slots:
|
|
|
|
void internalLog(const QString ¬e, const QString &msg);
|
|
|
|
void consoleLog(const QString &message, int lineNumber, const QString &source);
|
2011-08-02 14:20:18 +00:00
|
|
|
void testJavaScriptConfirmWithLog();
|
2011-08-02 19:47:14 +00:00
|
|
|
void testJavaScriptConfirmWithoutLog();
|
|
|
|
void testJavaScriptConsoleMessage();
|
2011-08-02 14:20:18 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
2011-08-02 19:47:14 +00:00
|
|
|
|