From 07e0dec2b92eea069021b6efcb984dbacba9b48e Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Fri, 15 Jan 2016 11:34:30 +0100 Subject: Fix style inheritance Change-Id: I46f4ea38d21f0f6a22bd247e02fe92a5b0d0d454 Task-number: QTBUG-50470 Reviewed-by: J-P Nurmi --- tests/auto/universal/data/tst_universal.qml | 38 +++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'tests/auto/universal') diff --git a/tests/auto/universal/data/tst_universal.qml b/tests/auto/universal/data/tst_universal.qml index b2f164e1..af70ad0e 100644 --- a/tests/auto/universal/data/tst_universal.qml +++ b/tests/auto/universal/data/tst_universal.qml @@ -107,6 +107,22 @@ TestCase { } } + Component { + id: comboBox + ApplicationWindow { + width: 200 + height: 200 + visible: true + Universal.accent: Universal.Red + property alias combo: box + ComboBox { + id: box + Universal.theme: Universal.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.Universal.theme, Universal.Light) + compare(window.combo.Universal.theme, Universal.Dark) + compare(child.Universal.theme, Universal.Dark) + compare(window.Universal.accent, "#e51400") // Red + compare(window.combo.Universal.accent, "#e51400") // Red + compare(child.Universal.accent, "#e51400") // Red + window.destroy() + } + function test_colors() { var control = button.createObject(testCase) verify(control) -- cgit v1.2.3