Changeset 134235 in webkit


Ignore:
Timestamp:
Nov 12, 2012 7:26:34 AM (11 years ago)
Author:
jocelyn.turcotte@digia.com
Message:

[Qt] Fix tst_QWebPage::inputMethods

Reviewed by Simon Hausmann.

Details of the failure:
FAIL! : tst_QWebPage::inputMethods(QWebView) Compared values are not the same

Actual (page->settings()->fontFamily(QWebSettings::SerifFont)): FooSerifFont
Expected (font.family()): Helvetica
Loc: [Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp(1691)]

The issue was that WebCore wouldn't find FooSerifFont and would have
RenderStyle::font() return the fallback font it used instead.

  • tests/qwebpage/tst_qwebpage.cpp:

(tst_QWebPage::inputMethods):

Location:
trunk/Source/WebKit/qt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/qt/ChangeLog

    r134234 r134235  
     12012-11-08  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
     2
     3        [Qt] Fix tst_QWebPage::inputMethods
     4
     5        Reviewed by Simon Hausmann.
     6
     7        Details of the failure:
     8        FAIL!  : tst_QWebPage::inputMethods(QWebView) Compared values are not the same
     9           Actual (page->settings()->fontFamily(QWebSettings::SerifFont)): FooSerifFont
     10           Expected (font.family()): Helvetica
     11           Loc: [Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp(1691)]
     12
     13        The issue was that WebCore wouldn't find FooSerifFont and would have
     14        RenderStyle::font() return the fallback font it used instead.
     15
     16        * tests/qwebpage/tst_qwebpage.cpp:
     17        (tst_QWebPage::inputMethods):
     18
    1192012-11-09  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
    220
  • trunk/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp

    r134234 r134235  
    16571657        QVERIFY2(false, "Unknown view type");
    16581658
    1659     page->settings()->setFontFamily(QWebSettings::SerifFont, "FooSerifFont");
     1659    page->settings()->setFontFamily(QWebSettings::SerifFont, page->settings()->fontFamily(QWebSettings::FixedFont));
    16601660    page->mainFrame()->setHtml("<html><body>" \
    16611661                                            "<input type='text' id='input1' style='font-family: serif' value='' maxlength='20'/><br>" \
     
    17011701    QVERIFY(inputs.at(0).geometry().contains(variant.toRect().topLeft()));
    17021702
    1703     //ImFont
     1703    // We assigned the serif font famility to be the same as the fixef font family.
     1704    // Then test ImFont on a serif styled element, we should get our fixef font family.
    17041705    variant = page->inputMethodQuery(Qt::ImFont);
    17051706    QFont font = variant.value<QFont>();
    1706     QCOMPARE(page->settings()->fontFamily(QWebSettings::SerifFont), font.family());
     1707    QCOMPARE(page->settings()->fontFamily(QWebSettings::FixedFont), font.family());
    17071708
    17081709    QList<QInputMethodEvent::Attribute> inputAttributes;
Note: See TracChangeset for help on using the changeset viewer.