summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Bache-Wiig <jens.bache-wiig@digia.com>2013-02-17 10:51:28 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-17 10:53:37 +0100
commitcf6a0a15ebab8a2f89178584d41cf4d87b74602d (patch)
tree99110672ffb650d4a67a78e4c469ee0ae976fd82
parent1c0170d4e5591be8d92e8f612b7d253952032eb8 (diff)
downloadqtquickcontrols-cf6a0a15ebab8a2f89178584d41cf4d87b74602d.tar.gz
Add trivial test case for applicationwindow
Change-Id: I1ff1d35e62f3a86b873fef53bf86215b4c4965e5 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
-rw-r--r--tests/auto/qtdesktop/data/tst_applicationwindow.qml58
-rw-r--r--tests/auto/qtdesktop/qtdesktop.pro3
2 files changed, 60 insertions, 1 deletions
diff --git a/tests/auto/qtdesktop/data/tst_applicationwindow.qml b/tests/auto/qtdesktop/data/tst_applicationwindow.qml
new file mode 100644
index 00000000..2366bf48
--- /dev/null
+++ b/tests/auto/qtdesktop/data/tst_applicationwindow.qml
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Components project.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtTest 1.0
+
+TestCase {
+ id: testCase
+ name: "Tests_ApplicationWindow"
+ when:windowShown
+ width:400
+ height:400
+
+ function test_window() {
+ var tmp = Qt.createQmlObject('import QtDesktop 1.0; ApplicationWindow {id: window}', testCase, '');
+ tmp.statusBar = Qt.createQmlObject('import QtDesktop 1.0; StatusBar {}', testCase, '');
+ tmp.toolBar = Qt.createQmlObject('import QtDesktop 1.0; ToolBar {}', testCase, '');
+ verify(tmp.statusBar !== undefined)
+ verify(tmp.toolBar !== undefined)
+ }
+}
diff --git a/tests/auto/qtdesktop/qtdesktop.pro b/tests/auto/qtdesktop/qtdesktop.pro
index 11db4720..050834ce 100644
--- a/tests/auto/qtdesktop/qtdesktop.pro
+++ b/tests/auto/qtdesktop/qtdesktop.pro
@@ -21,6 +21,7 @@ OTHER_FILES += \
$$PWD/data/tst_scrollarea.qml \
$$PWD/data/tst_menu.qml \
$$PWD/data/tst_textfield.qml \
- $$PWD/data/tst_textarea.qml
+ $$PWD/data/tst_textarea.qml \
+ $$PWD/data/tst_applicationwindow.qml
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0