2
* Copyright 2013 Canonical Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License as published by
6
* the Free Software Foundation; version 3.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19
import Ubuntu.Components 0.1
28
function initTestCase() {
29
compare(mainView.active, true, "MainView always active.");
30
compare(mainView.automaticOrientation, false, "Automatic orientation off by default.");
31
compare(mainView.applicationName, "", "Application name is empty string by default.");
34
function test_automaticOrientation() {
35
mainView.automaticOrientation = true;
36
compare(mainView.automaticOrientation, true, "Automatic orientation can be enabled.");
37
mainView.automaticOrientation = false;
38
compare(mainView.automaticOrientation, false, "Automaic orientation can be disabled.");
41
function test_applicationName() {
42
var appName = "testAppName";
43
mainView.applicationName = appName;
44
compare(mainView.applicationName, appName, "Applicatin name can be set.");
45
mainView.applicationName = "";
46
compare(mainView.applicationName, "", "Application name can be unset.");