diff options
Diffstat (limited to 'tests/auto/qtextbrowser')
-rw-r--r-- | tests/auto/qtextbrowser/qtextbrowser.pro | 4 | ||||
-rw-r--r-- | tests/auto/qtextbrowser/tst_qtextbrowser.cpp | 13 |
2 files changed, 15 insertions, 2 deletions
diff --git a/tests/auto/qtextbrowser/qtextbrowser.pro b/tests/auto/qtextbrowser/qtextbrowser.pro index 6da3bfb..e159a3c 100644 --- a/tests/auto/qtextbrowser/qtextbrowser.pro +++ b/tests/auto/qtextbrowser/qtextbrowser.pro @@ -1,11 +1,11 @@ load(qttest_p4) SOURCES += tst_qtextbrowser.cpp -DEFINES += SRCDIR=\\\"$$PWD\\\" +!symbian*:DEFINES += SRCDIR=\\\"$$PWD\\\" contains(QT_CONFIG, qt3support): QT += qt3support -wince*: { +wince*|symbian*: { addFiles.sources = *.html addFiles.path = . addDir.sources = subdir/* diff --git a/tests/auto/qtextbrowser/tst_qtextbrowser.cpp b/tests/auto/qtextbrowser/tst_qtextbrowser.cpp index 2e51b70..0311900 100644 --- a/tests/auto/qtextbrowser/tst_qtextbrowser.cpp +++ b/tests/auto/qtextbrowser/tst_qtextbrowser.cpp @@ -52,6 +52,10 @@ //TESTED_CLASS= //TESTED_FILES= +#if defined(Q_OS_SYMBIAN) +# define SRCDIR "" +#endif + class TestBrowser : public QTextBrowser { public: @@ -545,6 +549,9 @@ void tst_QTextBrowser::focusIndicator() QVERIFY(browser->textCursor().hasSelection()); QCOMPARE(browser->textCursor().selectedText(), QString("Link to second page")); +#ifdef QT_KEYPAD_NAVIGATION + browser->setEditFocus(true); +#endif QTest::keyClick(browser, Qt::Key_Enter); QVERIFY(!browser->textCursor().hasSelection()); @@ -594,6 +601,9 @@ void tst_QTextBrowser::focusHistory() QVERIFY(browser->textCursor().hasSelection()); QCOMPARE(browser->textCursor().selectedText(), QString("Link to second page")); +#ifdef QT_KEYPAD_NAVIGATION + browser->setEditFocus(true); +#endif QTest::keyClick(browser, Qt::Key_Enter); QVERIFY(!browser->textCursor().hasSelection()); @@ -650,6 +660,9 @@ void tst_QTextBrowser::urlEncoding() QSignalSpy spy(browser, SIGNAL(anchorClicked(const QUrl &))); +#ifdef QT_KEYPAD_NAVIGATION + browser->setEditFocus(true); +#endif QTest::keyClick(browser, Qt::Key_Enter); QCOMPARE(spy.count(), 1); |