test_default_index_handler.js File Reference

Go to the source code of this file.

Functions

function run_test ()
 
function createTestDirectory ()
 
function destroyTestDirectory ()
 
function hiddenDataCheck (bytes, uri, path)
 
function dataCheck (bytes, uri, path, dirEntries)
 
function makeFile (name, isDirectory, parentDir, lst)
 
tests push (test)
 
function start (ch)
 
function stopRootDirectory (ch, cx, status, data)
 
function stopFooDirectory (ch, cx, status, data)
 
function stopTrailingCaretDirectory (ch, cx, status, data)
 

Variables

var srv
 
var dir
 
var dirEntries
 
var tests = []
 
var test
 

Function Documentation

function createTestDirectory ( )

Definition at line 67 of file test_default_index_handler.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function dataCheck (   bytes,
  uri,
  path,
  dirEntries 
)

Verifies data in bytes (an array of bytes) represents an index page for the given URI and path, which should be a page listing the given directory entries, in order.

Parameters
bytesarray of bytes representing the index page's contents
uristring which is the URI of the index page
paththe path portion of uri
dirEntriessorted (in the manner the directory entries should be sorted) array of objects, each of which has a name property (whose value is the file's name, without / if it's a directory) and an isDirectory property (with expected value)

Definition at line 204 of file test_default_index_handler.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function destroyTestDirectory ( )

Definition at line 109 of file test_default_index_handler.js.

Here is the caller graph for this function:

function hiddenDataCheck (   bytes,
  uri,
  path 
)

Verifies data in bytes for the trailing-caret path above.

Definition at line 120 of file test_default_index_handler.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function makeFile (   name,
  isDirectory,
  parentDir,
  lst 
)

Create a file/directory with the given name underneath parentDir, and append an object with name/isDirectory properties to lst corresponding to it if the file/directory could be created.

Definition at line 272 of file test_default_index_handler.js.

Here is the caller graph for this function:

tests push ( test  )
function run_test ( )

Definition at line 45 of file test_default_index_handler.js.

Here is the call graph for this function:

function start (   ch)

Definition at line 297 of file test_default_index_handler.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function stopFooDirectory (   ch,
  cx,
  status,
  data 
)

Definition at line 311 of file test_default_index_handler.js.

Here is the call graph for this function:

function stopRootDirectory (   ch,
  cx,
  status,
  data 
)

Definition at line 301 of file test_default_index_handler.js.

Here is the call graph for this function:

function stopTrailingCaretDirectory (   ch,
  cx,
  status,
  data 
)

Definition at line 321 of file test_default_index_handler.js.

Here is the call graph for this function:

Variable Documentation

var dir

Definition at line 43 of file test_default_index_handler.js.

var dirEntries

Definition at line 43 of file test_default_index_handler.js.

var srv

Definition at line 43 of file test_default_index_handler.js.

test
Initial value:
= new Test("http://localhost:4444/",
function start(ch)
return null
Definition: FeedWriter.js:1143
function Test(path, initChannel, onStartRequest, onStopRequest)
Definition: head_utils.js:322
function stopRootDirectory(ch, cx, status, data)

Definition at line 291 of file test_default_index_handler.js.

var tests = []

Definition at line 290 of file test_default_index_handler.js.