@@ -104,9 +104,15 @@ function getTestBrowserInfo(browserString, path) {
104
104
return info ;
105
105
}
106
106
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 ) ;
110
116
var querystring = qs . stringify ( {
111
117
_worker_key : worker_key ,
112
118
_browser_string : browser_string
@@ -131,7 +137,7 @@ function launchBrowser(browser, path) {
131
137
var browserInfo = getTestBrowserInfo ( browserString , path ) ;
132
138
logger . debug ( '[%s] Launching' , browserInfo ) ;
133
139
134
- browser . url = buildTestUrl ( path . replace ( / \\ / g, '/' ) , key , browserString ) ;
140
+ browser . url = buildTestUrl ( path . replace ( / \\ / g, '/' ) , key , browser ) ;
135
141
136
142
if ( config . project ) {
137
143
browser . project = config . project ;
@@ -195,7 +201,7 @@ function attachWorkerHelpers(worker) {
195
201
196
202
worker . buildUrl = function buildUrl ( test_path ) {
197
203
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 ) ;
199
205
logger . trace ( '[%s] worker.buildUrl: %s' , this . id , url ) ;
200
206
return url ;
201
207
} ;
0 commit comments