File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
features/system-tests/step_definitions Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ defineSupportCode(function(context) {
5959
6060 Given ( 'a user agent equals to {string}' , function ( userAgent ) {
6161 this . win . navigator . userAgent = userAgent
62- this . browserUiState = new BrowserUiState ( this . win , Orientation . LANDSCAPE )
62+ this . browserUiState = new BrowserUiState ( Orientation . LANDSCAPE , this . win )
6363 this . win . orientation = 90
6464 } )
6565
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import OperaMiniIphoneStateProvider from './state-providers/opera-mini-iphone-st
1414import QqCnIphoneStateProvider from './state-providers/qq-cn-iphone-state-provider'
1515
1616class BrowserUiState {
17- constructor ( win = window , initialOrientation = null ) {
17+ constructor ( initialOrientation = null , win = window ) {
1818 this . _userAgentDetector = new UserAgentDetector ( win . navigator . userAgent )
1919
2020 switch ( this . _userAgentDetector . userAgent ) {
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ class BrowserUiStateDemo {
88 let initialOrientation = window . innerWidth > window . innerHeight ?
99 Orientation . LANDSCAPE : Orientation . PORTRAIT
1010
11- this . browserUiState = new BrowserUiState ( window , initialOrientation )
11+ this . browserUiState = new BrowserUiState ( initialOrientation , window )
1212
1313 window . addEventListener ( 'load' , ( ) => {
1414 this . updateUi ( )
You can’t perform that action at this time.
0 commit comments