summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2021-10-06 17:06:14 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2021-12-02 09:18:45 +0100
commit61de0e721f672e854551a8938d2d42ba946398cf (patch)
tree2a36dfb72417701b093cde8b333a434f8fcacd27 /tests/auto
parent5dc3a3fb5e3286a9643fece7c7f94cec7fc29f3e (diff)
Adaptations for Chromium 94
Change-Id: I9fb8998a3a7762b0aea70993ca231f0bbf4f7761 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/core/origins/tst_origins.cpp8
-rw-r--r--tests/auto/quick/qquickwebengineviewgraphics/tst_qquickwebengineviewgraphics.cpp8
-rw-r--r--tests/auto/widgets/accessibility/tst_accessibility.cpp4
-rw-r--r--tests/auto/widgets/qwebenginedownloadrequest/tst_qwebenginedownloadrequest.cpp4
-rw-r--r--tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp3
5 files changed, 18 insertions, 9 deletions
diff --git a/tests/auto/core/origins/tst_origins.cpp b/tests/auto/core/origins/tst_origins.cpp
index 08f9d097f..ac937037f 100644
--- a/tests/auto/core/origins/tst_origins.cpp
+++ b/tests/auto/core/origins/tst_origins.cpp
@@ -932,12 +932,12 @@ void tst_Origins::serviceWorker()
QVERIFY(verifyLoad(QSL("tst:/resources/serviceWorker.html")));
QTRY_VERIFY(eval(QSL("done")).toBool());
QVERIFY(eval(QSL("error")).toString()
- .contains(QSL("Cannot read property 'register' of undefined")));
+ .contains(QSL("Cannot read properties of undefined")));
QVERIFY(verifyLoad(QSL("PathSyntax:/resources/serviceWorker.html")));
QTRY_VERIFY(eval(QSL("done")).toBool());
QVERIFY(eval(QSL("error")).toString()
- .contains(QSL("Cannot read property 'register' of undefined")));
+ .contains(QSL("Cannot read properties of undefined")));
QVERIFY(verifyLoad(QSL("PathSyntax-Secure:/resources/serviceWorker.html")));
QTRY_VERIFY(eval(QSL("done")).toBool());
@@ -947,7 +947,7 @@ void tst_Origins::serviceWorker()
QVERIFY(verifyLoad(QSL("PathSyntax-ServiceWorkersAllowed:/resources/serviceWorker.html")));
QTRY_VERIFY(eval(QSL("done")).toBool());
QVERIFY(eval(QSL("error")).toString()
- .contains(QSL("Cannot read property 'register' of undefined")));
+ .contains(QSL("Cannot read properties of undefined")));
QVERIFY(verifyLoad(QSL("PathSyntax-Secure-ServiceWorkersAllowed:/resources/serviceWorker.html")));
QTRY_VERIFY(eval(QSL("done")).toBool());
@@ -956,7 +956,7 @@ void tst_Origins::serviceWorker()
QVERIFY(verifyLoad(QSL("PathSyntax-NoAccessAllowed:/resources/serviceWorker.html")));
QTRY_VERIFY(eval(QSL("done")).toBool());
QVERIFY(eval(QSL("error")).toString()
- .contains(QSL("Cannot read property 'register' of undefined")));
+ .contains(QSL("Cannot read properties of undefined")));
}
// Support for view-source must be enabled explicitly.
diff --git a/tests/auto/quick/qquickwebengineviewgraphics/tst_qquickwebengineviewgraphics.cpp b/tests/auto/quick/qquickwebengineviewgraphics/tst_qquickwebengineviewgraphics.cpp
index cfd058159..1c6de9a3c 100644
--- a/tests/auto/quick/qquickwebengineviewgraphics/tst_qquickwebengineviewgraphics.cpp
+++ b/tests/auto/quick/qquickwebengineviewgraphics/tst_qquickwebengineviewgraphics.cpp
@@ -97,6 +97,8 @@ static void verifyGreenSquare(QQuickWindow *window)
bool ok = QTest::qWaitFor([&](){
actual = window->grabWindow();
expected = getGreenSquare(actual.format());
+ if (actual.height() > 150)
+ actual = actual.scaledToHeight(150);
return actual == expected;
}, 10000);
if (!ok) {
@@ -109,7 +111,9 @@ static void verifyGreenSquare(QQuickWindow *window)
void tst_QQuickWebEngineViewGraphics::simpleGraphics()
{
setHtml(greenSquare);
+ m_view->show();
verifyGreenSquare(m_view.data());
+ m_view->hide();
}
void tst_QQuickWebEngineViewGraphics::showHideShow()
@@ -125,12 +129,15 @@ void tst_QQuickWebEngineViewGraphics::showHideShow()
m_view->show();
QVERIFY(exposeSpy.wait());
verifyGreenSquare(m_view.data());
+ m_view->hide();
}
void tst_QQuickWebEngineViewGraphics::simpleAcceleratedLayer()
{
+ m_view->show();
setHtml(acLayerGreenSquare);
verifyGreenSquare(m_view.data());
+ m_view->hide();
}
void tst_QQuickWebEngineViewGraphics::reparentToOtherWindow()
@@ -141,6 +148,7 @@ void tst_QQuickWebEngineViewGraphics::reparentToOtherWindow()
window.create();
m_view->rootObject()->setParentItem(window.contentItem());
+ window.show();
verifyGreenSquare(&window);
}
diff --git a/tests/auto/widgets/accessibility/tst_accessibility.cpp b/tests/auto/widgets/accessibility/tst_accessibility.cpp
index 0aabf0f6d..054559f13 100644
--- a/tests/auto/widgets/accessibility/tst_accessibility.cpp
+++ b/tests/auto/widgets/accessibility/tst_accessibility.cpp
@@ -338,7 +338,7 @@ void tst_Accessibility::roles_data()
QTest::newRow("ax::mojom::Role::kAbbr") << QString("<abbr>a</abbr>") << 1 << QAccessible::StaticText;
QTest::newRow("ax::mojom::Role::kAlert") << QString("<div role='alert'>alert</div>") << 0 << QAccessible::AlertMessage;
QTest::newRow("ax::mojom::Role::kAlertDialog") << QString("<div role='alertdialog'>alert</div>") << 0 << QAccessible::AlertMessage;
- QTest::newRow("ax::mojom::Role::kAnchor") << QString("<a id='a'>Chapter a</a>") << 1 << QAccessible::Link;
+ QTest::newRow("ax::mojom::Role::kAnchor") << QString("<a id='a'>Chapter a</a>") << 1 << QAccessible::Section;
QTest::newRow("ax::mojom::Role::kApplication") << QString("<div role='application'>landmark</div>") << 0 << QAccessible::Document;
QTest::newRow("ax::mojom::Role::kArticle") << QString("<article>a</article>") << 0 << QAccessible::Section;
QTest::newRow("ax::mojom::Role::kAudio") << QString("<audio controls><source src='test.mp3' type='audio/mpeg'></audio>") << 1 << QAccessible::Sound;
@@ -484,7 +484,7 @@ void tst_Accessibility::roles_data()
QTest::newRow("ax::mojom::Role::kRowGroup") << QString("<table role=table><tbody role=rowgroup><tr><td>a</td></tr></tbody></table>") << 1 << QAccessible::Section;
QTest::newRow("ax::mojom::Role::kRowHeader") << QString("<table role=table><tr><th>a</td><td>b</td></tr></table>") << 2 << QAccessible::RowHeader;
QTest::newRow("ax::mojom::Role::kRuby") << QString("<ruby>a</ruby>") << 1 << QAccessible::Grouping;
- QTest::newRow("ax::mojom::Role::kRubyAnnotation") << QString("<ruby><rt tabindex=0>a</rt></ruby>") << 2 << QAccessible::StaticText;
+ //QTest::newRow("ax::mojom::Role::kRubyAnnotation") // No mapping to ARIA role (presents as property on enclosing ruby element)
QTest::newRow("ax::mojom::Role::kScrollBar") << QString("<div role='scrollbar'>a</a>") << 0 << QAccessible::ScrollBar;
//QTest::newRow("ax::mojom::Role::kScrollView"); // No mapping to ARIA role
QTest::newRow("ax::mojom::Role::kSearch") << QString("<div role='search'>landmark</div>") << 0 << QAccessible::Section;
diff --git a/tests/auto/widgets/qwebenginedownloadrequest/tst_qwebenginedownloadrequest.cpp b/tests/auto/widgets/qwebenginedownloadrequest/tst_qwebenginedownloadrequest.cpp
index 1f24928ab..3cdf79250 100644
--- a/tests/auto/widgets/qwebenginedownloadrequest/tst_qwebenginedownloadrequest.cpp
+++ b/tests/auto/widgets/qwebenginedownloadrequest/tst_qwebenginedownloadrequest.cpp
@@ -199,8 +199,8 @@ void tst_QWebEngineDownloadRequest::downloadLink_data()
/* anchorHasDownloadAttribute */ << false
/* fileName */ << QByteArrayLiteral("foo.txt")
/* fileContents */ << QByteArrayLiteral("")
- /* fileMimeTypeDeclared */ << QByteArrayLiteral("")
- /* fileMimeTypeDetected */ << QByteArrayLiteral("")
+ /* fileMimeTypeDeclared */ << QByteArrayLiteral("text/plain")
+ /* fileMimeTypeDetected */ << QByteArrayLiteral("text/plain")
/* fileDisposition */ << QByteArrayLiteral("")
/* fileHasReferer */ << true
/* fileAction */ << FileIsDownloaded;
diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
index 8a44af3fb..c86e89b42 100644
--- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
+++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
@@ -929,7 +929,8 @@ void tst_QWebEnginePage::localStorageVisibility()
// ...first check second page (for storage to appear) as applying settings is batched and done asynchronously
QTRY_VERIFY(evaluateJavaScriptSync(&webPage2, QString("(window.localStorage != undefined)")).toBool());
// Switching the feature off does not actively remove the object from webPage1.
- QVERIFY(evaluateJavaScriptSync(&webPage1, QString("(window.localStorage != undefined)")).toBool());
+// FIXME: 94-based: now it does
+// QVERIFY(evaluateJavaScriptSync(&webPage1, QString("(window.localStorage != undefined)")).toBool());
// The object disappears only after reloading.
webPage1.triggerAction(QWebEnginePage::Reload);