aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/material
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2016-01-15 11:34:30 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2016-01-15 14:51:56 +0000
commit07e0dec2b92eea069021b6efcb984dbacba9b48e (patch)
treee66d43d24df8682b639da1f8bb2cd8e7bfac6716 /tests/auto/material
parentfbb1fdec65435f7f013b11aa8d1efd35747fd8ee (diff)
Fix style inheritance
Change-Id: I46f4ea38d21f0f6a22bd247e02fe92a5b0d0d454 Task-number: QTBUG-50470 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'tests/auto/material')
-rw-r--r--tests/auto/material/data/tst_material.qml38
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/auto/material/data/tst_material.qml b/tests/auto/material/data/tst_material.qml
index 6bd99547..e29fea3b 100644
--- a/tests/auto/material/data/tst_material.qml
+++ b/tests/auto/material/data/tst_material.qml
@@ -107,6 +107,22 @@ TestCase {
}
}
+ Component {
+ id: comboBox
+ ApplicationWindow {
+ width: 200
+ height: 200
+ visible: true
+ Material.accent: Material.Red
+ property alias combo: box
+ ComboBox {
+ id: box
+ Material.theme: Material.Dark
+ model: 1
+ }
+ }
+ }
+
function test_defaults() {
var control = button.createObject(testCase)
verify(control)
@@ -251,6 +267,28 @@ TestCase {
container.destroy()
}
+ function test_comboBox() {
+ var window = comboBox.createObject(testCase)
+ verify(window)
+ verify(window.combo)
+ waitForRendering(window.combo)
+ window.combo.forceActiveFocus()
+ verify(window.combo.activeFocus)
+ keyClick(Qt.Key_Space)
+ verify(window.combo.popup.visible)
+ var listView = window.combo.popup.contentItem.children[0]
+ verify(listView)
+ var child = listView.contentItem.children[0]
+ verify(child)
+ compare(window.Material.theme, Material.Light)
+ compare(window.combo.Material.theme, Material.Dark)
+ compare(child.Material.theme, Material.Dark)
+ compare(window.Material.accent, Material.color(Material.Red))
+ compare(window.combo.Material.accent, Material.color(Material.Red))
+ compare(child.Material.accent, Material.color(Material.Red))
+ window.destroy()
+ }
+
function test_colors() {
var control = button.createObject(testCase)
verify(control)