summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-02-04 13:42:56 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-12 17:14:05 +0100
commit69b0d51b14f93ee4f98baab4ebb1564d67d66402 (patch)
tree26e9f63864575e45129e5c693a44c6e26d389559
parentabaa3cd246375df0573d5d2e3d5c1ea0b4be613f (diff)
Adjust some widget auto test expectations
More need to be adjusted, but this is a first step. Also move the QSKIP form tst_QWebEngineFrame::loadInSignalHandlers to its _data method to avoid seeing the skip message for every entry. Change-Id: If8d17fd992cb12a4a35cf036f80431e0cab3bb2f Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
-rw-r--r--tests/auto/widgets/qwebengineframe/tst_qwebengineframe.cpp12
-rw-r--r--tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp4
2 files changed, 15 insertions, 1 deletions
diff --git a/tests/auto/widgets/qwebengineframe/tst_qwebengineframe.cpp b/tests/auto/widgets/qwebengineframe/tst_qwebengineframe.cpp
index e017fc66a..52e422cb9 100644
--- a/tests/auto/widgets/qwebengineframe/tst_qwebengineframe.cpp
+++ b/tests/auto/widgets/qwebengineframe/tst_qwebengineframe.cpp
@@ -1292,6 +1292,7 @@ void tst_QWebEngineFrame::setUrlToEmpty()
QTRY_COMPARE(spy.count(), expectedLoadFinishedCount);
QCOMPARE(page.url(), aboutBlank);
+ QEXPECT_FAIL("", "Slight change: This information now comes from Chromium and the behavior of requestedUrl changed in this case.", Continue);
QCOMPARE(page.requestedUrl(), QUrl());
QCOMPARE(baseUrlSync(&page), aboutBlank);
@@ -1310,12 +1311,16 @@ void tst_QWebEngineFrame::setUrlToEmpty()
QTRY_COMPARE(spy.count(), expectedLoadFinishedCount);
QCOMPARE(page.url(), aboutBlank);
+ QEXPECT_FAIL("", "Slight change: This information now comes from Chromium and the behavior of requestedUrl changed in this case.", Continue);
QCOMPARE(page.requestedUrl(), QUrl());
QCOMPARE(baseUrlSync(&page), aboutBlank);
}
void tst_QWebEngineFrame::setUrlToInvalid()
{
+ QEXPECT_FAIL("", "Unsupported: QtWebEngine doesn't adjust invalid URLs.", Abort);
+ QVERIFY(false);
+
QWebEnginePage page;
const QUrl invalidUrl("http:/example.com");
@@ -1354,6 +1359,7 @@ void tst_QWebEngineFrame::setUrlHistory()
m_page->setUrl(QUrl());
expectedLoadFinishedCount++;
QTRY_COMPARE(spy.count(), expectedLoadFinishedCount);
+ QEXPECT_FAIL("", "Slight change: QUrl() isn't replaced by about:blank.", Continue);
QCOMPARE(m_page->url(), aboutBlank);
QCOMPARE(m_page->requestedUrl(), QUrl());
QCOMPARE(m_page->history()->count(), 0);
@@ -1378,6 +1384,7 @@ void tst_QWebEngineFrame::setUrlHistory()
expectedLoadFinishedCount++;
QTRY_COMPARE(spy.count(), expectedLoadFinishedCount);
QCOMPARE(m_page->url(), aboutBlank);
+ QEXPECT_FAIL("", "Slight change: This information now comes from Chromium and the behavior of requestedUrl changed in this case.", Continue);
QCOMPARE(m_page->requestedUrl(), QUrl());
QCOMPARE(m_page->history()->count(), 1);
@@ -1523,6 +1530,7 @@ void tst_QWebEngineFrame::setUrlThenLoads()
// Just after first load. URL didn't changed yet.
m_page->load(urlToLoad1);
QTRY_COMPARE(startedSpy.count(), 2);
+ QEXPECT_FAIL("", "Slight change: url() will return the loaded URL immediately.", Continue);
QCOMPARE(m_page->url(), url);
QCOMPARE(m_page->requestedUrl(), urlToLoad1);
// baseUrlSync spins an event loop and this sometimes return the next result.
@@ -1539,6 +1547,7 @@ void tst_QWebEngineFrame::setUrlThenLoads()
// Just after second load. URL didn't changed yet.
m_page->load(urlToLoad2);
QTRY_COMPARE(startedSpy.count(), 3);
+ QEXPECT_FAIL("", "Slight change: url() will return the loaded URL immediately.", Continue);
QCOMPARE(m_page->url(), urlToLoad1);
QCOMPARE(m_page->requestedUrl(), urlToLoad2);
QCOMPARE(baseUrlSync(m_page), extractBaseUrl(urlToLoad1));
@@ -1626,6 +1635,8 @@ void URLSetter::execute()
void tst_QWebEngineFrame::loadInSignalHandlers_data()
{
+ QSKIP("FIXME: This crashes in content::WebContentsImpl::NavigateToEntry because of reentrancy. Should we require QueuedConnections or do it ourselves to support this?");
+
QTest::addColumn<URLSetter::Type>("type");
QTest::addColumn<URLSetter::Signal>("signal");
QTest::addColumn<QUrl>("url");
@@ -1650,7 +1661,6 @@ void tst_QWebEngineFrame::loadInSignalHandlers_data()
void tst_QWebEngineFrame::loadInSignalHandlers()
{
- QSKIP("This crashes in content::WebContentsImpl::NavigateToEntry because of reentrancy. Should we require QueuedConnections or do it ourselves to support this?");
QFETCH(URLSetter::Type, type);
QFETCH(URLSetter::Signal, signal);
QFETCH(QUrl, url);
diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
index 8a4e9d3e4..a76e4a2ec 100644
--- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
+++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
@@ -2747,6 +2747,9 @@ public:
void tst_QWebEnginePage::errorPageExtension()
{
+#if !defined(QWEBENGINEPAGE_ERRORPAGEEXTENSION)
+ QSKIP("QWEBENGINEPAGE_ERRORPAGEEXTENSION");
+#else
ErrorPage page;
m_view->setPage(&page);
@@ -2777,6 +2780,7 @@ void tst_QWebEnginePage::errorPageExtension()
QTRY_COMPARE(page.history()->currentItem().url(), QUrl("data:text/html,foo"));
m_view->setPage(0);
+#endif
}
void tst_QWebEnginePage::errorPageExtensionInIFrames()