@@ -20,7 +20,6 @@ goog.setTestOnly('firebaseui.auth.data.countryTest');
2020
2121goog . require ( 'firebaseui.auth.data.country' ) ;
2222goog . require ( 'firebaseui.auth.data.country.LookupTree' ) ;
23- goog . require ( 'goog.array' ) ;
2423goog . require ( 'goog.testing.jsunit' ) ;
2524goog . require ( 'goog.userAgent' ) ;
2625goog . require ( 'goog.userAgent.product' ) ;
@@ -33,16 +32,11 @@ goog.require('goog.userAgent.product');
3332 * @param {string } locale
3433 */
3534function assertSortCountryListForLocale ( sortedNames , inputNames , locale ) {
36- var countryList = goog . array . map ( inputNames , function ( name ) {
37- return {
38- name : name ,
39- e164_key : '' ,
40- e164_cc : '' ,
41- iso2_cc : ''
42- } ;
35+ var countryList = inputNames . map ( function ( name ) {
36+ return { name : name , e164_key : '' , e164_cc : '' , iso2_cc : '' } ;
4337 } ) ;
4438 firebaseui . auth . data . country . sortCountryListForLocale ( countryList , locale ) ;
45- var actualSortedNames = goog . array . map ( countryList , function ( country ) {
39+ var actualSortedNames = countryList . map ( function ( country ) {
4640 return country . name ;
4741 } ) ;
4842 assertArrayEquals ( sortedNames , actualSortedNames ) ;
@@ -55,7 +49,7 @@ function assertSortCountryListForLocale(sortedNames, inputNames, locale) {
5549 * @return {!Array<string> } List of country iso2_cc names.
5650 */
5751function getCountryCodesForList ( countries ) {
58- return goog . array . map ( countries , function ( country ) {
52+ return countries . map ( function ( country ) {
5953 return country . iso2_cc ;
6054 } ) ;
6155}
@@ -158,7 +152,7 @@ function testGetCountriesByIso2() {
158152 */
159153function testGetCountriesByIso2_multipleMatches ( ) {
160154 var countries = firebaseui . auth . data . country . getCountriesByIso2 ( 'xk' ) ;
161- var actualCodes = goog . array . map ( countries , function ( country ) {
155+ var actualCodes = countries . map ( function ( country ) {
162156 return country . e164_cc ;
163157 } ) ;
164158 assertSameElements ( [ '377' , '381' , '386' ] , actualCodes ) ;
@@ -185,7 +179,7 @@ function testGetCountriesByE164Code() {
185179 */
186180function testGetCountriesByE164Code_multipleMatches ( ) {
187181 var countries = firebaseui . auth . data . country . getCountriesByE164Code ( '44' ) ;
188- var actualKeys = goog . array . map ( countries , function ( country ) {
182+ var actualKeys = countries . map ( function ( country ) {
189183 return country . e164_key ;
190184 } ) ;
191185 assertSameElements ( [ '44-GG-0' , '44-IM-0' , '44-JE-0' , '44-GB-0' ] , actualKeys ) ;
@@ -219,7 +213,7 @@ function testGetCountriesByE164eOrIsoCode_iso() {
219213function testGetCountriesByE164OrIsoCode_e164_multipleMatches ( ) {
220214 var countries =
221215 firebaseui . auth . data . country . getCountriesByE164OrIsoCode ( '+44' ) ;
222- var actualKeys = goog . array . map ( countries , function ( country ) {
216+ var actualKeys = countries . map ( function ( country ) {
223217 return country . e164_key ;
224218 } ) ;
225219 assertSameElements ( [ '44-GG-0' , '44-IM-0' , '44-JE-0' , '44-GB-0' ] , actualKeys ) ;
@@ -229,7 +223,7 @@ function testGetCountriesByE164OrIsoCode_e164_multipleMatches() {
229223function testGetCountriesByE164OrIsoCode_iso_multipleMatches ( ) {
230224 var countries =
231225 firebaseui . auth . data . country . getCountriesByE164OrIsoCode ( 'xk' ) ;
232- var actualKeys = goog . array . map ( countries , function ( country ) {
226+ var actualKeys = countries . map ( function ( country ) {
233227 return country . e164_key ;
234228 } ) ;
235229 assertSameElements ( [ '377-XK-0' , '381-XK-0' , '386-XK-0' ] , actualKeys ) ;
0 commit comments