@@ -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
@@ -250,7 +250,7 @@ describe('$httpBackend', function() {
250
250
expect ( response ) . toBe ( 'response' ) ;
251
251
} ) ;
252
252
253
- $backend = createHttpBackend ( $browser , SyncXhr ) ;
253
+ $backend = createHttpBackend ( $browser , function ( ) { return new SyncXhr ( ) } ) ;
254
254
$backend ( 'GET' , '/url' , null , callback ) ;
255
255
expect ( callback ) . toHaveBeenCalledOnce ( ) ;
256
256
} ) ;
@@ -426,7 +426,7 @@ describe('$httpBackend', function() {
426
426
427
427
428
428
it ( 'should convert 0 to 200 if content' , function ( ) {
429
- $backend = createHttpBackend ( $browser , MockXhr ) ;
429
+ $backend = createHttpBackend ( $browser , createMockXhr ) ;
430
430
431
431
$backend ( 'GET' , 'file:///whatever/index.html' , null , callback ) ;
432
432
respond ( 0 , 'SOME CONTENT' ) ;
@@ -437,7 +437,7 @@ describe('$httpBackend', function() {
437
437
438
438
439
439
it ( 'should convert 0 to 404 if no content' , function ( ) {
440
- $backend = createHttpBackend ( $browser , MockXhr ) ;
440
+ $backend = createHttpBackend ( $browser , createMockXhr ) ;
441
441
442
442
$backend ( 'GET' , 'file:///whatever/index.html' , null , callback ) ;
443
443
respond ( 0 , '' ) ;
@@ -465,7 +465,7 @@ describe('$httpBackend', function() {
465
465
466
466
try {
467
467
468
- $backend = createHttpBackend ( $browser , MockXhr ) ;
468
+ $backend = createHttpBackend ( $browser , createMockXhr ) ;
469
469
470
470
$backend ( 'GET' , '/whatever/index.html' , null , callback ) ;
471
471
respond ( 0 , '' ) ;
@@ -480,7 +480,7 @@ describe('$httpBackend', function() {
480
480
481
481
482
482
it ( 'should return original backend status code if different from 0' , function ( ) {
483
- $backend = createHttpBackend ( $browser , MockXhr ) ;
483
+ $backend = createHttpBackend ( $browser , createMockXhr ) ;
484
484
485
485
// request to http://
486
486
$backend ( 'POST' , 'http://rest_api/create_whatever' , null , callback ) ;
0 commit comments