aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-11-02 15:23:57 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2016-11-02 15:24:48 +0000
commit7ea14343dd179f642eec003476c2c5e65198affd (patch)
tree3d1e08613ef980390fbc32bf119beba49abb9085 /tests/auto
parentbe9adeeda631926716038b852bf7e4b33daa2dc2 (diff)
tst_accessibility: add all remaining controls
Change-Id: I92522c861ccf1604d3d36bc8c132924050c24b8d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/accessibility/data/abstractbutton.qml6
-rw-r--r--tests/auto/accessibility/data/container.qml4
-rw-r--r--tests/auto/accessibility/data/radiodelegate.qml6
-rw-r--r--tests/auto/accessibility/data/swipedelegate.qml6
-rw-r--r--tests/auto/accessibility/data/tumbler.qml4
-rw-r--r--tests/auto/accessibility/tst_accessibility.cpp10
6 files changed, 33 insertions, 3 deletions
diff --git a/tests/auto/accessibility/data/abstractbutton.qml b/tests/auto/accessibility/data/abstractbutton.qml
new file mode 100644
index 00000000..368f4582
--- /dev/null
+++ b/tests/auto/accessibility/data/abstractbutton.qml
@@ -0,0 +1,6 @@
+import QtQuick 2.5
+import QtQuick.Controls 2.0
+
+AbstractButton {
+ text: "AbstractButton"
+}
diff --git a/tests/auto/accessibility/data/container.qml b/tests/auto/accessibility/data/container.qml
new file mode 100644
index 00000000..806ebe78
--- /dev/null
+++ b/tests/auto/accessibility/data/container.qml
@@ -0,0 +1,4 @@
+import QtQuick 2.5
+import QtQuick.Controls 2.0
+
+Container { }
diff --git a/tests/auto/accessibility/data/radiodelegate.qml b/tests/auto/accessibility/data/radiodelegate.qml
new file mode 100644
index 00000000..93ccafde
--- /dev/null
+++ b/tests/auto/accessibility/data/radiodelegate.qml
@@ -0,0 +1,6 @@
+import QtQuick 2.5
+import QtQuick.Controls 2.0
+
+RadioDelegate {
+ text: "RadioDelegate"
+}
diff --git a/tests/auto/accessibility/data/swipedelegate.qml b/tests/auto/accessibility/data/swipedelegate.qml
new file mode 100644
index 00000000..a8acb5e0
--- /dev/null
+++ b/tests/auto/accessibility/data/swipedelegate.qml
@@ -0,0 +1,6 @@
+import QtQuick 2.5
+import QtQuick.Controls 2.0
+
+SwipeDelegate {
+ text: "SwipeDelegate"
+}
diff --git a/tests/auto/accessibility/data/tumbler.qml b/tests/auto/accessibility/data/tumbler.qml
new file mode 100644
index 00000000..11c737d7
--- /dev/null
+++ b/tests/auto/accessibility/data/tumbler.qml
@@ -0,0 +1,4 @@
+import QtQuick 2.5
+import QtQuick.Controls 2.0
+
+Tumbler { }
diff --git a/tests/auto/accessibility/tst_accessibility.cpp b/tests/auto/accessibility/tst_accessibility.cpp
index e232d75a..99f6391e 100644
--- a/tests/auto/accessibility/tst_accessibility.cpp
+++ b/tests/auto/accessibility/tst_accessibility.cpp
@@ -64,11 +64,15 @@ void tst_accessibility::a11y_data()
QTest::addColumn<int>("role");
QTest::addColumn<QString>("text");
+ QTest::newRow("AbstractButton") << "abstractbutton" << 0x0000002B << "AbstractButton"; //QAccessible::Button
QTest::newRow("BusyIndicator") << "busyindicator" << 0x00000027 << ""; //QAccessible::Indicator
QTest::newRow("Button") << "button" << 0x0000002B << "Button"; //QAccessible::Button
QTest::newRow("CheckBox") << "checkbox" << 0x0000002C << "CheckBox"; //QAccessible::CheckBox
QTest::newRow("CheckDelegate") << "checkdelegate" << 0x0000002C << "CheckDelegate"; //QAccessible::CheckBox
QTest::newRow("ComboBox") << "combobox" << 0x0000002E << "ComboBox"; //QAccessible::ComboBox
+ QTest::newRow("Container") << "container" << 0x00000000 << ""; //QAccessible::NoRole
+ QTest::newRow("Control") << "control" << 0x00000000 << ""; //QAccessible::NoRole
+ QTest::newRow("Dial") << "dial" << 0x00000031 << ""; //QAccessible::Dial
QTest::newRow("Drawer") << "drawer" << 0x00000012 << ""; //QAccessible::Dialog
QTest::newRow("Frame") << "frame" << 0x00000013 << ""; //QAccessible::Border
QTest::newRow("GroupBox") << "groupbox" << 0x00000014 << "GroupBox"; //QAccessible::Grouping
@@ -82,12 +86,14 @@ void tst_accessibility::a11y_data()
QTest::newRow("Popup") << "popup" << 0x00000012 << ""; //QAccessible::Dialog
QTest::newRow("ProgressBar") << "progressbar" << 0x00000030 << ""; //QAccessible::ProgressBar
QTest::newRow("RadioButton") << "radiobutton" << 0x0000002D << "RadioButton"; //QAccessible::RadioButton
+ QTest::newRow("RadioDelegate") << "radiodelegate" << 0x0000002D << "RadioDelegate"; //QAccessible::RadioButton
QTest::newRow("RangeSlider") << "rangeslider" << 0x00000033 << ""; //QAccessible::Slider
QTest::newRow("ScrollBar") << "scrollbar" << 0x00000003 << ""; //QAccessible::ScrollBar
QTest::newRow("ScrollIndicator") << "scrollindicator" << 0x00000027 << ""; //QAccessible::Indicator
QTest::newRow("Slider") << "slider" << 0x00000033 << ""; //QAccessible::Slider
QTest::newRow("SpinBox") << "spinbox" << 0x00000034 << ""; //QAccessible::SpinBox
QTest::newRow("StackView") << "stackview" << 0x00000080 << ""; //QAccessible::LayeredPane
+ QTest::newRow("SwipeDelegate") << "swipedelegate" << 0x00000022 << "SwipeDelegate"; //QAccessible::ListItem
QTest::newRow("SwipeView") << "swipeview" << 0x0000003C << ""; //QAccessible::Pane
QTest::newRow("Switch") << "switch" << 0x0000002B << "Switch"; //QAccessible::Button
QTest::newRow("SwitchDelegate") << "switchdelegate" << 0x00000022 << "SwitchDelegate"; //QAccessible::ListItem
@@ -98,9 +104,7 @@ void tst_accessibility::a11y_data()
QTest::newRow("ToolBar") << "toolbar" << 0x00000016 << ""; //QAccessible::ToolBar
QTest::newRow("ToolButton") << "toolbutton" << 0x0000002B << "ToolButton"; //QAccessible::Button
QTest::newRow("ToolTip") << "tooltip" << 0x0000000D << "ToolTip"; //QAccessible::ToolTip
-
- QTest::newRow("Dial") << "dial" << 0x00000031 << ""; //QAccessible::Dial
- // Tumbler
+ QTest::newRow("Tumbler") << "tumbler" << 0x00000000 << ""; //QAccessible::NoRole (TODO)
QTest::newRow("DayOfWeekRow") << "dayofweekrow" << 0x0 << "DayOfWeekRow"; //QAccessible::NoRole
QTest::newRow("MonthGrid") << "monthgrid" << 0x0 << "MonthGrid"; //QAccessible::NoRole