-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TIMOB-25942] : iOS 11: Screen orientation not working in navigation …
…window (#10104) * [TIMOB-25942] : iOS 11: Screen orientation not working in navigation window * [TIMOB-25942] : Condition updated for ios 11 only
- Loading branch information
1 parent
33f2052
commit 863fae6
Showing
2 changed files
with
72 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* | ||
* Appcelerator Titanium Mobile | ||
* Copyright (c) 2011-Present by Appcelerator, Inc. All Rights Reserved. | ||
* Licensed under the terms of the Apache Public License | ||
* Please see the LICENSE included with this distribution for details. | ||
*/ | ||
/* eslint-env mocha */ | ||
/* global Ti */ | ||
/* eslint no-unused-expressions: "off" */ | ||
'use strict'; | ||
var should = require('./utilities/assertions'); | ||
|
||
describe('Titanium.UI.Window', function () { | ||
var win, | ||
rootWindow; | ||
|
||
this.timeout(5000); | ||
|
||
// Create and open a root window for the rest of the below child window tests to use as a parent. | ||
// We're not going to close this window until the end of this test suite. | ||
// Note: Android needs this so that closing the last window won't back us out of the app. | ||
before(function (finish) { | ||
rootWindow = Ti.UI.createWindow(); | ||
rootWindow.addEventListener('open', function () { | ||
finish(); | ||
}); | ||
rootWindow.open(); | ||
}); | ||
|
||
after(function (finish) { | ||
rootWindow.addEventListener('close', function () { | ||
finish(); | ||
}); | ||
rootWindow.close(); | ||
}); | ||
|
||
afterEach(function () { | ||
if (win) { | ||
win.close(); | ||
} | ||
win = null; | ||
}); | ||
|
||
it.ios('.statusBarStyle', function (finish) { | ||
win = Ti.UI.createWindow({ | ||
title: 'This is status bar style test', | ||
statusBarStyle: Ti.UI.iOS.StatusBar.LIGHT_CONTENT | ||
}); | ||
|
||
win.addEventListener('open', function () { | ||
try { | ||
should(win.statusBarStyle).be.a.Number; | ||
should(win.statusBarStyle).eql(Ti.UI.iOS.StatusBar.LIGHT_CONTENT); | ||
win.setStatusBarStyle(Ti.UI.iOS.StatusBar.GRAY); | ||
should(win.statusBarStyle).eql(Ti.UI.iOS.StatusBar.GRAY); | ||
finish(); | ||
} catch (err) { | ||
finish(err); | ||
} | ||
}); | ||
win.open(); | ||
}); | ||
}); |