summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/qt/tests/qdeclarativewebview/resources
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/qt/tests/qdeclarativewebview/resources')
-rw-r--r--Source/WebKit/qt/tests/qdeclarativewebview/resources/basic.html17
-rw-r--r--Source/WebKit/qt/tests/qdeclarativewebview/resources/basic.pngbin0 -> 3961 bytes
-rw-r--r--Source/WebKit/qt/tests/qdeclarativewebview/resources/basic.qml5
-rw-r--r--Source/WebKit/qt/tests/qdeclarativewebview/resources/elements.html14
-rw-r--r--Source/WebKit/qt/tests/qdeclarativewebview/resources/elements.qml7
-rw-r--r--Source/WebKit/qt/tests/qdeclarativewebview/resources/forward.html12
-rw-r--r--Source/WebKit/qt/tests/qdeclarativewebview/resources/forward.pngbin0 -> 2377 bytes
-rw-r--r--Source/WebKit/qt/tests/qdeclarativewebview/resources/javaScript.html11
-rw-r--r--Source/WebKit/qt/tests/qdeclarativewebview/resources/javaScript.qml12
-rw-r--r--Source/WebKit/qt/tests/qdeclarativewebview/resources/loadError.qml5
-rw-r--r--Source/WebKit/qt/tests/qdeclarativewebview/resources/newwindows.html16
-rw-r--r--Source/WebKit/qt/tests/qdeclarativewebview/resources/newwindows.qml34
-rw-r--r--Source/WebKit/qt/tests/qdeclarativewebview/resources/propertychanges.qml34
-rw-r--r--Source/WebKit/qt/tests/qdeclarativewebview/resources/sethtml.qml5
14 files changed, 172 insertions, 0 deletions
diff --git a/Source/WebKit/qt/tests/qdeclarativewebview/resources/basic.html b/Source/WebKit/qt/tests/qdeclarativewebview/resources/basic.html
new file mode 100644
index 0000000..22e3e24
--- /dev/null
+++ b/Source/WebKit/qt/tests/qdeclarativewebview/resources/basic.html
@@ -0,0 +1,17 @@
+<html>
+<head><title>Basic</title>
+<link rel="icon" sizes="48x48" href="basic.png">
+<script type="text/javascript">
+<!--
+window.onload = function(){ window.status = "status here"; }
+// -->
+</script>
+</head>
+<body leftmargin="0" marginwidth="0">
+<table width="123">
+<tbody>
+<tr><td>This is a basic test.</td></tr>
+</tbody>
+</table>
+</body>
+</html>
diff --git a/Source/WebKit/qt/tests/qdeclarativewebview/resources/basic.png b/Source/WebKit/qt/tests/qdeclarativewebview/resources/basic.png
new file mode 100644
index 0000000..35717cc
--- /dev/null
+++ b/Source/WebKit/qt/tests/qdeclarativewebview/resources/basic.png
Binary files differ
diff --git a/Source/WebKit/qt/tests/qdeclarativewebview/resources/basic.qml b/Source/WebKit/qt/tests/qdeclarativewebview/resources/basic.qml
new file mode 100644
index 0000000..b5208d0
--- /dev/null
+++ b/Source/WebKit/qt/tests/qdeclarativewebview/resources/basic.qml
@@ -0,0 +1,5 @@
+import QtWebKit 1.0
+
+WebView {
+ url: "basic.html"
+}
diff --git a/Source/WebKit/qt/tests/qdeclarativewebview/resources/elements.html b/Source/WebKit/qt/tests/qdeclarativewebview/resources/elements.html
new file mode 100644
index 0000000..9236867
--- /dev/null
+++ b/Source/WebKit/qt/tests/qdeclarativewebview/resources/elements.html
@@ -0,0 +1,14 @@
+<body leftmargin=0 topmargin=0>
+<table width="300px" border=1 cellpadding=0 cellspacing=0>
+<tr>
+<td align=center width=25%%><p>A</p></td>
+<td width=75% height=50px>
+ <table width=100% border=1 cellpadding=0 cellspacing=0>
+ <tr>
+ <td align=center width=50% height=50px><p>B</p></td>
+ <td align=center width=50% height=50px><p>C</p></td>
+ </tr>
+ </table>
+</td>
+</tr>
+</table>
diff --git a/Source/WebKit/qt/tests/qdeclarativewebview/resources/elements.qml b/Source/WebKit/qt/tests/qdeclarativewebview/resources/elements.qml
new file mode 100644
index 0000000..8fef8c9
--- /dev/null
+++ b/Source/WebKit/qt/tests/qdeclarativewebview/resources/elements.qml
@@ -0,0 +1,7 @@
+import QtWebKit 1.0
+
+WebView {
+ url: "elements.html"
+ width: 310
+ height: 100
+}
diff --git a/Source/WebKit/qt/tests/qdeclarativewebview/resources/forward.html b/Source/WebKit/qt/tests/qdeclarativewebview/resources/forward.html
new file mode 100644
index 0000000..62ab62d
--- /dev/null
+++ b/Source/WebKit/qt/tests/qdeclarativewebview/resources/forward.html
@@ -0,0 +1,12 @@
+<html>
+<head><title>Forward</title>
+<link rel="icon" sizes="32x32" href="forward.png">
+</head>
+<body leftmargin="0" marginwidth="0">
+<table width="123">
+<tbody>
+<tr><td>This is more.</td></tr>
+</tbody>
+</table>
+</body>
+</html>
diff --git a/Source/WebKit/qt/tests/qdeclarativewebview/resources/forward.png b/Source/WebKit/qt/tests/qdeclarativewebview/resources/forward.png
new file mode 100644
index 0000000..a82533e
--- /dev/null
+++ b/Source/WebKit/qt/tests/qdeclarativewebview/resources/forward.png
Binary files differ
diff --git a/Source/WebKit/qt/tests/qdeclarativewebview/resources/javaScript.html b/Source/WebKit/qt/tests/qdeclarativewebview/resources/javaScript.html
new file mode 100644
index 0000000..35270bc
--- /dev/null
+++ b/Source/WebKit/qt/tests/qdeclarativewebview/resources/javaScript.html
@@ -0,0 +1,11 @@
+<html>
+<head><title>JavaScript</title>
+<link rel="icon" sizes="48x48" href="basic.png">
+<script type="text/javascript">
+<!--
+window.onload = function(){ window.status = "status here"; }
+// -->
+</script>
+</head>
+<body>
+This is a JS test.
diff --git a/Source/WebKit/qt/tests/qdeclarativewebview/resources/javaScript.qml b/Source/WebKit/qt/tests/qdeclarativewebview/resources/javaScript.qml
new file mode 100644
index 0000000..527e3b9
--- /dev/null
+++ b/Source/WebKit/qt/tests/qdeclarativewebview/resources/javaScript.qml
@@ -0,0 +1,12 @@
+import QtQuick 1.0
+import QtWebKit 1.0
+
+WebView {
+ url: "javaScript.html"
+ javaScriptWindowObjects: [
+ QtObject {
+ property string qmlprop: "qmlvalue"
+ WebView.windowObjectName: "myjsname"
+ }
+ ]
+}
diff --git a/Source/WebKit/qt/tests/qdeclarativewebview/resources/loadError.qml b/Source/WebKit/qt/tests/qdeclarativewebview/resources/loadError.qml
new file mode 100644
index 0000000..26cec8f
--- /dev/null
+++ b/Source/WebKit/qt/tests/qdeclarativewebview/resources/loadError.qml
@@ -0,0 +1,5 @@
+import QtWebKit 1.0
+
+WebView {
+ url: "does-not-exist.html"
+}
diff --git a/Source/WebKit/qt/tests/qdeclarativewebview/resources/newwindows.html b/Source/WebKit/qt/tests/qdeclarativewebview/resources/newwindows.html
new file mode 100644
index 0000000..dd541f9
--- /dev/null
+++ b/Source/WebKit/qt/tests/qdeclarativewebview/resources/newwindows.html
@@ -0,0 +1,16 @@
+<html>
+<head>
+<script type="text/javascript">
+<!--
+function clickTheLink()
+{
+ var ev = document.createEvent('MouseEvents');
+ ev.initEvent( "click", true, false );
+ document.getElementById('thelink').dispatchEvent(ev);
+}
+// -->
+</script>
+</head>
+<h1>Multiple windows...</h1>
+
+<a id=thelink target="_blank" href="newwindows.html">Popup!</a>
diff --git a/Source/WebKit/qt/tests/qdeclarativewebview/resources/newwindows.qml b/Source/WebKit/qt/tests/qdeclarativewebview/resources/newwindows.qml
new file mode 100644
index 0000000..e66631d
--- /dev/null
+++ b/Source/WebKit/qt/tests/qdeclarativewebview/resources/newwindows.qml
@@ -0,0 +1,34 @@
+// Demonstrates opening new WebViews from HTML
+
+import QtQuick 1.0
+import QtWebKit 1.0
+
+Grid {
+ columns: 3
+ id: pages
+ height: 300; width: 600
+ property int total: 0
+
+ Component {
+ id: webViewPage
+ Rectangle {
+ width: webView.width
+ height: webView.height
+ border.color: "gray"
+
+ WebView {
+ id: webView
+ width: 150 // force predictable for test
+ newWindowComponent: webViewPage
+ newWindowParent: pages
+ url: "newwindows.html"
+ Timer {
+ interval: 10; running: total<4; repeat: false;
+ onTriggered: { if (webView.status==WebView.Ready) { total++; webView.evaluateJavaScript("clickTheLink()") } }
+ }
+ }
+ }
+ }
+
+ Loader { sourceComponent: webViewPage }
+}
diff --git a/Source/WebKit/qt/tests/qdeclarativewebview/resources/propertychanges.qml b/Source/WebKit/qt/tests/qdeclarativewebview/resources/propertychanges.qml
new file mode 100644
index 0000000..db06887
--- /dev/null
+++ b/Source/WebKit/qt/tests/qdeclarativewebview/resources/propertychanges.qml
@@ -0,0 +1,34 @@
+import QtQuick 1.0
+import QtWebKit 1.0
+
+Item {
+ width: 240
+ height: 160
+ Grid {
+ anchors.fill: parent
+ objectName: "newWindowParent"
+ id: newWindowParent
+ }
+
+ Row {
+ anchors.fill: parent
+ id: oldWindowParent
+ objectName: "oldWindowParent"
+ }
+
+ Loader {
+ sourceComponent: webViewComponent
+ }
+ Component {
+ id: webViewComponent
+ WebView {
+ id: webView
+ objectName: "webView"
+ newWindowComponent: webViewComponent
+ newWindowParent: oldWindowParent
+ url: "basic.html"
+ renderingEnabled: true
+ pressGrabTime: 200
+ }
+ }
+}
diff --git a/Source/WebKit/qt/tests/qdeclarativewebview/resources/sethtml.qml b/Source/WebKit/qt/tests/qdeclarativewebview/resources/sethtml.qml
new file mode 100644
index 0000000..5bff442
--- /dev/null
+++ b/Source/WebKit/qt/tests/qdeclarativewebview/resources/sethtml.qml
@@ -0,0 +1,5 @@
+import QtWebKit 1.0
+
+WebView {
+ html: "<p>This is a <b>string</b> set on the WebView"
+}