@@ -35,9 +35,9 @@ Rectangle {
3535 property color color
3636 property var styles: [
3737 {},
38− { "foreground-color": "red" },
39− { "foreground-color": "green" },
40− { "foreground-color": "blue" },
38+ { "foreground-color": "red", "background-color": "black" },
39+ { "foreground-color": "green", "background-color": "white" },
40+ { "foreground-color": "blue", "background-color": "darkgrey" },
4141 ]
4242
4343 function cleanup() {
@@ -76,5 +76,21 @@ Rectangle {
7676 verify(Qt.colorEqual(tool.foreground, data.foreground),
7777 "Foreground color not equal: %1 != %2".arg(tool.foreground).arg(data.foreground));
7878 }
79+
80+ function test_background_data() {
81+ return [
82+ { tag: "default", index: 0, background: "transparent" },
83+ { tag: "black", index: 1, background: "black" },
84+ { tag: "white", index: 2, background: "white" },
85+ { tag: "darkgrey", index: 3, background: "darkgrey" },
86+ ];
87+ }
88+
89+ function test_background(data) {
90+ tool.style = testCase.styles[data.index];
91+ verify(Qt.colorEqual(tool.background, data.background),
92+ "Background color not equal: %1 != %2".arg(tool.background).arg(data.background));
93+ }
94+
7995 }
8096}