[Webkit-unassigned] [Bug 34755] [Qt] Unit test for window.showModalDialog
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Feb 9 18:30:54 PST 2010
https://bugs.webkit.org/show_bug.cgi?id=34755
Yael <yael.aharon at nokia.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #48434|review+, commit-queue+ |
Flag| |
--- Comment #4 from Yael <yael.aharon at nokia.com> 2010-02-09 18:30:54 PST ---
(From update of attachment 48434)
> Index: WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
> ===================================================================
> --- WebKit/qt/tests/qwebpage/tst_qwebpage.cpp (revision 54545)
> +++ WebKit/qt/tests/qwebpage/tst_qwebpage.cpp (working copy)
> @@ -110,6 +110,7 @@
>
> void originatingObjectInNetworkRequests();
> void testJSPrompt();
> + void showModalDialog();
>
> private:
> QWebView* m_view;
> @@ -1828,5 +1829,26 @@
> 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"
> Index: WebKit/qt/ChangeLog
> ===================================================================
> --- WebKit/qt/ChangeLog (revision 54561)
> +++ WebKit/qt/ChangeLog (working copy)
> @@ -1,5 +1,17 @@
> 2010-02-09 Yael Aharon <yael.aharon at nokia.com>
>
> + Reviewed by NOBODY (OOPS!).
> +
> + [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 Yael Aharon <yael.aharon at nokia.com>
> +
> Reviewed by Kenneth Rohde Christiansen.
>
> [Qt] Webkit in Qt does not have window.showModalDialog
Clearing flags.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list