Changeset 59380 in webkit


Ignore:
Timestamp:
May 13, 2010 12:15:41 PM (14 years ago)
Author:
diegohcg@webkit.org
Message:

2010-05-11 Diego Gonzalez <diegohcg@webkit.org>

Reviewed by Kenneth Rohde Christiansen.

[Qt] tst_QWebPage::inputMethods failing on Maemo5
https://bugs.webkit.org/show_bug.cgi?id=38685

Check if the SIP (Software Input Panel) is triggered, which usually happens
in the case of a mobile platforms, an user input form receives a mouse click.

  • tests/qwebpage/tst_qwebpage.cpp: (tst_QWebPage::inputMethods):
Location:
trunk/WebKit/qt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/qt/ChangeLog

    r59378 r59380  
     12010-05-11  Diego Gonzalez  <diegohcg@webkit.org>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [Qt] tst_QWebPage::inputMethods failing on Maemo5
     6        https://bugs.webkit.org/show_bug.cgi?id=38685
     7
     8        Check if the SIP (Software Input Panel) is triggered, which normally
     9        happens on mobile platforms, when a user input form receives a mouse click.
     10
     11        * tests/qwebpage/tst_qwebpage.cpp:
     12        (tst_QWebPage::inputMethods):
     13
    1142010-05-11  Kenneth Rohde Christiansen  <kenneth@webkit.org>
    215
  • trunk/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp

    r58764 r59380  
    2828#include <QMenu>
    2929#include <QPushButton>
     30#include <QStyle>
    3031#include <QtTest/QtTest>
    3132#include <QTextCharFormat>
     
    13651366
    13661367#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
    1367     QVERIFY(!viewEventSpy.contains(QEvent::RequestSoftwareInputPanel));
     1368    // This part of the test checks if the SIP (Software Input Panel) is triggered,
     1369    // which normally happens on mobile platforms, when a user input form receives
     1370    // a mouse click.
     1371    int  inputPanel = 0;
     1372    if (viewType == "QWebView") {
     1373        if (QWebView* wv = qobject_cast<QWebView*>(view))
     1374            inputPanel = wv->style()->styleHint(QStyle::SH_RequestSoftwareInputPanel);
     1375    } else if (viewType == "QGraphicsWebView") {
     1376        if (QGraphicsWebView* wv = qobject_cast<QGraphicsWebView*>(view))
     1377            inputPanel = wv->style()->styleHint(QStyle::SH_RequestSoftwareInputPanel);
     1378    }
     1379
     1380    // For non-mobile platforms RequestSoftwareInputPanel event is not called
     1381    // because there is no SIP (Software Input Panel) triggered. In the case of a
     1382    // mobile platform, an input panel, e.g. virtual keyboard, is usually invoked
     1383    // and the RequestSoftwareInputPanel event is called. For these two situations
     1384    // this part of the test can verified as the checks below.
     1385    if (inputPanel)
     1386        QVERIFY(viewEventSpy.contains(QEvent::RequestSoftwareInputPanel));
     1387    else
     1388        QVERIFY(!viewEventSpy.contains(QEvent::RequestSoftwareInputPanel));
    13681389#endif
    13691390    viewEventSpy.clear();
Note: See TracChangeset for help on using the changeset viewer.