diff options
author | Pierre Rossi <pierre.rossi@digia.com> | 2014-01-21 15:42:56 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-19 15:48:07 +0100 |
commit | 548c7eb37456c13fa16ca286016434cdcbdcf96a (patch) | |
tree | ca7f3e538fa36206638955f908df6565d67a95d0 /tests/auto/quick/qmltests/data/TestWebEngineView.qml | |
parent | 09910d11219b7b17d6044671f51a769335c4797e (diff) |
QtQuick: add runJavaScript.
Much like the widgets version.
This should be helpful to start testing QWebChannel integration.
Includes a very basic autotest that checks both approaches (with or
without callback) through the view's title property.
Change-Id: Id9c3e3736f36d53cecf1dd52e8811c4b921dcf08
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'tests/auto/quick/qmltests/data/TestWebEngineView.qml')
-rw-r--r-- | tests/auto/quick/qmltests/data/TestWebEngineView.qml | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/quick/qmltests/data/TestWebEngineView.qml b/tests/auto/quick/qmltests/data/TestWebEngineView.qml index 910ecbd7d..44a7f4f83 100644 --- a/tests/auto/quick/qmltests/data/TestWebEngineView.qml +++ b/tests/auto/quick/qmltests/data/TestWebEngineView.qml @@ -42,6 +42,7 @@ import QtQuick 2.0 import QtTest 1.0 import QtWebEngine 1.0 +import QtWebEngine.experimental 1.0 WebEngineView { property var loadStatus: null @@ -78,6 +79,8 @@ WebEngineView { return predicate() } + function runJavaScript(script, callback) { experimental.runJavaScript(script, callback); } + TestResult { id: testResult } onLoadingStateChanged: { |