Changeset 66219 in webkit


Ignore:
Timestamp:
Aug 27, 2010 7:03:17 AM (14 years ago)
Author:
benjamin.poulain@nokia.com
Message:

2010-08-27 Benjamin Poulain <benjamin.poulain@nokia.com>

Reviewed by Kenneth Rohde Christiansen.

[Qt] tst_QWebFrame::hitTestContent() fails on Meego Handset
https://bugs.webkit.org/show_bug.cgi?id=44701

Make the test more robust. The position of the text is not relying
on the size of the fonts anymore.

  • tests/qwebframe/tst_qwebframe.cpp:
Location:
trunk/WebKit/qt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/qt/ChangeLog

    r66217 r66219  
     12010-08-27  Benjamin Poulain  <benjamin.poulain@nokia.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [Qt] tst_QWebFrame::hitTestContent() fails on Meego Handset
     6        https://bugs.webkit.org/show_bug.cgi?id=44701
     7
     8        Make the test more robust. The position of the text is not relying
     9        on the size of the fonts anymore.
     10
     11        * tests/qwebframe/tst_qwebframe.cpp:
     12
    1132010-08-26  Antonio Gomes  <tonikitoo@webkit.org>
    214
  • trunk/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp

    r66096 r66219  
    27152715void tst_QWebFrame::hitTestContent()
    27162716{
    2717     QString html("<html><body><p>A paragraph</p><br/><br/><br/><a href=\"about:blank\" target=\"_foo\">link text</a></body></html>");
     2717    QString html("<html><body><p>A paragraph</p><br/><br/><br/><a href=\"about:blank\" target=\"_foo\" id=\"link\">link text</a></body></html>");
    27182718
    27192719    QWebPage page;
     
    27212721    frame->setHtml(html);
    27222722    page.setViewportSize(QSize(200, 0)); //no height so link is not visible
    2723     QWebHitTestResult result = frame->hitTestContent(QPoint(10, 100));
     2723    const QWebElement linkElement = frame->documentElement().findFirst(QLatin1String("a#link"));
     2724    QWebHitTestResult result = frame->hitTestContent(linkElement.geometry().center());
    27242725    QCOMPARE(result.linkText(), QString("link text"));
    27252726    QWebElement link = result.linkElement();
Note: See TracChangeset for help on using the changeset viewer.