@@ -6,11 +6,11 @@ var suite = vows.describe("d3.xhr");
66
77suite . addBatch ( {
88 "xhr" : {
9- topic : load ( "xhr/xhr" ) . expression ( "d3.xhr" ) . document ( ) ,
9+ topic : load ( "xhr/xhr" ) . document ( ) ,
1010
1111 "on a sample text file" : {
12- topic : function ( d3_xhr ) {
13- d3_xhr ( "test/data/sample.txt" , this . callback ) ;
12+ topic : function ( d3 ) {
13+ d3 . xhr ( "test/data/sample.txt" , this . callback ) ;
1414 } ,
1515 "makes an asynchronous HTTP request" : function ( req ) {
1616 assert . equal ( req . _info . url , "test/data/sample.txt" ) ;
@@ -29,18 +29,18 @@ suite.addBatch({
2929 } ,
3030
3131 "when a custom mime type is specified" : {
32- topic : function ( d3_xhr ) {
33- d3_xhr ( "test/data/sample.txt" , "text/plain" , this . callback ) ;
32+ topic : function ( d3 ) {
33+ d3 . xhr ( "test/data/sample.txt" , "text/plain" , this . callback ) ;
3434 } ,
3535 "observes the optional mime type" : function ( req ) {
3636 assert . equal ( req . _info . mimeType , "text/plain" ) ;
3737 }
3838 } ,
3939
4040 "when a beforesend listener is specified" : {
41- topic : function ( d3_xhr ) {
41+ topic : function ( d3 ) {
4242 var callback = this . callback ;
43- var xhr = d3_xhr ( "test/data/sample.txt" , "text/plain" ) . on ( "beforesend" , function ( request ) {
43+ var xhr = d3 . xhr ( "test/data/sample.txt" , "text/plain" ) . on ( "beforesend" , function ( request ) {
4444 callback ( null , {
4545 that : this ,
4646 xhr : xhr ,
@@ -63,9 +63,9 @@ suite.addBatch({
6363 } ,
6464
6565 "on a file that does not exist" : {
66- topic : function ( d3_xhr ) {
66+ topic : function ( d3 ) {
6767 var callback = this . callback ;
68- d3_xhr ( "//does/not/exist.txt" , function ( error , req ) {
68+ d3 . xhr ( "//does/not/exist.txt" , function ( error , req ) {
6969 callback ( null , req ) ;
7070 } ) ;
7171 } ,
0 commit comments