Sha256: 1e1dff61c162781a4f7f3e671c3706b43a23d4f6caed5ae97f99dd18aefad107
Contents?: true
Size: 809 Bytes
Versions: 2
Compression:
Stored size: 809 Bytes
Contents
#include <QtGui> #include <QtWebKit> #include "Page.h" namespace HeadlessSpecRunner { Page::Page() : QWebPage(), confirmResult(true) {} void Page::javaScriptConsoleMessage(const QString &message, int lineNumber, const QString &sourceID) { emit consoleLog(message, lineNumber, sourceID); } bool Page::javaScriptConfirm(QWebFrame *frame, const QString &msg) { if (confirmResult) { emit internalLog("TODO", "jasmine-headless-webkit can't handle confirm() yet! You should mock window.confirm for now. Returning true."); return true; } else { confirmResult = true; return false; } } void Page::javaScriptAlert(QWebFrame *frame, const QString &msg) { emit internalLog("alert", msg); } void Page::oneFalseConfirm() { confirmResult = false; } }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
jasmine-headless-webkit-0.6.3 | ext/jasmine-webkit-specrunner/HeadlessSpecRunner/Page.cpp |
jasmine-headless-webkit-0.6.2 | ext/jasmine-webkit-specrunner/HeadlessSpecRunner/Page.cpp |