@@ -104,9 +104,15 @@ function getTestBrowserInfo(browserString, path) {
104104 return info ;
105105}
106106
107- function buildTestUrl ( test_path , worker_key , browser_string ) {
108- var url = 'http://localhost:' + config . test_server_port + '/' + test_path ;
109-
107+ function buildTestUrl ( test_path , worker_key , browser ) {
108+ var host ;
109+ if ( browser . os . toLowerCase ( ) === 'ios' ) {
110+ host = 'bs-local.com' ;
111+ } else {
112+ host = 'localhost' ;
113+ }
114+ var url = 'http://' + host + ':' + config . test_server_port + '/' + test_path ;
115+ var browser_string = utils . browserString ( browser ) ;
110116 var querystring = qs . stringify ( {
111117 _worker_key : worker_key ,
112118 _browser_string : browser_string
@@ -131,7 +137,7 @@ function launchBrowser(browser, path) {
131137 var browserInfo = getTestBrowserInfo ( browserString , path ) ;
132138 logger . debug ( '[%s] Launching' , browserInfo ) ;
133139
134- browser . url = buildTestUrl ( path . replace ( / \\ / g, '/' ) , key , browserString ) ;
140+ browser . url = buildTestUrl ( path . replace ( / \\ / g, '/' ) , key , browser ) ;
135141
136142 if ( config . project ) {
137143 browser . project = config . project ;
@@ -195,7 +201,7 @@ function attachWorkerHelpers(worker) {
195201
196202 worker . buildUrl = function buildUrl ( test_path ) {
197203 var workerKey = workerKeys [ this . id ] ? workerKeys [ this . id ] . key : null ;
198- var url = buildTestUrl ( test_path || this . test_path , workerKey , this . getTestBrowserInfo ( ) ) ;
204+ var url = buildTestUrl ( test_path || this . test_path , workerKey , this . config ) ;
199205 logger . trace ( '[%s] worker.buildUrl: %s' , this . id , url ) ;
200206 return url ;
201207 } ;
0 commit comments