diff options
author | Valentin Fokin <fokinv@inf.u-szeged.hu> | 2018-05-30 14:46:15 +0200 |
---|---|---|
committer | Peter Varga <pvarga@inf.u-szeged.hu> | 2018-08-02 14:17:17 +0000 |
commit | 1481e8d87fe89d9e27d9de593767b55a0e84a31f (patch) | |
tree | 7ff04c22c4c880ec8d0951255772ce8b2c49bf3a /tests/auto/quick/qmltests/data/tst_viewSource.qml | |
parent | 6a5f8d69fc1d090326fa92a0b24bd494369c2d0d (diff) |
Introduce WebEngineAction in Quick API
Also implement QQuickWebEngineView::action() method similar to the Widget API
to access the WebEngineActions.
[ChangeLog][QtWebEngine] Introduce WebEngineAction in Quick API
Task-number: QTBUG-56117
Change-Id: I758cd4703db4c111c1ed9187e091d4c845486c46
Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
Diffstat (limited to 'tests/auto/quick/qmltests/data/tst_viewSource.qml')
-rw-r--r-- | tests/auto/quick/qmltests/data/tst_viewSource.qml | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/auto/quick/qmltests/data/tst_viewSource.qml b/tests/auto/quick/qmltests/data/tst_viewSource.qml index b21d72eb2..4966a052a 100644 --- a/tests/auto/quick/qmltests/data/tst_viewSource.qml +++ b/tests/auto/quick/qmltests/data/tst_viewSource.qml @@ -77,8 +77,7 @@ TestWebEngineView { webEngineView.url = Qt.resolvedUrl("test1.html"); verify(webEngineView.waitForLoadSucceeded()); tryCompare(webEngineView, "title", "Test page 1"); - // FIXME(pvarga): Reintroduce this check in the fix for QTBUG-56117 - //verify(webEngineView.canViewSource, true); + verify(webEngineView.action(WebEngineView.ViewSource).enabled); titleChangedSpy.clear(); webEngineView.triggerWebAction(WebEngineView.ViewSource); @@ -89,8 +88,7 @@ TestWebEngineView { compare(viewRequest.destination, WebEngineView.NewViewInTab); verify(viewRequest.userInitiated); - // FIXME(pvarga): Reintroduce this check in the fix for QTBUG-56117 - //verify(!webEngineView.canViewSource); + verify(!webEngineView.action(WebEngineView.ViewSource).enabled); tryCompare(webEngineView, "title", "test1.html"); compare(webEngineView.url, "view-source:" + Qt.resolvedUrl("test1.html")); @@ -123,8 +121,7 @@ TestWebEngineView { compare(webEngineView.url, row.url); tryCompare(webEngineView, "title", row.title); - // FIXME(pvarga): Reintroduce this check in the fix for QTBUG-56117 - //verify(!webEngineView.canViewSource); + verify(!webEngineView.action(WebEngineView.ViewSource).enabled); } function test_viewSourceCredentials() { |