author Andreas Gal <>
Wed, 23 Jul 2008 02:57:56 -0700
changeset 17811 711092884c032410bd635b1d68ef9c778afa3777
parent 1 9b2a99adc05e53cd4010de512f50118594756650
permissions -rw-r--r--
Lazy fill the stackTracker as we lookup the nativeFrameOffset for values. Purge all entries related to the current frame when it is popped. This code could be further simplified if Tracker was a template.

This is a regression tester for http.

The summary

1) start the server, with python
2) Get a file of all tests available by getting http://localhost:8000/
3) Use that file as an argument to mozilla -f (this requires either a 
debug build or a build with --enable-perf-metrics)
4) Look at the results of http://localhost:8000/id/report


Each run gets a unique ID number, which is used to map a test run to a 
database of results. Every test (which lives in the tests/ directory) is 
enumerated in step 2. Adding a new test is as simple as just creating the 
directory and addiing the appropriate files.

Test format

Each test must have a config file, which is simply a list of all the files
which will be requested, in order. Each file (x) can either be present in
the directory as that name, in which case the contents will be sent to the
browser, or as x.headers and (optionally) x.body.

The headers file has a first line which is the response code, and then any 
subsequent lines are header: value pairs. If the body file is not present, 
the test server will construct a one line response. This is useful for 
testing mozilla's response to headers (see the responses/ subdirectory of 
tests for examples)

Advanced tests

The default definition of a tests's 'success' is that all the files are 
retreived in the correct order. This can be overridden on a per test 
basis. For example, the referer test additionally checks that a 
referer header was sent.

To do this, a file called must exist in the test's directory. 
This class must provide an object called tester, which is used by the 
driver code instead of the default tester. This default tester is 
automatically present in the file's namespace under the name 'BaseTester'. 
This means that it can be inherited from in order to only override certain 

The routines in the default tester are documented in The most 
common routine which needs to be extended in verify_request. For an 
example, see the referer test.

Bradley Baetz <>, <>