@@ -97,7 +97,7 @@ describe('$httpBackend', function() {
9797 expect ( statusText ) . toBe ( ( ! msie || msie >= 10 ) ? 'OK' : '' ) ;
9898 } ) ;
9999
100- $backend ( 'GET' , '/url' , null , callback , { } , 2000 ) ;
100+ $backend ( 'GET' , '/url' , null , callback , { } , { timeout : 2000 } ) ;
101101 xhr = MockXhr . $$lastInstance ;
102102 spyOn ( xhr , 'abort' ) ;
103103
@@ -187,7 +187,7 @@ describe('$httpBackend', function() {
187187 expect ( response ) . toBe ( null ) ;
188188 expect ( headers ) . toBe ( null ) ;
189189 } ) ;
190- $backend ( 'GET' , '/url' , null , callback , { } , 2000 ) ;
190+ $backend ( 'GET' , '/url' , null , callback , { } , { timeout : 2000 } ) ;
191191 xhr = MockXhr . $$lastInstance ;
192192 spyOn ( xhr , 'abort' ) ;
193193
@@ -205,7 +205,7 @@ describe('$httpBackend', function() {
205205 expect ( status ) . toBe ( - 1 ) ;
206206 } ) ;
207207
208- $backend ( 'GET' , '/url' , null , callback , { } , 2000 ) ;
208+ $backend ( 'GET' , '/url' , null , callback , { } , { timeout : 2000 } ) ;
209209 xhr = MockXhr . $$lastInstance ;
210210 spyOn ( xhr , 'abort' ) ;
211211
@@ -226,7 +226,7 @@ describe('$httpBackend', function() {
226226 expect ( status ) . toBe ( - 1 ) ;
227227 } ) ;
228228
229- $backend ( 'GET' , '/url' , null , callback , { } , $timeout ( noop , 2000 ) ) ;
229+ $backend ( 'GET' , '/url' , null , callback , { } , { timeout : $timeout ( noop , 2000 ) } ) ;
230230 xhr = MockXhr . $$lastInstance ;
231231 spyOn ( xhr , 'abort' ) ;
232232
@@ -245,7 +245,7 @@ describe('$httpBackend', function() {
245245 expect ( status ) . toBe ( 200 ) ;
246246 } ) ;
247247
248- $backend ( 'GET' , '/url' , null , callback , { } , $timeout ( noop , 2000 ) ) ;
248+ $backend ( 'GET' , '/url' , null , callback , { } , { timeout : $timeout ( noop , 2000 ) } ) ;
249249 xhr = MockXhr . $$lastInstance ;
250250 spyOn ( xhr , 'abort' ) ;
251251
@@ -264,7 +264,7 @@ describe('$httpBackend', function() {
264264 expect ( status ) . toBe ( 200 ) ;
265265 } ) ;
266266
267- $backend ( 'GET' , '/url' , null , callback , { } , 2000 ) ;
267+ $backend ( 'GET' , '/url' , null , callback , { } , { timeout : 2000 } ) ;
268268 xhr = MockXhr . $$lastInstance ;
269269 spyOn ( xhr , 'abort' ) ;
270270
@@ -308,7 +308,7 @@ describe('$httpBackend', function() {
308308
309309
310310 it ( 'should set withCredentials' , function ( ) {
311- $backend ( 'GET' , '/some.url' , null , callback , { } , null , true ) ;
311+ $backend ( 'GET' , '/some.url' , null , callback , { } , { withCredentials : true } ) ;
312312 expect ( MockXhr . $$lastInstance . withCredentials ) . toBe ( true ) ;
313313 } ) ;
314314
@@ -321,7 +321,7 @@ describe('$httpBackend', function() {
321321 describe ( 'responseType' , function ( ) {
322322
323323 it ( 'should set responseType and return xhr.response' , function ( ) {
324- $backend ( 'GET' , '/whatever' , null , callback , { } , null , null , 'blob' ) ;
324+ $backend ( 'GET' , '/whatever' , null , callback , { } , { responseType : 'blob' } ) ;
325325
326326 var xhrInstance = MockXhr . $$lastInstance ;
327327 expect ( xhrInstance . responseType ) . toBe ( 'blob' ) ;
@@ -341,7 +341,7 @@ describe('$httpBackend', function() {
341341 it ( 'should read responseText if response was not defined' , function ( ) {
342342 // old browsers like IE8, don't support responseType, so they always respond with responseText
343343
344- $backend ( 'GET' , '/whatever' , null , callback , { } , null , null , 'blob' ) ;
344+ $backend ( 'GET' , '/whatever' , null , callback , { } , { responseType : 'blob' } ) ;
345345
346346 var xhrInstance = MockXhr . $$lastInstance ;
347347 var responseText = '{"some": "object"}' ;
@@ -416,7 +416,7 @@ describe('$httpBackend', function() {
416416 expect ( status ) . toBe ( - 1 ) ;
417417 } ) ;
418418
419- $backend ( 'JSONP' , 'http://example.org/path?cb=JSON_CALLBACK' , null , callback , null , 2000 ) ;
419+ $backend ( 'JSONP' , 'http://example.org/path?cb=JSON_CALLBACK' , null , callback , null , { timeout : 2000 } ) ;
420420 expect ( fakeDocument . $$scripts . length ) . toBe ( 1 ) ;
421421 expect ( fakeTimeout . delays [ 0 ] ) . toBe ( 2000 ) ;
422422
0 commit comments