Remove "All rights reserved" line from license headers.
[profile/ivi/qtdeclarative.git] / tests / system / sys_text.qtt
1 /****************************************************************************
2 **
3 ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/
5 **
6 ** This file is part of the test suite of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** GNU Lesser General Public License Usage
10 ** This file may be used under the terms of the GNU Lesser General Public
11 ** License version 2.1 as published by the Free Software Foundation and
12 ** appearing in the file LICENSE.LGPL included in the packaging of this
13 ** file. Please review the following information to ensure the GNU Lesser
14 ** General Public License version 2.1 requirements will be met:
15 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
16 **
17 ** In addition, as a special exception, Nokia gives you certain additional
18 ** rights. These rights are described in the Nokia Qt LGPL Exception
19 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
20 **
21 ** GNU General Public License Usage
22 ** Alternatively, this file may be used under the terms of the GNU General
23 ** Public License version 3.0 as published by the Free Software Foundation
24 ** and appearing in the file LICENSE.GPL included in the packaging of this
25 ** file. Please review the following information to ensure the GNU General
26 ** Public License version 3.0 requirements will be met:
27 ** http://www.gnu.org/copyleft/gpl.html.
28 **
29 ** Other Usage
30 ** Alternatively, this file may be used in accordance with the terms and
31 ** conditions contained in a signed written agreement between you and Nokia.
32 **
33 **
34 **
35 **
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41
42 //TESTED_COMPONENT=qtdeclarative
43
44 testcase = {
45
46     text_formatting_data: {
47         // Text type, autotext, plain text, rich text, styled text
48         BasicText: ["Basic","plain, unformatted red text","plain, unformatted red text","plain, unformatted red text","plain, unformatted red text"],
49         Rich: ["Rich","bold style","surrounding b,/b tags and no formatting","bold style","bold style"]
50     },
51
52     text_formatting: function(texttype,autoformat,plainformat,richformat,styledformat) {
53         // Test Meta-data
54         testTitle = "Text Formats";
55         testBinary = "qmlscene tests/testapplications/text/text.qml";
56         testGoal = "Verify that text shows correctly when displayed in different formats";
57         testPreconditions = "None";
58         testGroups = "BAT";
59
60         // Test Steps
61         prompt(twiki('---+++ ' + testTitle + '<br><br>
62         *Goal:* ' + testGoal + '<br>
63         *Pre-Requisites:* ' + testPreconditions + '<br>
64         *Tested Binary:* ' + testBinary + '<br>
65     | *Step* | *Verification* |
66     | Run ' + testBinary + ' | Verify that the Text application is displayed |
67     | Select Text: '+texttype+', Format: AutoText controls | A single line of text is shown |
68     | | Qt Quick should be rendered with '+autoformat+' |
69     | Select the Wrap: Word option | A block of text is shown |
70     | Select the Format: PlainText option | Qt Quick should be shown with '+plainformat+' |
71     | Select the Format: RichText option | Qt Quick should be shown with '+richformat+' |
72     | Select the Format: StyledText option | Qt Quick should be shown with '+styledformat+' |'));
73     },
74
75     text_wrapping_data: {
76         // Text type, No wrap, word wrap, wrap anywhere, auto wrap
77         Basic: ["Basic",
78             "two lines, wrapped at the newline (Qt Quick consists...)",
79             "many lines, with no broken words",
80             "many lines, words broken at the text boundary",
81             "many lines, with no broken words"],
82         Long: ["Long",
83             "one lone line",
84             "two lines, wrapped at the - (topboxesand...),",
85             "many lines, wrapped at the boundary",
86             "many lines, wrapped at the boundary, and specifically the - in set-top"],
87         Rich: ["Rich",
88             "two lines, wrapped at the break (Qt Quick consists...)",
89             "many lines, with no broken words",
90             "many lines, words broken at the text boundary",
91             "many lines, with no broken words"]
92     },
93
94     text_wrapping: function(texttype,noWrap,wordWrap,anywhereWrap,autoWrap) {
95         // Test Meta-data
96         testTitle = "Wrap Modes";
97         testBinary = "qmlscene tests/testapplications/text/text.qml";
98         testGoal = "Verify that text wraps correctly with different wrap methods and text formats";
99         testPreconditions = "None";
100         testGroups = "BAT";
101
102         // Test Steps
103         prompt(twiki('---+++ ' + testTitle + '<br><br>
104         *Goal:* ' + testGoal + '<br>
105         *Pre-Requisites:* ' + testPreconditions + '<br>
106         *Tested Binary:* ' + testBinary + '<br>
107     | *Step* | *Verification* |
108     | Run ' + testBinary + ' | Verify that the Text application is displayed |
109     | Select Text: '+texttype+', Format: AutoText controls | Verify '+noWrap+' is displayed |
110     | Select the Wrap: Word option | Verify '+wordWrap+' is displayed |
111     | Select the Wrap: Anywhere option | Verify '+anywhereWrap+' is displayed |
112     | Select the Wrap: Auto option | Verify '+autoWrap+' is displayed |'));
113     },
114
115     text_styling_data: {
116         // Text type
117         Basic: ["Basic"],
118         Long: ["Long"],
119         Rich: ["Rich"]
120     },
121
122     text_styling: function(texttype) {
123         // Test Meta-data
124         testTitle = "Style Effects";
125         testBinary = "qmlscene tests/testapplications/text/text.qml";
126         testGoal = "Verify that styling (underline, strikeout etc) works as intended";
127         testPreconditions = "None";
128         testGroups = "BAT";
129
130         // Test Steps
131         prompt(twiki('---+++ ' + testTitle + '<br><br>
132         *Goal:* ' + testGoal + '<br>
133         *Pre-Requisites:* ' + testPreconditions + '<br>
134         *Tested Binary:* ' + testBinary + '<br>
135     | *Step* | *Verification* |
136     | Run ' + testBinary + ' | Verify that the Text application is displayed |
137     | Select Text: '+texttype+', Wrap: WordWrap | Verify the text is displayed, wrapped if necessary |
138     | Select the U_Line: On option | Verify an underline is drawn under each character |
139     | Select the Strike: On option | Verify a strikethrough is drawn through each character |
140     | Select the Style: Outline option | Verify each character is red and has a green outline around it |
141     | Select the SColor: Blue option | Verify each character is red and has a blue outline around it |
142     | Select the Style: Raised option | Verify each character is red and has a blue shadow behind and below it |
143     | Select the Style: Sunken option | Verify each character is red and has a blue shadow behind and above it |'));
144     }
145 }