summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qmlvisual/webview/javascript/evaluateJavaScript.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qmlvisual/webview/javascript/evaluateJavaScript.qml')
-rw-r--r--tests/auto/declarative/qmlvisual/webview/javascript/evaluateJavaScript.qml33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlvisual/webview/javascript/evaluateJavaScript.qml b/tests/auto/declarative/qmlvisual/webview/javascript/evaluateJavaScript.qml
new file mode 100644
index 00000000..9ea2b64b
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/webview/javascript/evaluateJavaScript.qml
@@ -0,0 +1,33 @@
+import QtQuick 1.0
+import QtWebKit 1.0
+
+Column {
+ property string skip: "WebView tests not counting until resources allocated to WebView maintenance"
+ WebView {
+ id: webview
+ width: 200
+ height: 200
+ url: "test-objects.html"
+ javaScriptWindowObjects:
+ QtObject {
+ property string text: btntext.text
+ WebView.windowObjectName: "qmltext"
+ onTextChanged: {
+ webview.evaluateJavaScript("{document.getElementById('button').value=window.qmltext.text}")
+ }
+ }
+ }
+ Row {
+ Text { text: "Input:" }
+ Rectangle {
+ width: btntext.width+10
+ height: btntext.height+10
+ border.color: "black"
+ TextInput {
+ id: btntext
+ text: "Blah"
+ cursorDelegate: Rectangle { width: 1; color: "red" }
+ }
+ }
+ }
+}