[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756
yael.aharon at nokia.com
yael.aharon at nokia.com
Fri Feb 26 22:16:28 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit ef41ca2d05be06939ea16fe5a8da671bded8bf95
Author: yael.aharon at nokia.com <yael.aharon at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Feb 10 02:29:28 2010 +0000
[Qt] Unit test for window.runModalDialog
https://bugs.webkit.org/show_bug.cgi?id=34755
Reviewed by Adam Barth.
* tests/qwebpage/tst_qwebpage.cpp:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54578 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index d814a2a..e22b929 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,15 @@
+2010-02-09 Yael Aharon <yael.aharon at nokia.com>
+
+ Reviewed by Adam Barth.
+
+ [Qt] Unit test for window.runModalDialog
+ https://bugs.webkit.org/show_bug.cgi?id=34755
+
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (TestModalPage::TestModalPage):
+ (TestModalPage::createWindow):
+ (tst_QWebPage::showModalDialog):
+
2010-02-09 Andreas Kling <andreas.kling at nokia.com>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index f48fb73..ba7a87e 100644
--- a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -110,6 +110,7 @@ private slots:
void originatingObjectInNetworkRequests();
void testJSPrompt();
+ void showModalDialog();
private:
QWebView* m_view;
@@ -1828,5 +1829,26 @@ void tst_QWebPage::testJSPrompt()
QVERIFY(res);
}
+class TestModalPage : public QWebPage
+{
+ Q_OBJECT
+public:
+ TestModalPage(QObject* parent = 0) : QWebPage(parent) {
+ }
+ virtual QWebPage* createWindow(WebWindowType) {
+ QWebPage* page = new TestModalPage();
+ connect(page, SIGNAL(windowCloseRequested()), page, SLOT(deleteLater()));
+ return page;
+ }
+};
+
+void tst_QWebPage::showModalDialog()
+{
+ TestModalPage page;
+ page.mainFrame()->setHtml(QString("<html></html>"));
+ QString res = page.mainFrame()->evaluateJavaScript("window.showModalDialog('javascript:window.returnValue=dialogArguments; window.close();', 'This is a test');").toString();
+ QCOMPARE(res, QString("This is a test"));
+}
+
QTEST_MAIN(tst_QWebPage)
#include "tst_qwebpage.moc"
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list