aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qsgtext/data
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qsgtext/data')
-rw-r--r--tests/auto/declarative/qsgtext/data/alignments.qml41
-rw-r--r--tests/auto/declarative/qsgtext/data/alignments_cb.pngbin0 -> 496 bytes
-rw-r--r--tests/auto/declarative/qsgtext/data/alignments_cc.pngbin0 -> 556 bytes
-rw-r--r--tests/auto/declarative/qsgtext/data/alignments_ct.pngbin0 -> 533 bytes
-rw-r--r--tests/auto/declarative/qsgtext/data/alignments_lb.pngbin0 -> 496 bytes
-rw-r--r--tests/auto/declarative/qsgtext/data/alignments_lc.pngbin0 -> 535 bytes
-rw-r--r--tests/auto/declarative/qsgtext/data/alignments_lt.pngbin0 -> 514 bytes
-rw-r--r--tests/auto/declarative/qsgtext/data/alignments_rb.pngbin0 -> 505 bytes
-rw-r--r--tests/auto/declarative/qsgtext/data/alignments_rc.pngbin0 -> 559 bytes
-rw-r--r--tests/auto/declarative/qsgtext/data/alignments_rt.pngbin0 -> 539 bytes
-rw-r--r--tests/auto/declarative/qsgtext/data/embeddedImagesLocal.qml5
-rw-r--r--tests/auto/declarative/qsgtext/data/embeddedImagesLocalError.qml5
-rw-r--r--tests/auto/declarative/qsgtext/data/embeddedImagesRemote.qml5
-rw-r--r--tests/auto/declarative/qsgtext/data/embeddedImagesRemoteError.qml5
-rw-r--r--tests/auto/declarative/qsgtext/data/horizontalAlignment_RightToLeft.qml23
-rw-r--r--tests/auto/declarative/qsgtext/data/http/exists.pngbin0 -> 2738 bytes
-rw-r--r--tests/auto/declarative/qsgtext/data/lineCount.qml15
-rw-r--r--tests/auto/declarative/qsgtext/data/lineHeight.qml15
-rw-r--r--tests/auto/declarative/qsgtext/data/qtbug_14734.qml10
-rw-r--r--tests/auto/declarative/qsgtext/data/rotated.qml18
20 files changed, 142 insertions, 0 deletions
diff --git a/tests/auto/declarative/qsgtext/data/alignments.qml b/tests/auto/declarative/qsgtext/data/alignments.qml
new file mode 100644
index 0000000000..9798d9c736
--- /dev/null
+++ b/tests/auto/declarative/qsgtext/data/alignments.qml
@@ -0,0 +1,41 @@
+import QtQuick 2.0
+
+Rectangle {
+ id: top
+ width: 70; height: 70;
+
+ property alias horizontalAlignment: t.horizontalAlignment
+ property alias verticalAlignment: t.verticalAlignment
+ property alias wrapMode: t.wrapMode
+ property alias running: timer.running
+ property string txt: "Test"
+
+ Rectangle {
+ anchors.centerIn: parent
+ width: 40
+ height: 40
+ color: "green"
+
+ Text {
+ id: t
+
+ anchors.fill: parent
+ horizontalAlignment: Text.AlignRight
+ verticalAlignment: Text.AlignBottom
+ wrapMode: Text.WordWrap
+ text: top.txt
+ }
+ Timer {
+ id: timer
+
+ interval: 1
+ running: true
+ repeat: true
+ onTriggered: {
+ top.txt = top.txt + "<br>more " + top.txt.length;
+ if (top.txt.length > 50)
+ running = false
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/qsgtext/data/alignments_cb.png b/tests/auto/declarative/qsgtext/data/alignments_cb.png
new file mode 100644
index 0000000000..cf6199a418
--- /dev/null
+++ b/tests/auto/declarative/qsgtext/data/alignments_cb.png
Binary files differ
diff --git a/tests/auto/declarative/qsgtext/data/alignments_cc.png b/tests/auto/declarative/qsgtext/data/alignments_cc.png
new file mode 100644
index 0000000000..f81ccb4238
--- /dev/null
+++ b/tests/auto/declarative/qsgtext/data/alignments_cc.png
Binary files differ
diff --git a/tests/auto/declarative/qsgtext/data/alignments_ct.png b/tests/auto/declarative/qsgtext/data/alignments_ct.png
new file mode 100644
index 0000000000..9ba64125d5
--- /dev/null
+++ b/tests/auto/declarative/qsgtext/data/alignments_ct.png
Binary files differ
diff --git a/tests/auto/declarative/qsgtext/data/alignments_lb.png b/tests/auto/declarative/qsgtext/data/alignments_lb.png
new file mode 100644
index 0000000000..1b50a81f3d
--- /dev/null
+++ b/tests/auto/declarative/qsgtext/data/alignments_lb.png
Binary files differ
diff --git a/tests/auto/declarative/qsgtext/data/alignments_lc.png b/tests/auto/declarative/qsgtext/data/alignments_lc.png
new file mode 100644
index 0000000000..f041b868f8
--- /dev/null
+++ b/tests/auto/declarative/qsgtext/data/alignments_lc.png
Binary files differ
diff --git a/tests/auto/declarative/qsgtext/data/alignments_lt.png b/tests/auto/declarative/qsgtext/data/alignments_lt.png
new file mode 100644
index 0000000000..c75e0d158e
--- /dev/null
+++ b/tests/auto/declarative/qsgtext/data/alignments_lt.png
Binary files differ
diff --git a/tests/auto/declarative/qsgtext/data/alignments_rb.png b/tests/auto/declarative/qsgtext/data/alignments_rb.png
new file mode 100644
index 0000000000..b06a5da715
--- /dev/null
+++ b/tests/auto/declarative/qsgtext/data/alignments_rb.png
Binary files differ
diff --git a/tests/auto/declarative/qsgtext/data/alignments_rc.png b/tests/auto/declarative/qsgtext/data/alignments_rc.png
new file mode 100644
index 0000000000..e468857cd0
--- /dev/null
+++ b/tests/auto/declarative/qsgtext/data/alignments_rc.png
Binary files differ
diff --git a/tests/auto/declarative/qsgtext/data/alignments_rt.png b/tests/auto/declarative/qsgtext/data/alignments_rt.png
new file mode 100644
index 0000000000..576715ffce
--- /dev/null
+++ b/tests/auto/declarative/qsgtext/data/alignments_rt.png
Binary files differ
diff --git a/tests/auto/declarative/qsgtext/data/embeddedImagesLocal.qml b/tests/auto/declarative/qsgtext/data/embeddedImagesLocal.qml
new file mode 100644
index 0000000000..d71e9bb5bf
--- /dev/null
+++ b/tests/auto/declarative/qsgtext/data/embeddedImagesLocal.qml
@@ -0,0 +1,5 @@
+import QtQuick 2.0
+
+Text {
+ text: "<img src='http/exists.png'>"
+}
diff --git a/tests/auto/declarative/qsgtext/data/embeddedImagesLocalError.qml b/tests/auto/declarative/qsgtext/data/embeddedImagesLocalError.qml
new file mode 100644
index 0000000000..e6719481db
--- /dev/null
+++ b/tests/auto/declarative/qsgtext/data/embeddedImagesLocalError.qml
@@ -0,0 +1,5 @@
+import QtQuick 2.0
+
+Text {
+ text: "<img src='http/notexists.png'>"
+}
diff --git a/tests/auto/declarative/qsgtext/data/embeddedImagesRemote.qml b/tests/auto/declarative/qsgtext/data/embeddedImagesRemote.qml
new file mode 100644
index 0000000000..e524d028b5
--- /dev/null
+++ b/tests/auto/declarative/qsgtext/data/embeddedImagesRemote.qml
@@ -0,0 +1,5 @@
+import QtQuick 2.0
+
+Text {
+ text: "<img src='http://127.0.0.1:14453/exists.png'>"
+}
diff --git a/tests/auto/declarative/qsgtext/data/embeddedImagesRemoteError.qml b/tests/auto/declarative/qsgtext/data/embeddedImagesRemoteError.qml
new file mode 100644
index 0000000000..f541e0e497
--- /dev/null
+++ b/tests/auto/declarative/qsgtext/data/embeddedImagesRemoteError.qml
@@ -0,0 +1,5 @@
+import QtQuick 2.0
+
+Text {
+ text: "<img src='http://127.0.0.1:14453/notexists.png'>"
+}
diff --git a/tests/auto/declarative/qsgtext/data/horizontalAlignment_RightToLeft.qml b/tests/auto/declarative/qsgtext/data/horizontalAlignment_RightToLeft.qml
new file mode 100644
index 0000000000..5ba4d35684
--- /dev/null
+++ b/tests/auto/declarative/qsgtext/data/horizontalAlignment_RightToLeft.qml
@@ -0,0 +1,23 @@
+import QtQuick 2.0
+
+Rectangle {
+ id: top
+ width: 200; height: 70;
+
+ property alias horizontalAlignment: text.horizontalAlignment
+ property string text: "اختبا"
+
+ Rectangle {
+ anchors.centerIn: parent
+ width: 180
+ height: 20
+ color: "green"
+
+ Text {
+ id: text
+ objectName: "text"
+ anchors.fill: parent
+ text: top.text
+ }
+ }
+}
diff --git a/tests/auto/declarative/qsgtext/data/http/exists.png b/tests/auto/declarative/qsgtext/data/http/exists.png
new file mode 100644
index 0000000000..399bd0b1d9
--- /dev/null
+++ b/tests/auto/declarative/qsgtext/data/http/exists.png
Binary files differ
diff --git a/tests/auto/declarative/qsgtext/data/lineCount.qml b/tests/auto/declarative/qsgtext/data/lineCount.qml
new file mode 100644
index 0000000000..b672863684
--- /dev/null
+++ b/tests/auto/declarative/qsgtext/data/lineCount.qml
@@ -0,0 +1,15 @@
+import QtQuick 2.0
+
+Item {
+ width: 200
+ height: 200
+
+ Text {
+ id: myText
+ objectName: "myText"
+ width: 200
+ wrapMode: Text.WordWrap
+ maximumLineCount: undefined
+ text: "Testing that maximumLines, visibleLines, and totalLines works properly in the autotests. The quick brown fox jumped over the lazy anything with the letter 'g'."
+ }
+}
diff --git a/tests/auto/declarative/qsgtext/data/lineHeight.qml b/tests/auto/declarative/qsgtext/data/lineHeight.qml
new file mode 100644
index 0000000000..c1f337aa05
--- /dev/null
+++ b/tests/auto/declarative/qsgtext/data/lineHeight.qml
@@ -0,0 +1,15 @@
+import QtQuick 2.0
+
+Item {
+ width: 200
+ height: 200
+
+ Text {
+ id: myText
+ objectName: "myText"
+ width: 200
+ wrapMode: Text.WordWrap
+ font.pixelSize: 13
+ text: "Lorem ipsum sit amet, consectetur adipiscing elit. Integer felis nisl, varius in pretium nec, venenatis non erat. Proin lobortis interdum dictum."
+ }
+}
diff --git a/tests/auto/declarative/qsgtext/data/qtbug_14734.qml b/tests/auto/declarative/qsgtext/data/qtbug_14734.qml
new file mode 100644
index 0000000000..e71a798421
--- /dev/null
+++ b/tests/auto/declarative/qsgtext/data/qtbug_14734.qml
@@ -0,0 +1,10 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 640
+ height: 480
+
+ Text {
+ text: "í "
+ }
+}
diff --git a/tests/auto/declarative/qsgtext/data/rotated.qml b/tests/auto/declarative/qsgtext/data/rotated.qml
new file mode 100644
index 0000000000..fecf64b249
--- /dev/null
+++ b/tests/auto/declarative/qsgtext/data/rotated.qml
@@ -0,0 +1,18 @@
+import QtQuick 2.0
+
+Rectangle {
+ width : 200
+ height : 100
+
+ Text {
+ objectName: "text"
+ x: 20
+ y: 20
+ height : 20
+ width : 80
+ text : "Something"
+ rotation : 30
+ transformOrigin : Item.TopLeft
+ }
+}
+