diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-09-24 03:03:50 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-09-24 03:03:51 +0200 |
commit | 5182f7c5a3190231d1431258ea4cfcd26fbeb2b0 (patch) | |
tree | 940e9d6d4a59d3e79a50200d34bfd43fa41e93dc /tests | |
parent | 0cab878ae937451c8b53262cde7a05e7feaec0a6 (diff) | |
parent | 6815f353e5a73c0dcf39fbfc91c6a2c1b0784324 (diff) |
Merge remote-tracking branch 'origin/5.13' into 5.14
Change-Id: I34f3fa5e3cd2ebb0ed8f7d4e6d5ed6f66422a48d
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/controls/data/tst_textarea.qml | 68 | ||||
-rw-r--r-- | tests/auto/focus/BLACKLIST | 3 | ||||
-rw-r--r-- | tests/auto/qquickmaterialstyle/data/tst_material.qml | 35 |
3 files changed, 71 insertions, 35 deletions
diff --git a/tests/auto/controls/data/tst_textarea.qml b/tests/auto/controls/data/tst_textarea.qml index ee40c9b7..1e455ffc 100644 --- a/tests/auto/controls/data/tst_textarea.qml +++ b/tests/auto/controls/data/tst_textarea.qml @@ -688,4 +688,72 @@ TestCase { compare(control.background.width, 100) compare(control.background.height, 100) } + + // QTBUG-76369 + Component { + id: testResizeBackground + Item { + width: 200 + height: 200 + property alias textArea: textArea + ScrollView { + anchors.fill: parent + ScrollBar.horizontal.policy: ScrollBar.AlwaysOff + TextArea { + id: textArea + // workaround test failing due to default insets on Imagine + topInset: undefined + leftInset: undefined + rightInset: undefined + bottomInset: undefined + wrapMode : TextEdit.WordWrap + readOnly: false + selectByMouse: true + focus: true + text: "test message" + + background: Rectangle { + y: parent.height - height - textArea.bottomPadding / 2 + implicitWidth: 120 + height: textArea.activeFocus ? 2 : 1 + } + } + } + } + } + + function test_resize_background() { + var control = createTemporaryObject(testResizeBackground, testCase) + + compare(control.textArea.background.width, control.width) + compare(control.textArea.background.height, 1) + control.width = 400 + control.height = 400 + compare(control.textArea.background.width, control.width) + compare(control.textArea.background.height, 1) + control.width = 200 + control.height = 200 + compare(control.textArea.background.width, control.width) + compare(control.textArea.background.height, 1) + + // hasBackgroundWidth=true + control.textArea.background.width = 1 + compare(control.textArea.background.width, 1) + compare(control.textArea.background.height, 1) + control.width = 400 + control.height = 400 + compare(control.textArea.background.width, 1) + compare(control.textArea.background.height, 1) + // hasBackgroundHeight=false + control.textArea.background.height = undefined + compare(control.textArea.background.width, 1) + compare(control.textArea.background.height, 0) + control.textArea.background.y = 0 + compare(control.textArea.background.width, 1) + compare(control.textArea.background.height, control.height) + control.width = 200 + control.height = 200 + compare(control.textArea.background.width, 1) + compare(control.textArea.background.height, control.height) + } } diff --git a/tests/auto/focus/BLACKLIST b/tests/auto/focus/BLACKLIST new file mode 100644 index 00000000..730d3844 --- /dev/null +++ b/tests/auto/focus/BLACKLIST @@ -0,0 +1,3 @@ +# QTBUG-78261 +[policy] +opensuse-leap diff --git a/tests/auto/qquickmaterialstyle/data/tst_material.qml b/tests/auto/qquickmaterialstyle/data/tst_material.qml index 45bc0dab..9f2456b8 100644 --- a/tests/auto/qquickmaterialstyle/data/tst_material.qml +++ b/tests/auto/qquickmaterialstyle/data/tst_material.qml @@ -715,39 +715,4 @@ TestCase { control.destroy() } - - Component { - id: testResizeBackground - Item { - width: 200 - height: 200 - property alias textArea: textArea - ScrollView { - anchors.fill: parent - ScrollBar.horizontal.policy: ScrollBar.AlwaysOff - TextArea { - id: textArea - wrapMode : TextEdit.WordWrap - readOnly: false - selectByMouse: true - focus: true - text: "test message" - } - } - } - } - - function test_resize_background() { - var control = testCase.createTemporaryObject(testResizeBackground, testCase) - compare(control.textArea.background.height, 1) - compare(control.textArea.background.width, control.width) - control.width = 400 - control.height = 400 - compare(control.textArea.background.height, 1) - compare(control.textArea.background.width, control.width) - control.width = 200 - control.height = 200 - compare(control.textArea.background.height, 1) - compare(control.textArea.background.width, control.width) - } } |