@@ -53,7 +53,7 @@ describe('$httpBackend', function() {
53
53
} )
54
54
}
55
55
} ;
56
- $backend = createHttpBackend ( $browser , MockXhr , fakeTimeout , callbacks , fakeDocument ) ;
56
+ $backend = createHttpBackend ( $browser , createMockXhr , fakeTimeout , callbacks , fakeDocument ) ;
57
57
callback = jasmine . createSpy ( 'done' ) ;
58
58
} ) ) ;
59
59
@@ -238,7 +238,7 @@ describe('$httpBackend', function() {
238
238
expect ( response ) . toBe ( 'response' ) ;
239
239
} ) ;
240
240
241
- $backend = createHttpBackend ( $browser , SyncXhr ) ;
241
+ $backend = createHttpBackend ( $browser , function ( ) { return new SyncXhr ( ) } ) ;
242
242
$backend ( 'GET' , '/url' , null , callback ) ;
243
243
expect ( callback ) . toHaveBeenCalledOnce ( ) ;
244
244
} ) ;
@@ -414,7 +414,7 @@ describe('$httpBackend', function() {
414
414
415
415
416
416
it ( 'should convert 0 to 200 if content' , function ( ) {
417
- $backend = createHttpBackend ( $browser , MockXhr ) ;
417
+ $backend = createHttpBackend ( $browser , createMockXhr ) ;
418
418
419
419
$backend ( 'GET' , 'file:///whatever/index.html' , null , callback ) ;
420
420
respond ( 0 , 'SOME CONTENT' ) ;
@@ -425,7 +425,7 @@ describe('$httpBackend', function() {
425
425
426
426
427
427
it ( 'should convert 0 to 404 if no content' , function ( ) {
428
- $backend = createHttpBackend ( $browser , MockXhr ) ;
428
+ $backend = createHttpBackend ( $browser , createMockXhr ) ;
429
429
430
430
$backend ( 'GET' , 'file:///whatever/index.html' , null , callback ) ;
431
431
respond ( 0 , '' ) ;
@@ -453,7 +453,7 @@ describe('$httpBackend', function() {
453
453
454
454
try {
455
455
456
- $backend = createHttpBackend ( $browser , MockXhr ) ;
456
+ $backend = createHttpBackend ( $browser , createMockXhr ) ;
457
457
458
458
$backend ( 'GET' , '/whatever/index.html' , null , callback ) ;
459
459
respond ( 0 , '' ) ;
@@ -468,7 +468,7 @@ describe('$httpBackend', function() {
468
468
469
469
470
470
it ( 'should return original backend status code if different from 0' , function ( ) {
471
- $backend = createHttpBackend ( $browser , MockXhr ) ;
471
+ $backend = createHttpBackend ( $browser , createMockXhr ) ;
472
472
473
473
// request to http://
474
474
$backend ( 'POST' , 'http://rest_api/create_whatever' , null , callback ) ;
0 commit comments