diff options
author | Peter Varga <pvarga@inf.u-szeged.hu> | 2014-10-22 12:34:17 +0200 |
---|---|---|
committer | Peter Varga <pvarga@inf.u-szeged.hu> | 2014-10-28 15:45:01 +0100 |
commit | 2282c6605bc554ca610239f3dbc4d6d067c25763 (patch) | |
tree | 224ae4fd2b99f93f47e533baf8be64c3c959831a /tests | |
parent | 7356189d9680f1697f219173b771298238567d15 (diff) |
Make url handling consistent in widget and quick API
Use explicit url in quick API too and use GetLastCommittedURL instead of
GetVisibleURL for getting the expected urls in tests.
Change-Id: If3251323645979643f3dc0e16491fe35b584f51c
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/quick/qmltests/data/tst_loadUrl.qml | 4 | ||||
-rw-r--r-- | tests/auto/widgets/qwebengineframe/tst_qwebengineframe.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/quick/qmltests/data/tst_loadUrl.qml b/tests/auto/quick/qmltests/data/tst_loadUrl.qml index 41faa6bc3..5f51e9036 100644 --- a/tests/auto/quick/qmltests/data/tst_loadUrl.qml +++ b/tests/auto/quick/qmltests/data/tst_loadUrl.qml @@ -125,7 +125,9 @@ TestWebEngineView { var handleLoadFailed = function(loadRequest) { if (loadRequest.status == WebEngineView.LoadFailedStatus) { webEngineView.loadHtml("load failed", bogusSite) - compare(webEngineView.url, bogusSite) + // Since the load did not succeed the active url is the + // url of the previous successful load. + compare(webEngineView.url, "about:blank") compare(loadRequest.url, bogusSite) } } diff --git a/tests/auto/widgets/qwebengineframe/tst_qwebengineframe.cpp b/tests/auto/widgets/qwebengineframe/tst_qwebengineframe.cpp index 1a8745f25..9901bcd76 100644 --- a/tests/auto/widgets/qwebengineframe/tst_qwebengineframe.cpp +++ b/tests/auto/widgets/qwebengineframe/tst_qwebengineframe.cpp @@ -1549,7 +1549,6 @@ void tst_QWebEngineFrame::setUrlThenLoads() // Just after first load. URL didn't changed yet. m_page->load(urlToLoad1); - 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. @@ -1566,7 +1565,6 @@ void tst_QWebEngineFrame::setUrlThenLoads() // Just after second load. URL didn't changed yet. m_page->load(urlToLoad2); - 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)); |