@@ -102,16 +102,16 @@ describe('Ionic Platform Service', function() {
102102 expect ( ionic . Platform . isAndroid ( ) ) . toEqual ( true ) ;
103103 } ) ;
104104
105- it ( 'is Cordova ' , function ( ) {
106- expect ( ionic . Platform . isCordova ( ) ) . toEqual ( false ) ;
105+ it ( 'is WebView ' , function ( ) {
106+ expect ( ionic . Platform . isWebView ( ) ) . toEqual ( false ) ;
107107 window . cordova = { } ;
108- expect ( ionic . Platform . isCordova ( ) ) . toEqual ( true ) ;
108+ expect ( ionic . Platform . isWebView ( ) ) . toEqual ( true ) ;
109109 delete window . cordova ;
110110 window . PhoneGap = { } ;
111- expect ( ionic . Platform . isCordova ( ) ) . toEqual ( true ) ;
111+ expect ( ionic . Platform . isWebView ( ) ) . toEqual ( true ) ;
112112 delete window . phonegap ;
113113 window . phonegap = { } ;
114- expect ( ionic . Platform . isCordova ( ) ) . toEqual ( true ) ;
114+ expect ( ionic . Platform . isWebView ( ) ) . toEqual ( true ) ;
115115 } ) ;
116116
117117 it ( 'sets ios platforms' , function ( ) {
@@ -121,10 +121,11 @@ describe('Ionic Platform Service', function() {
121121
122122 ionic . Platform . _checkPlatforms ( )
123123
124- expect ( ionic . Platform . platforms [ 0 ] ) . toEqual ( 'cordova' ) ;
125- expect ( ionic . Platform . platforms [ 1 ] ) . toEqual ( 'ios' ) ;
126- expect ( ionic . Platform . platforms [ 2 ] ) . toEqual ( 'ios7' ) ;
127- expect ( ionic . Platform . platforms [ 3 ] ) . toEqual ( 'ios7_0' ) ;
124+ expect ( ionic . Platform . platforms [ 0 ] ) . toEqual ( 'webview' ) ;
125+ expect ( ionic . Platform . platforms [ 1 ] ) . toEqual ( 'cordova' ) ;
126+ expect ( ionic . Platform . platforms [ 2 ] ) . toEqual ( 'ios' ) ;
127+ expect ( ionic . Platform . platforms [ 3 ] ) . toEqual ( 'ios7' ) ;
128+ expect ( ionic . Platform . platforms [ 4 ] ) . toEqual ( 'ios7_0' ) ;
128129 } ) ;
129130
130131 it ( 'sets android platforms' , function ( ) {
@@ -134,21 +135,23 @@ describe('Ionic Platform Service', function() {
134135
135136 ionic . Platform . _checkPlatforms ( )
136137
137- expect ( ionic . Platform . platforms [ 0 ] ) . toEqual ( 'cordova' ) ;
138- expect ( ionic . Platform . platforms [ 1 ] ) . toEqual ( 'android' ) ;
139- expect ( ionic . Platform . platforms [ 2 ] ) . toEqual ( 'android4' ) ;
140- expect ( ionic . Platform . platforms [ 3 ] ) . toEqual ( 'android4_2' ) ;
138+ expect ( ionic . Platform . platforms [ 0 ] ) . toEqual ( 'webview' ) ;
139+ expect ( ionic . Platform . platforms [ 1 ] ) . toEqual ( 'cordova' ) ;
140+ expect ( ionic . Platform . platforms [ 2 ] ) . toEqual ( 'android' ) ;
141+ expect ( ionic . Platform . platforms [ 3 ] ) . toEqual ( 'android4' ) ;
142+ expect ( ionic . Platform . platforms [ 4 ] ) . toEqual ( 'android4_2' ) ;
141143 } ) ;
142144
143- it ( 'should only set the cordova ' , function ( ) {
145+ it ( 'should only set the webview ' , function ( ) {
144146 window . cordova = { } ;
145147 ionic . Platform . setPlatform ( '' ) ;
146148 ionic . Platform . setVersion ( '' ) ;
147149
148150 ionic . Platform . _checkPlatforms ( )
149151
150- expect ( ionic . Platform . platforms . length ) . toEqual ( 1 ) ;
151- expect ( ionic . Platform . platforms [ 0 ] ) . toEqual ( 'cordova' ) ;
152+ expect ( ionic . Platform . platforms . length ) . toEqual ( 2 ) ;
153+ expect ( ionic . Platform . platforms [ 0 ] ) . toEqual ( 'webview' ) ;
154+ expect ( ionic . Platform . platforms [ 1 ] ) . toEqual ( 'cordova' ) ;
152155 } ) ;
153156
154157 it ( 'should not set any platform' , function ( ) {
0 commit comments