summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJens Bache-Wiig <jens.bache-wiig@nokia.com>2011-02-21 10:51:24 +0100
committerJens Bache-Wiig <jens.bache-wiig@nokia.com>2011-02-21 10:51:24 +0100
commit9917d1d23cced9f3f91ec8a0504c2942e72adfc7 (patch)
tree797638ab1c865a49cc250fb5470f38788d62b4ab /tests
parentdf83464e7a1eb903f3e9dbb5124c4bd7894cfa1f (diff)
downloadqtquickcontrols-9917d1d23cced9f3f91ec8a0504c2942e72adfc7.tar.gz
Cleaned up the desktop branch
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/ComponentTestCase.js70
-rw-r--r--tests/auto/ComponentTestCase.qml75
-rw-r--r--tests/auto/README13
-rw-r--r--tests/auto/SpecBusyIndicator.qml58
-rw-r--r--tests/auto/SpecButton.qml75
-rw-r--r--tests/auto/SpecButtonColumn.qml60
-rw-r--r--tests/auto/SpecButtonRow.qml60
-rw-r--r--tests/auto/SpecCheckBox.qml62
-rw-r--r--tests/auto/SpecProgressBar.qml64
-rw-r--r--tests/auto/SpecRadioButton.qml62
-rw-r--r--tests/auto/SpecScrollDecorator.qml69
-rw-r--r--tests/auto/SpecSlider.qml69
-rw-r--r--tests/auto/SpecTextArea.qml81
-rw-r--r--tests/auto/SpecTextField.qml85
-rw-r--r--tests/auto/auto.pro6
-rw-r--r--tests/auto/data/nokia_logo.pngbin1979 -> 0 bytes
-rw-r--r--tests/auto/data/qt_logo.pngbin14796 -> 0 bytes
-rw-r--r--tests/auto/test_runner.cpp29
-rw-r--r--tests/auto/tst_BusyIndicator.qml36
-rw-r--r--tests/auto/tst_Button.qml107
-rw-r--r--tests/auto/tst_ButtonColumn.qml89
-rw-r--r--tests/auto/tst_ButtonRow.qml89
-rw-r--r--tests/auto/tst_CheckBox.qml70
-rw-r--r--tests/auto/tst_ProgressBar.qml36
-rw-r--r--tests/auto/tst_RadioButton.qml70
-rw-r--r--tests/auto/tst_ScrollDecorator.qml36
-rw-r--r--tests/auto/tst_Slider.qml36
-rw-r--r--tests/auto/tst_TextArea.qml284
-rw-r--r--tests/auto/tst_TextField.qml332
-rw-r--r--tests/benchmarks/BasicButtonBenchmark.qml9
-rw-r--r--tests/benchmarks/BenchmarkResults.txt20
-rw-r--r--tests/benchmarks/BusyIndicatorBenchmark.qml9
-rw-r--r--tests/benchmarks/ButtonBenchmark.qml9
-rw-r--r--tests/benchmarks/ButtonBlockBenchmark.qml15
-rw-r--r--tests/benchmarks/ButtonColumnBenchmark.qml13
-rw-r--r--tests/benchmarks/ButtonRowBenchmark.qml13
-rw-r--r--tests/benchmarks/CheckBoxBenchmark.qml9
-rw-r--r--tests/benchmarks/ChoiceListBenchmark.qml23
-rw-r--r--tests/benchmarks/ProgressBarBenchmark.qml9
-rw-r--r--tests/benchmarks/RadioButtonBenchmark.qml9
-rw-r--r--tests/benchmarks/ScrollDecoratorBenchmark.qml11
-rw-r--r--tests/benchmarks/ScrollIndicatorBenchmark.qml12
-rw-r--r--tests/benchmarks/SliderBenchmark.qml9
-rw-r--r--tests/benchmarks/SpinBoxBenchmark.qml9
-rw-r--r--tests/benchmarks/SwitchBenchmark.qml9
-rw-r--r--tests/benchmarks/TextAreaBenchmark.qml9
-rw-r--r--tests/benchmarks/TextFieldBenchmark.qml9
47 files changed, 0 insertions, 2329 deletions
diff --git a/tests/auto/ComponentTestCase.js b/tests/auto/ComponentTestCase.js
deleted file mode 100644
index acbe08af..00000000
--- a/tests/auto/ComponentTestCase.js
+++ /dev/null
@@ -1,70 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-function check_api(testSubject)
-{
- var apiSkeleton = testSubject.api.createObject(null);
- var rawObject = testSubject.raw.createObject(null);
-
- for (var prop in apiSkeleton) {
- if (prop.match(".+Changed$"))
- continue;
-
- var message = "Missing " + (typeof apiSkeleton[prop] == "function"
- ? "function" : "property") + ": " + prop;
- compare(rawObject.hasOwnProperty(prop), true, message);
-
- message = "Type not matching for: " + prop;
- compare(typeof rawObject[prop], typeof apiSkeleton[prop], message);
-
- if (typeof apiSkeleton[prop] == "function") {
- message = "Function parameters count differs for: " + prop;
- compare(rawObject[prop].length, apiSkeleton[prop].length, message);
- }
- }
-
- apiSkeleton.destroy();
- rawObject.destroy();
-}
-
-function check_defaults(testSubject)
-{
- var defaultsObject = testSubject.defaults.createObject(null);
- var rawObject = testSubject.raw.createObject(null);
-
- for (var prop in defaultsObject) {
- var propType = typeof defaultsObject[prop];
-
- if (propType == "object" || propType == "function")
- continue;
-
- var message = "Default value differs for: " + prop;
- compare(rawObject[prop], defaultsObject[prop], message);
- }
-
- defaultsObject.destroy();
- rawObject.destroy();
-}
diff --git a/tests/auto/ComponentTestCase.qml b/tests/auto/ComponentTestCase.qml
deleted file mode 100644
index aad28bea..00000000
--- a/tests/auto/ComponentTestCase.qml
+++ /dev/null
@@ -1,75 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import QtQuickTest 1.0
-
-import "ComponentTestCase.js" as Util
-
-TestCase {
- property Item obj
-
- visible: true
- when: windowShown
-
- function init() {
- obj = testSubject.basic.createObject(this);
- }
-
- function cleanup() {
- obj.destroy();
- }
-
- function test_check_for_missing()
- {
- var apiSkeleton = testSubject.api.createObject(null);
-
- for (var prop in apiSkeleton) {
- if (prop.match(".+Changed$") || prop == "objectName")
- continue;
-
- if (typeof this["test_" + prop] != "function") {
- var type = (typeof apiSkeleton[prop] == "function" ? "function" : "property");
- warn("No functional test for " + type + ": " + prop);
- }
- }
-
- apiSkeleton.destroy();
- }
-
- function benchmark_create_destroy() {
- var bechmarkObj = testSubject.basic.createObject(null);
- bechmarkObj.destroy();
- }
-
- function test_api_sanity() {
- Util.check_api(testSubject);
- }
-
- function test_defaults_sanity() {
- Util.check_defaults(testSubject);
- }
-}
diff --git a/tests/auto/README b/tests/auto/README
deleted file mode 100644
index 464e1681..00000000
--- a/tests/auto/README
+++ /dev/null
@@ -1,13 +0,0 @@
-You need QtQuickTest installed to run these tests,
-which is available at:
-
-http://qt.gitorious.org/qt-labs/qtest-qml/
-
-You can run all tests by compiling the runner:
-
- $ qmake
- $ make check
-
-Or run a single test using qmlviewer:
-
- $ qmlviewer tst_Button.qml
diff --git a/tests/auto/SpecBusyIndicator.qml b/tests/auto/SpecBusyIndicator.qml
deleted file mode 100644
index 17d81d13..00000000
--- a/tests/auto/SpecBusyIndicator.qml
+++ /dev/null
@@ -1,58 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import "../../components"
-
-QtObject {
- property Component raw:
- Component {
- BusyIndicator {
- }
- }
-
- property Component api:
- Component {
- QtObject {
- property bool running
- }
- }
-
- property Component defaults:
- Component {
- BusyIndicator {
- running: false
- }
- }
-
- property Component basic:
- Component {
- BusyIndicator {
- width: 200
- height: 200
- }
- }
-}
diff --git a/tests/auto/SpecButton.qml b/tests/auto/SpecButton.qml
deleted file mode 100644
index b57409ef..00000000
--- a/tests/auto/SpecButton.qml
+++ /dev/null
@@ -1,75 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import "../../components"
-
-QtObject {
- property Component raw:
- Component {
- Button {
- }
- }
-
- property Component api:
- Component {
- QtObject {
- property bool checked
- property bool checkable
- property bool pressed
-
- signal clicked
-
- property string text
-
- property url iconSource
- }
- }
-
- property Component defaults:
- Component {
- Button {
- checked: false
- checkable: false
-
- text: ""
-
- iconSource: ""
- }
- }
-
- property Component basic:
- Component {
- Button {
- width: 200
- height: 200
-
- text: "Test Button"
-
- iconSource: "data/qt_logo.png"
- }
- }
-}
diff --git a/tests/auto/SpecButtonColumn.qml b/tests/auto/SpecButtonColumn.qml
deleted file mode 100644
index 15bc8e2a..00000000
--- a/tests/auto/SpecButtonColumn.qml
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import "../../components"
-
-QtObject {
- property Component raw:
- Component {
- ButtonColumn {
- }
- }
-
- property Component api:
- Component {
- QtObject {
- property bool exclusive
- property Item checkedButton
- }
- }
-
- property Component defaults:
- Component {
- ButtonColumn {
- exclusive: true
- }
- }
-
- property Component basic:
- Component {
- ButtonColumn {
- Button { text: "A" }
- Button { text: "B" }
- Button { text: "C" }
- }
- }
-}
diff --git a/tests/auto/SpecButtonRow.qml b/tests/auto/SpecButtonRow.qml
deleted file mode 100644
index 4a409f72..00000000
--- a/tests/auto/SpecButtonRow.qml
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import "../../components"
-
-QtObject {
- property Component raw:
- Component {
- ButtonRow {
- }
- }
-
- property Component api:
- Component {
- QtObject {
- property bool exclusive
- property Item checkedButton
- }
- }
-
- property Component defaults:
- Component {
- ButtonRow {
- exclusive: true
- }
- }
-
- property Component basic:
- Component {
- ButtonRow {
- Button { text: "A" }
- Button { text: "B" }
- Button { text: "C" }
- }
- }
-}
diff --git a/tests/auto/SpecCheckBox.qml b/tests/auto/SpecCheckBox.qml
deleted file mode 100644
index bf1acd50..00000000
--- a/tests/auto/SpecCheckBox.qml
+++ /dev/null
@@ -1,62 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import "../../components"
-
-QtObject {
- property Component raw:
- Component {
- CheckBox {
- }
- }
-
- property Component api:
- Component {
- QtObject {
- property bool checked
- property bool pressed
-
- signal clicked
- }
- }
-
- property Component defaults:
- Component {
- CheckBox {
- checked: false
- pressed: false
- }
- }
-
- property Component basic:
- Component {
- CheckBox {
- width: 200
- height: 200
- }
- }
-}
diff --git a/tests/auto/SpecProgressBar.qml b/tests/auto/SpecProgressBar.qml
deleted file mode 100644
index f77be1ed..00000000
--- a/tests/auto/SpecProgressBar.qml
+++ /dev/null
@@ -1,64 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import "../../components"
-
-QtObject {
- property Component raw:
- Component {
- ProgressBar {
- }
- }
-
- property Component api:
- Component {
- QtObject {
- property real minimumValue
- property real maximumValue
- property real value
- property bool indeterminate
- }
- }
-
- property Component defaults:
- Component {
- ProgressBar {
- minimumValue: 0.0
- maximumValue: 1.0
- value: 0.0
- indeterminate: false
- }
- }
-
- property Component basic:
- Component {
- ProgressBar {
- width: 200
- height: 200
- }
- }
-}
diff --git a/tests/auto/SpecRadioButton.qml b/tests/auto/SpecRadioButton.qml
deleted file mode 100644
index ee813478..00000000
--- a/tests/auto/SpecRadioButton.qml
+++ /dev/null
@@ -1,62 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import "../../components"
-
-QtObject {
- property Component raw:
- Component {
- RadioButton {
- }
- }
-
- property Component api:
- Component {
- QtObject {
- property bool checked
- property bool pressed
-
- signal clicked
- }
- }
-
- property Component defaults:
- Component {
- RadioButton {
- checked: false
- pressed: false
- }
- }
-
- property Component basic:
- Component {
- RadioButton {
- width: 200
- height: 200
- }
- }
-}
diff --git a/tests/auto/SpecScrollDecorator.qml b/tests/auto/SpecScrollDecorator.qml
deleted file mode 100644
index b9cab2c9..00000000
--- a/tests/auto/SpecScrollDecorator.qml
+++ /dev/null
@@ -1,69 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import "../../components"
-
-QtObject {
- // ScrollDecorator is a special kind of component that needs
- // an flickable item set when creating an item, otherwise we
- // will get tons of warnings.
- property Item listView: ListView {}
-
- property Component raw:
- Component {
- ScrollDecorator {
- flickableItem: listView
- }
- }
-
- property Component api:
- Component {
- QtObject {
- property Flickable flickableItem
- }
- }
-
- property Component defaults:
- Component {
- ScrollDecorator {
- flickableItem: listView
- }
- }
-
- property Component basic:
- Component {
- Item {
- ScrollDecorator {
- flickableItem: listViewBasic
- }
-
- ListView {
- id: listViewBasic
- }
- }
- }
-}
diff --git a/tests/auto/SpecSlider.qml b/tests/auto/SpecSlider.qml
deleted file mode 100644
index a4908fee..00000000
--- a/tests/auto/SpecSlider.qml
+++ /dev/null
@@ -1,69 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import "../../components"
-
-QtObject {
- property Component raw:
- Component {
- Slider {
- }
- }
-
- property Component api:
- Component {
- QtObject {
- property real stepSize
- property real minimumValue
- property real maximumValue
- property real value
- property int orientation
- property bool pressed
- property bool updateValueWhileDragging
- }
- }
-
- property Component defaults:
- Component {
- Slider {
- stepSize: 0.0
- minimumValue: 0.0
- maximumValue: 1.0
- value: 0.0
- updateValueWhileDragging: true
- orientation: Qt.Horizontal
- }
- }
-
- property Component basic:
- Component {
- Slider {
- width: 200
- height: 200
- }
- }
-}
diff --git a/tests/auto/SpecTextArea.qml b/tests/auto/SpecTextArea.qml
deleted file mode 100644
index 4e218b2f..00000000
--- a/tests/auto/SpecTextArea.qml
+++ /dev/null
@@ -1,81 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import "../../components"
-
-QtObject {
- property Component raw:
- Component {
- TextArea {
- }
- }
-
- property Component api:
- Component {
- QtObject {
- property QtObject font
- property int cursorPosition
- property int horizontalAlignment
- property int verticalAlignment
- property bool readOnly
- property string selectedText
- property int selectionEnd
- property int selectionStart
- property string text
- property int textFormat
- property int wrapMode
-
- function copy() {}
- function paste() {}
- function cut() {}
- function select(start, end) {}
- function selectAll() {}
- function selectWord() {}
- function positionAt(x, y) {}
- function positionToRectangle(pos) {}
- }
- }
-
- property Component defaults:
- Component {
- TextArea {
- readOnly: false
- text: ""
- cursorPosition: 0
- wrapMode: TextEdit.Wrap
- }
- }
-
- property Component basic:
- Component {
- TextArea {
- width: 200
- height: 200
- text: "Test TextArea"
- }
- }
-}
diff --git a/tests/auto/SpecTextField.qml b/tests/auto/SpecTextField.qml
deleted file mode 100644
index 14da3d7c..00000000
--- a/tests/auto/SpecTextField.qml
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import "../../components"
-
-QtObject {
- property Component raw:
- Component {
- TextField {
- }
- }
-
- property Component api:
- Component {
- QtObject {
- property string placeholderText
- property int inputMethodHints
- property QtObject font
- property int cursorPosition
- property bool readOnly
- property int echoMode
- property bool acceptableInput
- property string inputMask
- property QtObject validator
- property string selectedText
- property int selectionEnd
- property int selectionStart
- property string text
-
- function copy() {}
- function paste() {}
- function cut() {}
- function select(start, end) {}
- function selectAll() {}
- function selectWord() {}
- function positionAt(x) {}
- function positionToRectangle(pos) {}
- }
- }
-
- property Component defaults:
- Component {
- TextField {
- readOnly: false
- echoMode: TextInput.Normal
- cursorPosition: 0
- inputMask: ""
- text: ""
- placeholderText: ""
- }
- }
-
- property Component basic:
- Component {
- TextField {
- width: 200
- height: 200
- text: "Test TextField"
- }
- }
-}
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
deleted file mode 100644
index 7151fa13..00000000
--- a/tests/auto/auto.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-TEMPLATE = app
-QT += declarative
-CONFIG += qmltestcase
-TARGET = test_runner
-
-SOURCES += test_runner.cpp
diff --git a/tests/auto/data/nokia_logo.png b/tests/auto/data/nokia_logo.png
deleted file mode 100644
index 6655691b..00000000
--- a/tests/auto/data/nokia_logo.png
+++ /dev/null
Binary files differ
diff --git a/tests/auto/data/qt_logo.png b/tests/auto/data/qt_logo.png
deleted file mode 100644
index fcfb37bf..00000000
--- a/tests/auto/data/qt_logo.png
+++ /dev/null
Binary files differ
diff --git a/tests/auto/test_runner.cpp b/tests/auto/test_runner.cpp
deleted file mode 100644
index a32a467a..00000000
--- a/tests/auto/test_runner.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-#include <QtQuickTest/quicktest.h>
-
-QUICK_TEST_MAIN(runner)
diff --git a/tests/auto/tst_BusyIndicator.qml b/tests/auto/tst_BusyIndicator.qml
deleted file mode 100644
index 94de6d11..00000000
--- a/tests/auto/tst_BusyIndicator.qml
+++ /dev/null
@@ -1,36 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import QtQuickTest 1.0
-
-ComponentTestCase {
- name: "BusyIndicator"
-
- SpecBusyIndicator {
- id: testSubject
- }
-}
diff --git a/tests/auto/tst_Button.qml b/tests/auto/tst_Button.qml
deleted file mode 100644
index 71719cc4..00000000
--- a/tests/auto/tst_Button.qml
+++ /dev/null
@@ -1,107 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import QtQuickTest 1.0
-
-ComponentTestCase {
- name: "Button"
-
- SpecButton {
- id: testSubject
- }
-
- SignalSpy {
- id: spy
- signalName: "clicked"
- }
-
- function test_clicked() {
- spy.target = obj;
- spy.clear();
-
- var message =
- "Clicking on the Button must emit the signal clicked().";
- mouseClick(obj, obj.width / 2, obj.height / 2);
- mouseClick(obj, obj.width / 2, obj.height / 2);
- mouseClick(obj, obj.width / 2, obj.height / 2);
- compare(spy.count, 3, message);
- }
-
- function test_checkable() {}
- function test_checked() {
- spy.target = obj;
- spy.clear();
-
- var message =
- "Clicking on a non-checkable button should not change checked property.";
- mouseClick(obj, obj.width / 2, obj.height / 2);
- compare(obj.checked, false, message);
-
- var message =
- "Clicking on a checkable button should change checked property.";
- obj.checkable = true
- mouseClick(obj, obj.width / 2, obj.height / 2);
- compare(obj.checked, true, message);
- mouseClick(obj, obj.width / 2, obj.height / 2);
- compare(obj.checked, false, message);
-
- var message =
- "Clicking on a checkable button should also emit clicked signal.";
- compare(spy.count, 3, message);
- }
-
- function test_pressed() {
- var message =
- "Pressing and releasing the mouse must change pressed property.";
- mousePress(obj, obj.width / 2, obj.height / 2);
- compare(obj.pressed, true, message);
- mouseRelease(obj, obj.width / 2, obj.height / 2);
- compare(obj.pressed, false, message);
- }
-
- function test_iconSource() {
- var message =
- "Testing if iconSource property can be set and verified.";
- obj.iconSource = "data/nokia_logo.png";
- compare(obj.iconSource, "data/nokia_logo.png", message);
- obj.iconSource = "data/qt_logo.png";
- compare(obj.iconSource, "data/qt_logo.png", message);
- obj.iconSource = "";
- compare(obj.iconSource, "", message);
- }
-
- function test_text() {
- var message =
- "Testing if text property can be set and verified.";
- obj.text = "ABC";
- compare(obj.text, "ABC", message);
- obj.text = "123";
- compare(obj.text, "123", message);
- obj.text = "";
- compare(obj.text, "", message);
- }
-}
diff --git a/tests/auto/tst_ButtonColumn.qml b/tests/auto/tst_ButtonColumn.qml
deleted file mode 100644
index 2e5c04ae..00000000
--- a/tests/auto/tst_ButtonColumn.qml
+++ /dev/null
@@ -1,89 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import QtQuickTest 1.0
-
-ComponentTestCase {
- name: "ButtonColumn"
-
- SpecButtonColumn {
- id: testSubject
- }
-
- function test_checkedButton() {}
- function test_exclusive() {
- var message =
- "The first button is checked by default when the object is created.";
- compare(obj.checkedButton, obj.children[0], message);
-
- var message =
- "Only the checkdButton should be checked when exclusive is true.";
- compare(obj.children[0].checked, true, message);
- compare(obj.children[1].checked, false, message);
- compare(obj.children[2].checked, false, message);
-
- var message =
- "Checking other button should unset the current checked button and " +
- "update checkedButton property.";
- obj.children[2].checked = true;
- compare(obj.checkedButton, obj.children[2], message);
- compare(obj.children[0].checked, false, message);
- compare(obj.children[1].checked, false, message);
- compare(obj.children[2].checked, true, message);
-
- var message =
- "Checking exclusive to false should allow multiple selections.";
- obj.exclusive = false;
- obj.children[1].checked = true;
- compare(obj.children[0].checked, false, message);
- compare(obj.children[1].checked, true, message);
- compare(obj.children[2].checked, true, message);
-
- var message =
- "Changing back exclusive to true, the last checked item should remain checked."
- obj.exclusive = true;
- compare(obj.checkedButton, obj.children[1], message);
- compare(obj.children[0].checked, false, message);
- compare(obj.children[1].checked, true, message);
- compare(obj.children[2].checked, false, message);
-
- var message =
- "Changing exclusive from false to true when no item is selected, should" +
- "select the first item.";
- obj.exclusive = false;
- obj.children[1].checked = false;
- compare(obj.checkedButton, undefined, message);
- compare(obj.children[0].checked, false, message);
- compare(obj.children[1].checked, false, message);
- compare(obj.children[2].checked, false, message);
- obj.exclusive = true;
- compare(obj.checkedButton, obj.children[0], message);
- compare(obj.children[0].checked, true, message);
- compare(obj.children[1].checked, false, message);
- compare(obj.children[2].checked, false, message);
- }
-}
diff --git a/tests/auto/tst_ButtonRow.qml b/tests/auto/tst_ButtonRow.qml
deleted file mode 100644
index 2b9ec839..00000000
--- a/tests/auto/tst_ButtonRow.qml
+++ /dev/null
@@ -1,89 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import QtQuickTest 1.0
-
-ComponentTestCase {
- name: "ButtonRow"
-
- SpecButtonRow {
- id: testSubject
- }
-
- function test_checkedButton() {}
- function test_exclusive() {
- var message =
- "The first button is checked by default when the object is created.";
- compare(obj.checkedButton, obj.children[0], message);
-
- var message =
- "Only the checkdButton should be checked when exclusive is true.";
- compare(obj.children[0].checked, true, message);
- compare(obj.children[1].checked, false, message);
- compare(obj.children[2].checked, false, message);
-
- var message =
- "Checking other button should unset the current checked button and " +
- "update checkedButton property.";
- obj.children[2].checked = true;
- compare(obj.checkedButton, obj.children[2], message);
- compare(obj.children[0].checked, false, message);
- compare(obj.children[1].checked, false, message);
- compare(obj.children[2].checked, true, message);
-
- var message =
- "Checking exclusive to false should allow multiple selections.";
- obj.exclusive = false;
- obj.children[1].checked = true;
- compare(obj.children[0].checked, false, message);
- compare(obj.children[1].checked, true, message);
- compare(obj.children[2].checked, true, message);
-
- var message =
- "Changing back exclusive to true, the last checked item should remain checked."
- obj.exclusive = true;
- compare(obj.checkedButton, obj.children[1], message);
- compare(obj.children[0].checked, false, message);
- compare(obj.children[1].checked, true, message);
- compare(obj.children[2].checked, false, message);
-
- var message =
- "Changing exclusive from false to true when no item is selected, should" +
- "select the first item.";
- obj.exclusive = false;
- obj.children[1].checked = false;
- compare(obj.checkedButton, undefined, message);
- compare(obj.children[0].checked, false, message);
- compare(obj.children[1].checked, false, message);
- compare(obj.children[2].checked, false, message);
- obj.exclusive = true;
- compare(obj.checkedButton, obj.children[0], message);
- compare(obj.children[0].checked, true, message);
- compare(obj.children[1].checked, false, message);
- compare(obj.children[2].checked, false, message);
- }
-}
diff --git a/tests/auto/tst_CheckBox.qml b/tests/auto/tst_CheckBox.qml
deleted file mode 100644
index 626e26b2..00000000
--- a/tests/auto/tst_CheckBox.qml
+++ /dev/null
@@ -1,70 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import QtQuickTest 1.0
-
-ComponentTestCase {
- name: "CheckBox"
-
- SpecCheckBox {
- id: testSubject
- }
-
- SignalSpy {
- id: spy
- signalName: "clicked"
- }
-
- function test_clicked() {
- spy.target = obj;
-
- var message =
- "Clicking on the Checkbox must emit the signal clicked().";
- mouseClick(obj, obj.width / 2, obj.height / 2);
- mouseClick(obj, obj.width / 2, obj.height / 2);
- mouseClick(obj, obj.width / 2, obj.height / 2);
- compare(spy.count, 3, message);
- }
-
- function test_checked() {
- var message =
- "Clicking on the Checkbox should change the checked value.";
- mouseClick(obj, obj.width / 2, obj.height / 2);
- compare(obj.checked, true, message);
- mouseClick(obj, obj.width / 2, obj.height / 2);
- compare(obj.checked, false, message);
- }
-
- function test_pressed() {
- var message =
- "Pressing and releasing the mouse must change pressed property.";
- mousePress(obj, obj.width / 2, obj.height / 2);
- compare(obj.pressed, true, message);
- mouseRelease(obj, obj.width / 2, obj.height / 2);
- compare(obj.pressed, false, message);
- }
-}
diff --git a/tests/auto/tst_ProgressBar.qml b/tests/auto/tst_ProgressBar.qml
deleted file mode 100644
index 4808c011..00000000
--- a/tests/auto/tst_ProgressBar.qml
+++ /dev/null
@@ -1,36 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import QtQuickTest 1.0
-
-ComponentTestCase {
- name: "ProgressBar"
-
- SpecProgressBar {
- id: testSubject
- }
-}
diff --git a/tests/auto/tst_RadioButton.qml b/tests/auto/tst_RadioButton.qml
deleted file mode 100644
index d53ae7a1..00000000
--- a/tests/auto/tst_RadioButton.qml
+++ /dev/null
@@ -1,70 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import QtQuickTest 1.0
-
-ComponentTestCase {
- name: "RadioButton"
-
- SpecRadioButton {
- id: testSubject
- }
-
- SignalSpy {
- id: spy
- signalName: "clicked"
- }
-
- function test_clicked() {
- spy.target = obj;
-
- var message =
- "Clicking on the RadioButton must emit the signal clicked().";
- mouseClick(obj, obj.width / 2, obj.height / 2);
- mouseClick(obj, obj.width / 2, obj.height / 2);
- mouseClick(obj, obj.width / 2, obj.height / 2);
- compare(spy.count, 3, message);
- }
-
- function test_checked() {
- var message =
- "Clicking on the RadioButton should change the checked value.";
- mouseClick(obj, obj.width / 2, obj.height / 2);
- compare(obj.checked, true, message);
- mouseClick(obj, obj.width / 2, obj.height / 2);
- compare(obj.checked, false, message);
- }
-
- function test_pressed() {
- var message =
- "Pressing and releasing the mouse must change pressed property.";
- mousePress(obj, obj.width / 2, obj.height / 2);
- compare(obj.pressed, true, message);
- mouseRelease(obj, obj.width / 2, obj.height / 2);
- compare(obj.pressed, false, message);
- }
-}
diff --git a/tests/auto/tst_ScrollDecorator.qml b/tests/auto/tst_ScrollDecorator.qml
deleted file mode 100644
index 65e7a317..00000000
--- a/tests/auto/tst_ScrollDecorator.qml
+++ /dev/null
@@ -1,36 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import QtQuickTest 1.0
-
-ComponentTestCase {
- name: "ScrollDecorator"
-
- SpecScrollDecorator {
- id: testSubject
- }
-}
diff --git a/tests/auto/tst_Slider.qml b/tests/auto/tst_Slider.qml
deleted file mode 100644
index 19384550..00000000
--- a/tests/auto/tst_Slider.qml
+++ /dev/null
@@ -1,36 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import QtQuickTest 1.0
-
-ComponentTestCase {
- name: "Slider"
-
- SpecSlider {
- id: testSubject
- }
-}
diff --git a/tests/auto/tst_TextArea.qml b/tests/auto/tst_TextArea.qml
deleted file mode 100644
index 700214e0..00000000
--- a/tests/auto/tst_TextArea.qml
+++ /dev/null
@@ -1,284 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import QtQuickTest 1.0
-
-ComponentTestCase {
- name: "TextArea"
-
- SpecTextArea {
- id: testSubject
- }
-
- function test_font() {
- var message =
- "When defining the font, TextArea should pick a system font of the same family.";
- obj.font = "Helvetica";
- verify(obj.font.family.match("^Helvetica"), message);
- }
-
- function test_cursorPosition() {
- var message =
- "When setting some text, the cursor should be positioned at the end of this text.";
- obj.text = "Test123";
- compare(obj.cursorPosition, 7, message);
-
- message =
- "Defining the cursor position to a number smaller than the text size should " +
- "always be considered valid.";
- obj.cursorPosition = 5;
- compare(obj.cursorPosition, 5, message);
-
- message =
- "If the the cursor position is set to a value longer then the current text size, " +
- "the cursorPosition should keep the current value.";
- obj.cursorPosition = 20;
- compare(obj.cursorPosition, 5, message);
-
- var message =
- "Cursor position should be added by one after each character input.";
- obj.forceActiveFocus();
- var pos = obj.cursorPosition;
- keyClick(Qt.Key_T);
- keyClick(Qt.Key_E);
- keyClick(Qt.Key_S);
- keyClick(Qt.Key_T);
- compare(obj.cursorPosition, pos + 4, message);
- }
-
- function test_horizontalAlignment() {
- var message =
- "Checking whenever it's possible to set the horizontal aligment property.";
- obj.horizontalAlignment = TextEdit.AlignHCenter;
- compare(obj.horizontalAlignment, TextEdit.AlignHCenter, message);
- }
-
- function test_verticalAlignment() {
- var message =
- "Checking whenever it's possible to set the vertical aligment property.";
- obj.verticalAlignment = TextEdit.AlignVCenter;
- compare(obj.verticalAlignment, TextEdit.AlignVCenter, message);
- }
-
- function test_readOnly() {
- var message =
- "Setting readOnly to true should prevent any modification in the text property.";
- obj.text = "Test123";
- obj.readOnly = true;
- obj.text = "123Test";
- expectFail("", message); // XXX: See QTBUG-15257
- compare(obj.text, "Test123", message);
- obj.text = "";
- compare(obj.text, "Test123", message);
-
- message =
- "Setting readOnly to false should allow modifications in the text property.";
- obj.readOnly = false;
- obj.text = "123Test";
- compare(obj.text, "123Test", message);
- }
-
- function test_select() {}
- function test_selectWord() {}
- function test_selectAll() {}
- function test_selectionStart() {}
- function test_selectionEnd() {}
- function test_selectedText() {
- var message =
- "Calling select() method using a valid text range should set selectedText to the " +
- "text within this range. selectionStart and selectionEnd should also be " +
- "updated properly.";
- obj.text = "Test 1234";
- obj.select(0, 4);
- compare(obj.selectedText, "Test", message);
- compare(obj.selectionStart, 0, message);
- compare(obj.selectionEnd, 4, message);
- obj.select(5, 9);
- compare(obj.selectedText, "1234", message);
- compare(obj.selectionStart, 5, message);
- compare(obj.selectionEnd, 9, message);
- obj.select(0, 9);
- compare(obj.selectedText, "Test 1234", message);
- compare(obj.selectionStart, 0, message);
- compare(obj.selectionEnd, 9, message);
- obj.select(5, 5);
- compare(obj.selectedText, "", message);
- compare(obj.selectionStart, 5, message);
- compare(obj.selectionEnd, 5, message);
- obj.select(0, 0);
- compare(obj.selectedText, "", message);
- compare(obj.selectionStart, 0, message);
- compare(obj.selectionEnd, 0, message);
-
- message =
- "Using select() with an invalid range (i.e beyond the text size) should keep " +
- "the previous valid selectedText and range. In other words, should do nothing.";
- obj.text = "Test 1234";
- obj.select(0, 20);
- compare(obj.selectedText, "", message);
- compare(obj.selectionStart, 0, message);
- compare(obj.selectionEnd, 0, message);
- obj.select(0, 4);
- obj.select(0, 50);
- compare(obj.selectedText, "Test", message);
- compare(obj.selectionStart, 0, message);
- compare(obj.selectionEnd, 4, message);
-
- message =
- "Using selectAll() should select the entiry text, ranging from zero to length.";
- obj.text = "Test 1234";
- obj.selectAll();
- compare(obj.selectedText, "Test 1234", message);
- compare(obj.selectionStart, 0, message);
- compare(obj.selectionEnd, obj.text.length, message);
-
- message =
- "selectWord() will select the first word nearest to the cursor position. If " +
- "a word is partially selected, it should select this word. If more than one word are " +
- "selected, it should select the last word (because in this situation, the cursor is " +
- "positioned in the end of the selection).";
- obj.text = "Test 1234 ABC";
- obj.cursorPosition = 0;
- obj.selectWord();
- compare(obj.selectedText, "Test", message);
- obj.select(5, 7);
- obj.selectWord();
- compare(obj.selectedText, "1234", message);
- obj.selectAll();
- obj.selectWord();
- compare(obj.selectedText, "ABC", message);
-
- message =
- "If text property is changed when some text is selected, selection should reset " +
- "to nothing.";
- obj.text = "Test 123";
- obj.selectAll();
- obj.text = "ABC";
- compare(obj.selectedText, "", message);
- compare(obj.selectionStart, 0, message);
- compare(obj.selectionEnd, 0, message);
-
- message =
- "Moving the cursor by pressing arrow keys should remove text selection.";
- obj.forceActiveFocus();
- obj.text = "Test 123";
- obj.selectAll();
- keyClick(Qt.Key_Left);
- compare(obj.selectedText, "", message);
- }
-
- function test_wrapMode() {
- var message =
- "This property should support all possible wrap modes types as in TextEdit.";
- obj.wrapMode = TextEdit.NoWrap;
- compare(obj.wrapMode, TextEdit.NoWrap, message);
- obj.wrapMode = TextEdit.WordWrap;
- compare(obj.wrapMode, TextEdit.WordWrap, message);
- obj.wrapMode = TextEdit.WrapAnywhere;
- compare(obj.wrapMode, TextEdit.WrapAnywhere, message);
- obj.wrapMode = TextEdit.Wrap;
- compare(obj.wrapMode, TextEdit.Wrap, message);
- }
-
- function test_textFormat() {
- var message =
- "This property should support all possible text formats defined in TextEdit.";
- obj.textFormat = TextEdit.AutoText;
- compare(obj.textFormat, TextEdit.AutoText, message);
- obj.textFormat = TextEdit.PlainText;
- compare(obj.textFormat, TextEdit.PlainText, message);
- obj.textFormat = TextEdit.RichText;
- compare(obj.textFormat, TextEdit.RichText, message);
- }
-
- function test_text() {
- var message =
- "Focused TextEdit should handle key input and change the contents of text " +
- "property accordingly. This test is closely related with focus and might fail " +
- "if forceActiveFocus() is not working properly.";
- obj.forceActiveFocus();
- obj.text = "";
- keyClick(Qt.Key_T);
- keyClick(Qt.Key_E);
- keyClick(Qt.Key_S);
- keyClick(Qt.Key_T);
- compare(obj.text, "test", message);
- keyClick(Qt.Key_Backspace);
- compare(obj.text, "tes", message);
- obj.text = "";
- compare(obj.text, "", message);
- }
-
- function test_copy() {}
- function test_cut() {}
- function test_paste() {
- var message =
- "Cutting a selected text should remove the text from TextEdit and store " +
- "the clipboard.";
- obj.text = "Test 123";
- obj.selectAll();
- obj.cut();
- compare(obj.text, "", message);
-
- var message =
- "This test verifies the if pasting the clipboard content on an empty " +
- "TextEdit works.";
- obj.paste();
- compare(obj.text, "Test 123", message);
-
- var message =
- "Copy should copy the selected area to clipboard without removing from " +
- "TextEdit. By pasting when some text is selected, should overwrite it's " +
- "contents.";
- obj.select(0, 4);
- obj.copy();
- obj.select(4, 8);
- obj.paste();
- compare(obj.text, "TestTest", message);
-
- var message =
- "Pasting the clipboard contents when the cursor is positionated on the end " +
- "of the TextEdit should append to the current content. It assumes that the " +
- "previous tests sets the position of the cursor to the end of the line.";
- obj.paste();
- compare(obj.text, "TestTestTest", message);
- }
-
- function test_positionAt() {}
- function test_positionToRectangle() {
- var message =
- "Testing if positionToRectangle() and positionAt() are coherent, since this " +
- "functional test will not rely on position coordinates and font metrics.";
- obj.text = "Test 123";
- var rect = obj.positionToRectangle(0);
- compare(obj.positionAt(rect.x, rect.y), 0, message);
- var rect = obj.positionToRectangle(5);
- compare(obj.positionAt(rect.x, rect.y), 5, message);
- var rect = obj.positionToRectangle(8);
- compare(obj.positionAt(rect.x, rect.y), 8, message);
- }
-}
diff --git a/tests/auto/tst_TextField.qml b/tests/auto/tst_TextField.qml
deleted file mode 100644
index cf72344b..00000000
--- a/tests/auto/tst_TextField.qml
+++ /dev/null
@@ -1,332 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components API Conformance Test Suite.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import QtQuickTest 1.0
-
-ComponentTestCase {
- name: "TextField"
-
- SpecTextField {
- id: testSubject
- }
-
- function test_font() {
- var message =
- "When defining the font, TextField should pick a system font of the same family.";
- obj.font = "Helvetica";
- verify(obj.font.family.match("^Helvetica"), message);
- }
-
- function test_cursorPosition() {
- var message =
- "When setting some text, the cursor should be positioned at the end of this text.";
- obj.text = "Test123";
- compare(obj.cursorPosition, 7, message);
-
- message =
- "Defining the cursor position to a number smaller than the text size should " +
- "always be considered valid.";
- obj.cursorPosition = 5;
- compare(obj.cursorPosition, 5, message);
-
- message =
- "If the the cursor position is set to a value longer then the current text size, " +
- "the cursorPosition should keep the current value.";
- obj.cursorPosition = 20;
- compare(obj.cursorPosition, 5, message);
-
- var message =
- "Cursor position should be added by one after each character input.";
- obj.forceActiveFocus();
- var pos = obj.cursorPosition;
- keyClick(Qt.Key_T);
- keyClick(Qt.Key_E);
- keyClick(Qt.Key_S);
- keyClick(Qt.Key_T);
- compare(obj.cursorPosition, pos + 4, message);
- }
-
- function test_readOnly() {
- var message =
- "Setting readOnly to true should prevent any modification in the text property.";
- obj.text = "Test123";
- obj.readOnly = true;
- obj.text = "123Test";
- expectFail("", message); // XXX: See QTBUG-15257
- compare(obj.text, "Test123", message);
- obj.text = "";
- compare(obj.text, "Test123", message);
-
- message =
- "Setting readOnly to false should allow modifications in the text property.";
- obj.readOnly = false;
- obj.text = "123Test";
- compare(obj.text, "123Test", message);
- }
-
- function test_select() {}
- function test_selectWord() {}
- function test_selectAll() {}
- function test_selectionStart() {}
- function test_selectionEnd() {}
- function test_selectedText() {
- var message =
- "Calling select() method using a valid text range should set selectedText to the " +
- "text within this range. selectionStart and selectionEnd should also be " +
- "updated properly.";
- obj.text = "Test 1234";
- obj.select(0, 4);
- compare(obj.selectedText, "Test", message);
- compare(obj.selectionStart, 0, message);
- compare(obj.selectionEnd, 4, message);
- obj.select(5, 9);
- compare(obj.selectedText, "1234", message);
- compare(obj.selectionStart, 5, message);
- compare(obj.selectionEnd, 9, message);
- obj.select(0, 9);
- compare(obj.selectedText, "Test 1234", message);
- compare(obj.selectionStart, 0, message);
- compare(obj.selectionEnd, 9, message);
- obj.select(5, 5);
- compare(obj.selectedText, "", message);
- compare(obj.selectionStart, 5, message);
- compare(obj.selectionEnd, 5, message);
- obj.select(0, 0);
- compare(obj.selectedText, "", message);
- compare(obj.selectionStart, 0, message);
- compare(obj.selectionEnd, 0, message);
-
- message =
- "Using select() with an invalid range (i.e beyond the text size) should keep " +
- "the previous valid selectedText and range. In other words, should do nothing.";
- obj.text = "Test 1234";
- obj.select(0, 20);
- compare(obj.selectedText, "", message);
- compare(obj.selectionStart, 0, message);
- compare(obj.selectionEnd, 0, message);
- obj.select(0, 4);
- obj.select(0, 50);
- compare(obj.selectedText, "Test", message);
- compare(obj.selectionStart, 0, message);
- compare(obj.selectionEnd, 4, message);
-
- message =
- "Using selectAll() should select the entiry text, ranging from zero to length.";
- obj.text = "Test 1234";
- obj.selectAll();
- compare(obj.selectedText, "Test 1234", message);
- compare(obj.selectionStart, 0, message);
- compare(obj.selectionEnd, obj.text.length, message);
-
- message =
- "selectWord() will select the first word nearest to the cursor position. If " +
- "a word is partially selected, it should select this word. If more than one word are " +
- "selected, it should select the last word (because in this situation, the cursor is " +
- "positioned in the end of the selection).";
- obj.text = "Test 1234 ABC";
- obj.cursorPosition = 0;
- obj.selectWord();
- compare(obj.selectedText, "Test", message);
- obj.select(5, 7);
- obj.selectWord();
- compare(obj.selectedText, "1234", message);
- obj.selectAll();
- obj.selectWord();
- compare(obj.selectedText, "ABC", message);
-
- message =
- "If text property is changed when some text is selected, selection should reset " +
- "to nothing.";
- obj.text = "Test 123";
- obj.selectAll();
- obj.text = "ABC";
- compare(obj.selectedText, "", message);
- compare(obj.selectionStart, 0, message);
- compare(obj.selectionEnd, 0, message);
-
- message =
- "Moving the cursor by pressing arrow keys should remove text selection.";
- obj.forceActiveFocus();
- obj.text = "Test 123";
- obj.selectAll();
- keyClick(Qt.Key_Left);
- compare(obj.selectedText, "", message);
- }
-
- function test_text() {
- var message =
- "Focused TextInput should handle key input and change the contents of text " +
- "property accordingly. This test is closely related with focus and might fail " +
- "if forceActiveFocus() is not working properly.";
- obj.forceActiveFocus();
- obj.text = "";
- keyClick(Qt.Key_T);
- keyClick(Qt.Key_E);
- keyClick(Qt.Key_S);
- keyClick(Qt.Key_T);
- compare(obj.text, "test", message);
- keyClick(Qt.Key_Backspace);
- compare(obj.text, "tes", message);
- obj.text = "";
- compare(obj.text, "", message);
- }
-
- function test_copy() {}
- function test_cut() {}
- function test_paste() {
- var message =
- "Cutting a selected text should remove the text from TextInput and store " +
- "the clipboard.";
- obj.text = "Test 123";
- obj.selectAll();
- obj.cut();
- compare(obj.text, "", message);
-
- var message =
- "This test verifies the if pasting the clipboard content on an empty " +
- "TextInput works.";
- obj.paste();
- compare(obj.text, "Test 123", message);
-
- var message =
- "Copy should copy the selected area to clipboard without removing from " +
- "TextInput. By pasting when some text is selected, should overwrite it's " +
- "contents.";
- obj.select(0, 4);
- obj.copy();
- obj.select(4, 8);
- obj.paste();
- compare(obj.text, "TestTest", message);
-
- var message =
- "Pasting the clipboard contents when the cursor is positionated on the end " +
- "of the TextInput should append to the current content. It assumes that the " +
- "previous tests sets the position of the cursor to the end of the line.";
- obj.paste();
- compare(obj.text, "TestTestTest", message);
- }
-
- function test_positionAt() {}
- function test_positionToRectangle() {
- var message =
- "Testing if positionToRectangle() and positionAt() are coherent, since this " +
- "functional test will not rely on position coordinates and font metrics.";
- obj.text = "Test 123";
- var rect = obj.positionToRectangle(0);
- compare(obj.positionAt(rect.x, rect.y), 0, message);
- var rect = obj.positionToRectangle(5);
- compare(obj.positionAt(rect.x, rect.y), 5, message);
- var rect = obj.positionToRectangle(8);
- compare(obj.positionAt(rect.x, rect.y), 8, message);
- }
-
- function test_echoMode() {
- var message =
- "Since we can't really verify if by setting an echoMode something is being " +
- "reflected on the UI, this test verifies if all echoMode's are supported.";
- obj.echoMode = TextInput.Password;
- compare(obj.echoMode, TextInput.Password, message);
- obj.echoMode = TextInput.NoEcho;
- compare(obj.echoMode, TextInput.NoEcho, message);
- obj.echoMode = TextInput.PasswordEchoOnEdit;
- compare(obj.echoMode, TextInput.PasswordEchoOnEdit, message);
- obj.echoMode = TextInput.Normal;
- compare(obj.echoMode, TextInput.Normal, message);
- }
-
- function test_placeholderText() {
- var message =
- "Since we can't really verify if by setting an echoMode something is being " +
- "reflected on the UI, this test verifies if all echoMode's are supported.";
- obj.echoMode = TextInput.Password;
- compare(obj.echoMode, TextInput.Password, message);
- obj.echoMode = TextInput.NoEcho;
- compare(obj.echoMode, TextInput.NoEcho, message);
- obj.echoMode = TextInput.PasswordEchoOnEdit;
- compare(obj.echoMode, TextInput.PasswordEchoOnEdit, message);
- obj.echoMode = TextInput.Normal;
- compare(obj.echoMode, TextInput.Normal, message);
- }
-
- IntValidator {
- id: validator
-
- bottom: 0
- top: 400
- }
-
- function test_acceptableInput() {}
- function test_validator() {
- var message =
- "Setting a validator should immediately validate the current text.";
- compare(obj.acceptableInput, true, message);
- obj.validator = validator;
-
- var message =
- "All changes on text property or the validator parameters should " +
- "reflect on acceptableInput.";
- compare(obj.acceptableInput, false, message);
- obj.text = "test123";
- compare(obj.acceptableInput, false, message);
- obj.text = "123";
- compare(obj.acceptableInput, true, message);
- validator.top = 100;
- compare(obj.acceptableInput, false, message);
-
- var message =
- "Removing the validator should set the acceptableInput to true.";
- obj.validator = null;
- compare(obj.acceptableInput, true, message);
- }
-
- function test_inputMask() {
- var message =
- "Setting a input mask with some existing text should validated the text.";
- obj.text = "Test123";
- obj.inputMask = "aaaaaaa";
- compare(obj.text, "Test", message);
- obj.inputMask = "aaaaaaa";
- compare(obj.text, "Test", message);
- obj.inputMask = "0000000";
- compare(obj.text, "", message);
-
- var message =
- "Text input should respect the existing mask.";
- obj.text = "";
- obj.inputMask = "AAAA";
- obj.forceActiveFocus();
- keyClick(Qt.Key_T);
- keyClick(Qt.Key_1);
- keyClick(Qt.Key_E);
- keyClick(Qt.Key_2);
- keyClick(Qt.Key_S);
- keyClick(Qt.Key_3);
- keyClick(Qt.Key_T);
- keyClick(Qt.Key_4);
- compare(obj.text, "test", message);
- }
-}
diff --git a/tests/benchmarks/BasicButtonBenchmark.qml b/tests/benchmarks/BasicButtonBenchmark.qml
deleted file mode 100644
index 95caac2b..00000000
--- a/tests/benchmarks/BasicButtonBenchmark.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-import QtQuick 1.0
-import QmlTime 1.0 as QmlTime
-import "../../components" as QtComponents
-
-Item {
- QmlTime.Timer {
- component: QtComponents.BasicButton { }
- }
-}
diff --git a/tests/benchmarks/BenchmarkResults.txt b/tests/benchmarks/BenchmarkResults.txt
deleted file mode 100644
index 62f7d56f..00000000
--- a/tests/benchmarks/BenchmarkResults.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-Each of these tests should be run with qmltime, available from
-$QTDIR/tests/benchmarks/declarative/qmltime/
-
-Run (ms): (1)
-
-Button 7.5-8.4
-ButtonBlock 32.9-35.8
-BusyIndicator 0.56
-CheckBox 1.9-2.0
-ChoiceList 7.4-7.8
-MultiLineEdit 6.6-6.7
-ProgressBar 1.4-1.5
-RadioButton 2.0
-Slider 4.3-4.5
-SpinBox 4.8
-Switch 3.7
-
-
-Runs:
-(1) 30 Nov 2010 on Mathias Malmqvist's laptop, at SHA 272fb975124d57e4561d7a714d123339559fad2b
diff --git a/tests/benchmarks/BusyIndicatorBenchmark.qml b/tests/benchmarks/BusyIndicatorBenchmark.qml
deleted file mode 100644
index 182ba37d..00000000
--- a/tests/benchmarks/BusyIndicatorBenchmark.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-import QtQuick 1.0
-import QmlTime 1.0 as QmlTime
-import "../../components" as QtComponents
-
-Item {
- QmlTime.Timer {
- component: QtComponents.BusyIndicator { }
- }
-}
diff --git a/tests/benchmarks/ButtonBenchmark.qml b/tests/benchmarks/ButtonBenchmark.qml
deleted file mode 100644
index 1b68e097..00000000
--- a/tests/benchmarks/ButtonBenchmark.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-import QtQuick 1.0
-import QmlTime 1.0 as QmlTime
-import "../../components" as QtComponents
-
-Item {
- QmlTime.Timer {
- component: QtComponents.Button { text: "Button" }
- }
-}
diff --git a/tests/benchmarks/ButtonBlockBenchmark.qml b/tests/benchmarks/ButtonBlockBenchmark.qml
deleted file mode 100644
index eafe2f0f..00000000
--- a/tests/benchmarks/ButtonBlockBenchmark.qml
+++ /dev/null
@@ -1,15 +0,0 @@
-import QtQuick 1.0
-import QmlTime 1.0 as QmlTime
-import "../../components" as QtComponents
-
-Item {
- QmlTime.Timer {
- component: QtComponents.ButtonBlock {
- model: ListModel {
- ListElement { text: "Button A" }
- ListElement { text: "Button B" }
- ListElement { text: "Button C" }
- }
- }
- }
-}
diff --git a/tests/benchmarks/ButtonColumnBenchmark.qml b/tests/benchmarks/ButtonColumnBenchmark.qml
deleted file mode 100644
index e03e7ad1..00000000
--- a/tests/benchmarks/ButtonColumnBenchmark.qml
+++ /dev/null
@@ -1,13 +0,0 @@
-import QtQuick 1.0
-import QmlTime 1.0 as QmlTime
-import "../../components" as QtComponents
-
-Item {
- QmlTime.Timer {
- component: QtComponents.ButtonColumn {
- QtComponents.Button { text: "Button A" }
- QtComponents.Button { text: "Buttom B" }
- QtComponents.Button { text: "Bottom C" }
- }
- }
-}
diff --git a/tests/benchmarks/ButtonRowBenchmark.qml b/tests/benchmarks/ButtonRowBenchmark.qml
deleted file mode 100644
index ebe88494..00000000
--- a/tests/benchmarks/ButtonRowBenchmark.qml
+++ /dev/null
@@ -1,13 +0,0 @@
-import QtQuick 1.0
-import QmlTime 1.0 as QmlTime
-import "../../components" as QtComponents
-
-Item {
- QmlTime.Timer {
- component: QtComponents.ButtonRow {
- QtComponents.Button { text: "Button A" }
- QtComponents.Button { text: "Buttom B" }
- QtComponents.Button { text: "Bottom C" }
- }
- }
-}
diff --git a/tests/benchmarks/CheckBoxBenchmark.qml b/tests/benchmarks/CheckBoxBenchmark.qml
deleted file mode 100644
index 7d7a3ae7..00000000
--- a/tests/benchmarks/CheckBoxBenchmark.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-import QtQuick 1.0
-import QmlTime 1.0 as QmlTime
-import "../../components" as QtComponents
-
-Item {
- QmlTime.Timer {
- component: QtComponents.CheckBox { }
- }
-}
diff --git a/tests/benchmarks/ChoiceListBenchmark.qml b/tests/benchmarks/ChoiceListBenchmark.qml
deleted file mode 100644
index 6176004c..00000000
--- a/tests/benchmarks/ChoiceListBenchmark.qml
+++ /dev/null
@@ -1,23 +0,0 @@
-import QtQuick 1.0
-import QmlTime 1.0 as QmlTime
-import "../../components" as QtComponents
-
-Item {
- property variant choiceListModel: ListModel {
- ListElement { content: "Choice One" }
- ListElement { content: "Choice Two" }
- ListElement { content: "Choice Three" }
- ListElement { content: "Choice Four" }
- ListElement { content: "Choice Five" }
- ListElement { content: "Choice Six" }
- ListElement { content: "Choice Seven" }
- ListElement { content: "Choice Eight" }
- }
-
- QmlTime.Timer {
- component: QtComponents.ChoiceList {
- model: choiceListModel
-// delegate:
- }
- }
-}
diff --git a/tests/benchmarks/ProgressBarBenchmark.qml b/tests/benchmarks/ProgressBarBenchmark.qml
deleted file mode 100644
index 80fc9504..00000000
--- a/tests/benchmarks/ProgressBarBenchmark.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-import QtQuick 1.0
-import QmlTime 1.0 as QmlTime
-import "../../components" as QtComponents
-
-Item {
- QmlTime.Timer {
- component: QtComponents.ProgressBar { }
- }
-}
diff --git a/tests/benchmarks/RadioButtonBenchmark.qml b/tests/benchmarks/RadioButtonBenchmark.qml
deleted file mode 100644
index af33ee07..00000000
--- a/tests/benchmarks/RadioButtonBenchmark.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-import QtQuick 1.0
-import QmlTime 1.0 as QmlTime
-import "../../components" as QtComponents
-
-Item {
- QmlTime.Timer {
- component: QtComponents.RadioButton { }
- }
-}
diff --git a/tests/benchmarks/ScrollDecoratorBenchmark.qml b/tests/benchmarks/ScrollDecoratorBenchmark.qml
deleted file mode 100644
index ce8a272f..00000000
--- a/tests/benchmarks/ScrollDecoratorBenchmark.qml
+++ /dev/null
@@ -1,11 +0,0 @@
-import QtQuick 1.0
-import QmlTime 1.0 as QmlTime
-import "../../components" as QtComponents
-
-Item {
- GridView { id: gridView }
-
- QmlTime.Timer {
- component: QtComponents.ScrollDecorator { flickableItem: gridView }
- }
-}
diff --git a/tests/benchmarks/ScrollIndicatorBenchmark.qml b/tests/benchmarks/ScrollIndicatorBenchmark.qml
deleted file mode 100644
index 76ea5479..00000000
--- a/tests/benchmarks/ScrollIndicatorBenchmark.qml
+++ /dev/null
@@ -1,12 +0,0 @@
-import QtQuick 1.0
-import QmlTime 1.0 as QmlTime
-import "../../components" as QtComponents
-
-Item {
- GridView { id: gridView }
-
- QmlTime.Timer {
- component: Item { QtComponents.ScrollIndicator { scrollItem: gridView }
- }
- }
-}
diff --git a/tests/benchmarks/SliderBenchmark.qml b/tests/benchmarks/SliderBenchmark.qml
deleted file mode 100644
index fc8b935a..00000000
--- a/tests/benchmarks/SliderBenchmark.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-import QtQuick 1.0
-import QmlTime 1.0 as QmlTime
-import "../../components" as QtComponents
-
-Item {
- QmlTime.Timer {
- component: QtComponents.Slider { }
- }
-}
diff --git a/tests/benchmarks/SpinBoxBenchmark.qml b/tests/benchmarks/SpinBoxBenchmark.qml
deleted file mode 100644
index 9802793a..00000000
--- a/tests/benchmarks/SpinBoxBenchmark.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-import QtQuick 1.0
-import QmlTime 1.0 as QmlTime
-import "../../components" as QtComponents
-
-Item {
- QmlTime.Timer {
- component: QtComponents.SpinBox { }
- }
-}
diff --git a/tests/benchmarks/SwitchBenchmark.qml b/tests/benchmarks/SwitchBenchmark.qml
deleted file mode 100644
index 70394836..00000000
--- a/tests/benchmarks/SwitchBenchmark.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-import QtQuick 1.0
-import QmlTime 1.0 as QmlTime
-import "../../components" as QtComponents
-
-Item {
- QmlTime.Timer {
- component: QtComponents.Switch { }
- }
-}
diff --git a/tests/benchmarks/TextAreaBenchmark.qml b/tests/benchmarks/TextAreaBenchmark.qml
deleted file mode 100644
index a7ddf0c1..00000000
--- a/tests/benchmarks/TextAreaBenchmark.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-import QtQuick 1.0
-import QmlTime 1.0 as QmlTime
-import "../../components" as QtComponents
-
-Item {
- QmlTime.Timer {
- component: QtComponents.TextArea { text: "This is the text being edited" }
- }
-}
diff --git a/tests/benchmarks/TextFieldBenchmark.qml b/tests/benchmarks/TextFieldBenchmark.qml
deleted file mode 100644
index 38309ad2..00000000
--- a/tests/benchmarks/TextFieldBenchmark.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-import QtQuick 1.0
-import QmlTime 1.0 as QmlTime
-import "../../components" as QtComponents
-
-Item {
- QmlTime.Timer {
- component: QtComponents.TextField { text: "This is the text being edited" }
- }
-}