aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-11-25 01:04:19 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-11-25 08:53:45 +0000
commit6980589344b67f6a68e5fa86d3ea89d9f659d842 (patch)
tree9cb7636e2a45ce429436cac99808189ccb95c856 /tests/auto/controls
parent96474dba254526b48e35ffa5b22950185dae43fb (diff)
Specify baseline offsets
Change-Id: I4845a7beac2edc0f0bcc1c810edd7d9e86f31c87 Task-number: QTBUG-49468 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'tests/auto/controls')
-rw-r--r--tests/auto/controls/data/tst_button.qml7
-rw-r--r--tests/auto/controls/data/tst_checkbox.qml7
-rw-r--r--tests/auto/controls/data/tst_radiobutton.qml7
-rw-r--r--tests/auto/controls/data/tst_switch.qml7
-rw-r--r--tests/auto/controls/data/tst_tabbutton.qml12
-rw-r--r--tests/auto/controls/data/tst_toolbutton.qml7
6 files changed, 47 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_button.qml b/tests/auto/controls/data/tst_button.qml
index b5b37156..873009e8 100644
--- a/tests/auto/controls/data/tst_button.qml
+++ b/tests/auto/controls/data/tst_button.qml
@@ -299,4 +299,11 @@ TestCase {
control.highlighted = true
compare(control.highlighted, true)
}
+
+ function test_baseline() {
+ var control = button.createObject(testCase)
+ verify(control)
+ compare(control.baselineOffset, control.label.y + control.label.baselineOffset)
+ control.destroy()
+ }
}
diff --git a/tests/auto/controls/data/tst_checkbox.qml b/tests/auto/controls/data/tst_checkbox.qml
index c61cab38..4efc7223 100644
--- a/tests/auto/controls/data/tst_checkbox.qml
+++ b/tests/auto/controls/data/tst_checkbox.qml
@@ -417,4 +417,11 @@ TestCase {
control.destroy()
}
+
+ function test_baseline() {
+ var control = checkBox.createObject(testCase)
+ verify(control)
+ compare(control.baselineOffset, control.label.y + control.label.baselineOffset)
+ control.destroy()
+ }
}
diff --git a/tests/auto/controls/data/tst_radiobutton.qml b/tests/auto/controls/data/tst_radiobutton.qml
index df6834fe..d4cdf0ad 100644
--- a/tests/auto/controls/data/tst_radiobutton.qml
+++ b/tests/auto/controls/data/tst_radiobutton.qml
@@ -308,4 +308,11 @@ TestCase {
container.destroy()
}
+
+ function test_baseline() {
+ var control = radioButton.createObject(testCase)
+ verify(control)
+ compare(control.baselineOffset, control.label.y + control.label.baselineOffset)
+ control.destroy()
+ }
}
diff --git a/tests/auto/controls/data/tst_switch.qml b/tests/auto/controls/data/tst_switch.qml
index 153a28b9..13924ed0 100644
--- a/tests/auto/controls/data/tst_switch.qml
+++ b/tests/auto/controls/data/tst_switch.qml
@@ -256,4 +256,11 @@ TestCase {
container.destroy()
}
+
+ function test_baseline() {
+ var control = swtch.createObject(testCase)
+ verify(control)
+ compare(control.baselineOffset, control.label.y + control.label.baselineOffset)
+ control.destroy()
+ }
}
diff --git a/tests/auto/controls/data/tst_tabbutton.qml b/tests/auto/controls/data/tst_tabbutton.qml
index da9e094b..3a817cfd 100644
--- a/tests/auto/controls/data/tst_tabbutton.qml
+++ b/tests/auto/controls/data/tst_tabbutton.qml
@@ -51,6 +51,11 @@ TestCase {
name: "TabButton"
Component {
+ id: tabButton
+ TabButton { }
+ }
+
+ Component {
id: repeater
Column {
Repeater {
@@ -76,4 +81,11 @@ TestCase {
container.destroy()
}
+
+ function test_baseline() {
+ var control = tabButton.createObject(testCase)
+ verify(control)
+ compare(control.baselineOffset, control.label.y + control.label.baselineOffset)
+ control.destroy()
+ }
}
diff --git a/tests/auto/controls/data/tst_toolbutton.qml b/tests/auto/controls/data/tst_toolbutton.qml
index 5dfac358..63a87ec2 100644
--- a/tests/auto/controls/data/tst_toolbutton.qml
+++ b/tests/auto/controls/data/tst_toolbutton.qml
@@ -169,4 +169,11 @@ TestCase {
control.destroy()
}
+
+ function test_baseline() {
+ var control = toolButton.createObject(testCase)
+ verify(control)
+ compare(control.baselineOffset, control.label.y + control.label.baselineOffset)
+ control.destroy()
+ }
}