summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/qwebenginepage
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2016-08-23 13:32:55 +0200
committerPeter Varga <pvarga@inf.u-szeged.hu>2016-09-23 05:34:16 +0000
commitdd7917e0203a9144719214c5a5d36fcd7a0b6f93 (patch)
tree1ab6c2d6d4ef0d43e663e30bc59cc3b538456030 /tests/auto/widgets/qwebenginepage
parenta4dcc5b4894aac423f65fcf9a13394078ee72257 (diff)
Add support of colored underline and background to InputMethodEvent
Moreover, unskip and update inputMethodsTextFormat widget auto test and move it to the tst_QWebEngineView tests. New manual test has been also added for testing input methods format. Task-number: QTBUG-55766 Change-Id: I4c71e15cb426925f76c770266a3c20f1cc12b687 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'tests/auto/widgets/qwebenginepage')
-rw-r--r--tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp57
1 files changed, 0 insertions, 57 deletions
diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
index 88b7596d9..2d56d3521 100644
--- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
+++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
@@ -155,8 +155,6 @@ private Q_SLOTS:
void consoleOutput();
void inputMethods_data();
void inputMethods();
- void inputMethodsTextFormat_data();
- void inputMethodsTextFormat();
void errorPageExtension();
void errorPageExtensionLoadFinished();
void userAgentNewlineStripping();
@@ -2405,61 +2403,6 @@ void tst_QWebEnginePage::inputMethods()
#endif
}
-void tst_QWebEnginePage::inputMethodsTextFormat_data()
-{
- QTest::addColumn<QString>("string");
- QTest::addColumn<int>("start");
- QTest::addColumn<int>("length");
-
- QTest::newRow("") << QString("") << 0 << 0;
- QTest::newRow("Q") << QString("Q") << 0 << 1;
- QTest::newRow("Qt") << QString("Qt") << 0 << 1;
- QTest::newRow("Qt") << QString("Qt") << 0 << 2;
- QTest::newRow("Qt") << QString("Qt") << 1 << 1;
- QTest::newRow("Qt ") << QString("Qt ") << 0 << 1;
- QTest::newRow("Qt ") << QString("Qt ") << 1 << 1;
- QTest::newRow("Qt ") << QString("Qt ") << 2 << 1;
- QTest::newRow("Qt ") << QString("Qt ") << 2 << -1;
- QTest::newRow("Qt ") << QString("Qt ") << -2 << 3;
- QTest::newRow("Qt ") << QString("Qt ") << 0 << 3;
- QTest::newRow("Qt by") << QString("Qt by") << 0 << 1;
- QTest::newRow("Qt by Nokia") << QString("Qt by Nokia") << 0 << 1;
-}
-
-
-void tst_QWebEnginePage::inputMethodsTextFormat()
-{
-#if !defined(QINPUTMETHODEVENT_TEXTFORMAT)
- QSKIP("QINPUTMETHODEVENT_TEXTFORMAT");
-#else
- QWebEnginePage* page = new QWebEnginePage;
- QWebEngineView* view = new QWebEngineView;
- view->setPage(page);
- page->settings()->setFontFamily(QWebEngineSettings::SerifFont, "FooSerifFont");
- page->setHtml("<html><body>" \
- "<input type='text' id='input1' style='font-family: serif' value='' maxlength='20'/>");
- evaluateJavaScriptSync(page, "document.getElementById('input1').focus()");
- page->mainFrame()->setFocus();
- view->show();
-
- QFETCH(QString, string);
- QFETCH(int, start);
- QFETCH(int, length);
-
- QList<QInputMethodEvent::Attribute> attrs;
- QTextCharFormat format;
- format.setUnderlineStyle(QTextCharFormat::SingleUnderline);
- format.setUnderlineColor(Qt::red);
- attrs.append(QInputMethodEvent::Attribute(QInputMethodEvent::TextFormat, start, length, format));
- QInputMethodEvent im(string, attrs);
- page->event(&im);
-
- QTest::qWait(1000);
-
- delete view;
-#endif
-}
-
void tst_QWebEnginePage::protectBindingsRuntimeObjectsFromCollector()
{
#if !defined(QWEBENGINEPAGE_CREATEPLUGIN)