author Benjamin Smedberg <>
Mon, 29 Jun 2009 14:31:58 -0400
changeset 35732 fc6ed914e44e888e9fef446de12ad915d156555d
parent 1 9b2a99adc05e53cd4010de512f50118594756650
permissions -rw-r--r--
Build the pieces of the chromium code we actually need. Many thanks to bent for doing this the first time: I redid the Makefile to be all in one directory and use vpath directives so that dependencies work correctly.

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <meta name="Author" content="Rick Gessner">
   <meta name="GENERATOR" content="Mozilla/4.6 [en] (WinNT; U) [Netscape]">
<table COLS=1 WIDTH="100%" BGCOLOR="#FFFFCC" >
<td><b><font face="Verdana"><font size=-1>Using HTMLGen</font></font></b>
<br><font face="Verdana"><font size=-2>Version 1.0</font></font></td>

<p><font face="Verdana"><font size=-1>HTMLGen is a C++ text-processing
utility that lets users quickly generate HTML testcases. While HTMLGen
is not restricted to generating HTML files, the program does understand
the set of known HTML tags. HTMLGen takes user supplied file fragments
and command line arguments as input, and automatically generates a series
of derived HTML files.</font></font>
<p><font face="Verdana"><font size=-1>Here's a quick example: Let's say
you want to create a series of tests to verify that Gecko correctly renders
every tag inside the &lt;BODY> element. To accomplish this, begin with
a small HTML fragment file given below:</font></font>
<table COLS=1 WIDTH="30%" BGCOLOR="#CCCCCC" >
<td><font face="Verdana"><font size=-1>&lt;html></font></font>
<br><font face="Verdana"><font size=-1>&lt;body></font></font>
<br><font face="Verdana"><font size=-1>&lt;$0><i>text</i>&lt;/$0></font></font>
<br><font face="Verdana"><font size=-1>&lt;/body></font></font>
<br><font face="Verdana"><font size=-1>&lt;/html></font></font></td>

<p><font face="Verdana"><font size=-1>Notice that the file looks like a
typical HTML file, except for the tags that read &lt;$0> and &lt;/$0>.
These are macros, which are content that will be replaced by arguments
provided on the HTMLGen command line. To finish our example, simply run
HTMLGen with the following command line arguments:</font></font>
<pre><tt><font color="#3333FF">HTMLGen -f test1.html a-z</font></tt></pre>
<font face="Verdana"><font size=-1>This instructs HTML to read the test1.html
file and use it as a template. Next, the tag-range argument "a-z" instructs
HTMLGen to autogenerate a file for each HTML tag between A and Z. HTMLGen
uses this argument as the 0th element of its macro substitution process.
The macros &lt;$0> and &lt;/$0> will be replaced in each autogenerated
file with the current value of the $0 argument. So, the first file will
contain &lt;A> where it sees &lt;$0>, the second will use &lt;B> and so
<p><font face="Verdana"><font size=-1>The result of running HTMLGen against
the given template with these arguments is that you'll get a new file for
each tag we see in the range between A..Z.&nbsp; Note that in this example
we're emitting valid HTML, but that is not a requirement. You can use HTMLGen
to generate lots of illegal content for testing as well.</font></font>
<table COLS=1 WIDTH="100%" BGCOLOR="#FFFFCC" >
<td><b><font face="Verdana"><font size=-1>HTMLGen Command Line Arguments</font></font></b></td>

<p><font face="Verdana"><font size=-1>The arguments you use for controlling
HTMLGen always have the same form, as shown:</font></font>
<p><tt><font color="#3333FF">HTMLGen -f test1.html [-o outfile name] taglist0
[,taglist1, ..., taglist9]</font></tt>
<p><font face="Verdana"><font size=-1>The first argument is always the
name of the template file to read.</font></font>
<br><font face="Verdana"><font size=-1>The (optional) second argument is
the name of the output file.</font></font>
<br><font face="Verdana"><font size=-1>The 3rd argument on represent represent
tag sequences to be used in macro substitution. These can have one of three
forms: 1) a single tag; 2) a list of tags (a,b,c); 3) a range of tags (a-z).</font></font>
<table COLS=1 WIDTH="100%" BGCOLOR="#FFFFCC" >
<td><b><font face="Verdana"><font size=-1>HTMLGen Embedded Text Commands</font></font></b></td>

<p><font face="Verdana"><font size=-1>In addition to the command line arguments,
HTMLGen can also respond to special markup found inside your template files.
Commands you can use inside your templates include:</font></font>
<p><font face="Verdana"><font size=-1>@file&nbsp;&nbsp; -- this gets replaced
with the name of the current output file.</font></font>
<br><font face="Verdana"><font size=-1>@next -- this gets replaced with
the name of the <i>next</i> output file (useful for creating links between
<br><font face="Verdana"><font size=-1>@import <i>filename </i>-- this
causes the contents of <i>filename</i> to be inserted into the current
<table COLS=1 WIDTH="100%" BGCOLOR="#FFFFCC" >
<td><b><font face="Verdana"><font size=-1>Notes and Cautions</font></font></b></td>

<font face="Verdana"><font size=-1>The first note of caution is that HTMLGen
can produce a large number of test files in very little time. You should
be careful when you specify arguments because the combinatorics add up
to a potentially<i> big</i> document set.</font></font></li>