summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/tools/w3ctestlib/templates
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
commit43a97878ce14b72f0981164f87f2e35e14151312 (patch)
tree620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/css/tools/w3ctestlib/templates
parentInitial commit. (diff)
downloadfirefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz
firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/tools/w3ctestlib/templates')
-rw-r--r--testing/web-platform/tests/css/tools/w3ctestlib/templates/chapter-toc.tmpl46
-rw-r--r--testing/web-platform/tests/css/tools/w3ctestlib/templates/implementation-report-TEMPLATE.data.tmpl21
-rw-r--r--testing/web-platform/tests/css/tools/w3ctestlib/templates/index.content.tmpl195
-rw-r--r--testing/web-platform/tests/css/tools/w3ctestlib/templates/index.htm.tmpl20
-rw-r--r--testing/web-platform/tests/css/tools/w3ctestlib/templates/index.xht.tmpl20
-rw-r--r--testing/web-platform/tests/css/tools/w3ctestlib/templates/indices.css96
-rw-r--r--testing/web-platform/tests/css/tools/w3ctestlib/templates/reftest-toc.tmpl74
-rw-r--r--testing/web-platform/tests/css/tools/w3ctestlib/templates/reftest.tmpl7
-rw-r--r--testing/web-platform/tests/css/tools/w3ctestlib/templates/suitedata.tmpl23
-rw-r--r--testing/web-platform/tests/css/tools/w3ctestlib/templates/test-toc.tmpl97
-rw-r--r--testing/web-platform/tests/css/tools/w3ctestlib/templates/testinfo.data.tmpl16
11 files changed, 615 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/tools/w3ctestlib/templates/chapter-toc.tmpl b/testing/web-platform/tests/css/tools/w3ctestlib/templates/chapter-toc.tmpl
new file mode 100644
index 0000000000..e1e8bc275d
--- /dev/null
+++ b/testing/web-platform/tests/css/tools/w3ctestlib/templates/chapter-toc.tmpl
@@ -0,0 +1,46 @@
+[%# variables in this template
+ indexext [string, e.g. '.html']
+ suitetitle [string]
+ specroot [uri string]
+ formatdir [dir name string]
+ chapters [list of struct]
+ .numstr [string, e.g. '6.1.13']
+ .title [string]
+ .testcount [number]
+%]
+[% IF isXML %]
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+[% ELSE %]
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+[% END %]
+ <head>
+ <title>[% suitetitle %]</title>
+ <style type="text/css">
+ @import "http://www.w3.org/StyleSheets/TR/base.css";
+ @import "[% IF formatdir %]../[% END %]indices.css";
+ </style>
+ </head>
+<body>
+ <h1>[% suitetitle %] By Chapter</h1>
+
+ <p>This index contains both
+ <a href="http://wiki.csswg.org/test/selftest">self-describing tests</a>
+ and reftests.
+ A separate <a href="reftest-toc[% indexext%]">alphabetical reftest index</a>
+ is provided for tests in <a href="http://wiki.csswg.org/test/reftest">reftest
+ format</a> along with the <a href="reftest.list">reftest manifest</a>.</p>
+
+ <table>
+[% FOREACH chapter IN chapters %]
+ <tbody id="s[% chapter.numstr %]">
+ <tr><th><a href="chapter-[% chapter.numstr %][% indexext %]">
+ [% (chapter.numstr.match('^\d')) ? 'Chapter' : 'Appendix' +%] [%+ chapter.numstr +%] -
+ [%+ chapter.title +%]</a></th>
+ <td>([% chapter.testcount +%] Tests)</td></tr>
+ </tbody>
+[% END %]
+ </table>
+</body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/tools/w3ctestlib/templates/implementation-report-TEMPLATE.data.tmpl b/testing/web-platform/tests/css/tools/w3ctestlib/templates/implementation-report-TEMPLATE.data.tmpl
new file mode 100644
index 0000000000..0231f23ba4
--- /dev/null
+++ b/testing/web-platform/tests/css/tools/w3ctestlib/templates/implementation-report-TEMPLATE.data.tmpl
@@ -0,0 +1,21 @@
+# UA version OS version
+# UA string (if applicable)
+# http://test.csswg.org/suites/[% suite %]/DATESTAMP/
+# See http://wiki.csswg.org/test/implementation-report for instructions
+testname revision result comment
+[% FOREACH test IN tests.sort(name) %]
+[% FOREACH format IN formats %]
+[% IF formatInfo.$format.report %]
+[% SET skipFormat = 0 %]
+[% FOREACH flag IN test.flags %]
+ [% SET skipFormat = 1 IF flag == formatInfo.$format.filter %]
+[% END %]
+[% UNLESS skipFormat +%]
+[%+ formatInfo.$format.path +%]/[% test.name +%].[% formatInfo.$format.ext +%] [%+ test.revision +%] ?
+[% END %]
+[% END %]
+[% END %]
+[% END %]
+[% FOREACH test IN addtests.sort() +%]
+[%+ test +%] [%+ test.revision +%] ?
+[% END %]
diff --git a/testing/web-platform/tests/css/tools/w3ctestlib/templates/index.content.tmpl b/testing/web-platform/tests/css/tools/w3ctestlib/templates/index.content.tmpl
new file mode 100644
index 0000000000..e32d8fe567
--- /dev/null
+++ b/testing/web-platform/tests/css/tools/w3ctestlib/templates/index.content.tmpl
@@ -0,0 +1,195 @@
+[% PROCESS "suitedata.tmpl" %]
+[% IF official %]
+ <h1>[% suites.$suite.title %]</h1>
+[% ELSE %]
+ <h1>Unofficial [% suites.$suite.title %]</h1>
+[% END %]
+ <dt>Test Coordinator:</dt>
+ <dd>[% suites.$suite.owner %]</dd>
+
+ <p>This is a <strong>[% statusNames.${suites.$suite.status}.title or "ERROR: $suite" %]</strong>
+ version of the [% suites.$suite.title %].</p>
+
+[% IF suites.$suite.harness != '' %]
+ <p>You can provide test data or review the testing results for this test suite:</p>
+ <dt><a href="http://test.csswg.org/harness/suite/[% suites.$suite.harness %]">Enter Data</a></dt>
+ <dt><a href="http://test.csswg.org/harness/review/[% suites.$suite.harness %]">Review Results</a></dt>
+[% END %]
+
+
+[% IF devel %]
+ <p>This build exists to aid in test suite development and contains unreviewed
+ tests. <strong>The pass/fail results of these tests are not reliable
+ indications of conformance.</strong>
+[% ELSE %]
+ <p>Some tests in the test suite may contain errors.
+[% END %]
+ Please check the latest version of the
+ <a href="[% suites.$suite.specroot %]">[% suites.$suite.spec %] specification</a>
+ <strong>and its errata</strong>
+ before assuming a failure is due to an implementation bug and
+ not a test suite bug.</p>
+
+[% UNLESS official %]
+ <p>You can find the <a href="[% suites.$suite.officialUrl %]">official
+ build</a> of the [% suites.$suite.title %] on W3C's web site.</p>
+[% END %]
+
+ <p>[% IF suites.$suite.status != 'fin' && suites.$suite.status != 'rc' %]
+ In time we hope to correct all errors and extend this test suite to
+ cover all of [% suites.$suite.spec %]. Your help is welcome in this effort.
+ [% END %]
+ The appropriate mailing list for submitting tests and bug reports is
+ <a href="http://lists.w3.org/Archives/Public/public-css-testsuite/">public-css-testsuite@w3.org</a>.</p>
+ <p>
+ To report bugs or feedback about a specific test file,
+ search for the filename (without extension) in
+ <a href="https://github.com/web-platform-tests/wpt/issues">web-platform-tests issues</a>,
+ and file a new issue if necessary with suggested label "wg-css".
+ More information on the contribution process and test guidelines is
+ available on the <a href="http://wiki.csswg.org/test">wiki
+ page</a>.</p>
+
+ <p>Tests are currently available in these formats:</p>
+
+ <dl>
+[% FOREACH format IN formats %]
+ [% IF format == 'html4' %]
+ <dt><a href="html4/toc.htm">HTML 4.01</a></dt>
+ <dd>HTML 4.01 tests sent as <code>text/html</code></dd>
+ [% END %]
+ [% IF format == 'html5' %]
+ <dt><a href="html/toc.htm">HTML 5</a></dt>
+ <dd>HTML 5 tests sent as <code>text/html</code></dd>
+ [% END %]
+ [% IF format == 'xhtml1' %]
+ <dt><a href="xhtml1/toc.xht">XHTML 1.1</a></dt>
+ <dd>XHTML 1.1 tests sent as <code>application/xhtml+xml</code></dd>
+ [% END %]
+ [% IF format == 'xhtml1print' %]
+ <dt><a href="xhtml1print/toc.xht">XHTML 1.1 for Printers</a></dt>
+ <dd>XHTML 1.1 tests with all images converted from PNG to JPEG
+ and formatted with headers and footers to ease testing of
+ embedded printer software. This is not a canonical format,
+ and some tests may fail due to the format conversion that
+ would otherwise pass in the above XHTML 1.1 format.</dd>
+ </dl>
+ [% END %]
+[% END %]
+
+[% IF suite == 'css2.1' %]
+ <p>Additional tests, that do not fit in any of those formats,
+ are located separately:</p>
+
+ <dl>
+ <dt><a href="other/">Other Formats</a></dt>
+ <dd>Tests that do not fit in the above formats because they
+ test a combination of CSS and a particular document language's
+ features and/or error recovery.</dd>
+ </dl>
+[% END %]
+
+ <p>Unless the test instructions explicitly indicate otherwise,
+ any occurrence of red in a test indicates test failure.</p>
+
+[% IF suite == 'css2.1' %]
+ <p>Note that <em>many</em> of the tests require the
+ <a href="http://www.w3.org/Style/CSS/Test/Fonts/Ahem/">Ahem font to be installed</a>.
+ These tests are marked with the 'ahem' flag in their metadata.
+ Without the Ahem font installed, these tests are of no value.</p>
+ <p>Some of the font-related tests also require
+ <a href="http://www.w3.org/Style/CSS/Test/Fonts/">special fonts</a>.
+ These tests are marked with the 'font' flag in their metadata.</p>
+
+[% END %]
+<h2 id="implement">Implementation Reports</h2>
+ <p>An <a href="implementation-report-TEMPLATE.data">implementation report template</a>
+ is available to help with creating implementation reports. See also the
+ <a href="http://lists.w3.org/Archives/Public/public-css-testsuite/2010Aug/0020.html">explanation</a>
+ of its format.</p>
+
+<h2 id="common">Common Assumptions</h2>
+
+ <p>Most of the test suite makes the following assumptions:</p>
+ <ul>
+ <li>The X/HTML <code>div</code> element is assigned <code>display: block;</code>
+ and no other property declaration.</li>
+ <li>The X/HTML <code>span</code> element is assigned <code>display: inline;</code>
+ and no other property declaration.</li>
+ <li>The X/HTML <code>p</code> element is assigned <code>display: block;</code></li>
+ <li>The X/HTML <code>li</code> element is assigned <code>display: list-item;</code></li>
+ <li>The X/HTML table elements <code>table</code>, <code>tbody</code>,
+ <code>tr</code>, and <code>td</code> are assigned the <code>display</code>
+ values <code>table</code>, <code>table-row-group</code>,
+ <code>table-row</code>, and <code>table-cell</code>, respectively.</li>
+ <li>The device can display the sixteen color values associated with the color
+ keywords <code>black</code>, <code>white</code>, <code>gray</code>,
+ <code>silver</code>, <code>red</code>, <code>green</code>, <code>blue</code>,
+ <code>purple</code>, <code>yellow</code>, <code>orange</code>, <code>teal</code>,
+ <code>fuchsia</code>, <code>maroon</code>, <code>navy</code>, <code>aqua</code>,
+ and <code>lime</code> as distinct colors.</li>
+ <li>The UA is set to print background colors and, if it supports graphics,
+ background images.</li>
+ <li>The UA implements reasonable page-breaking behavior; e.g., it is assumed
+ that UAs will not break at every opportunity, but only near the end of
+ a page unless a page break is forced.</li>
+ <li>The UA implements reasonable line-breaking behavior; e.g., it is assumed
+ that spaces between alphanumeric characters provide line breaking
+ opportunities and that UAs will not break at every opportunity, but only
+ near the end of a line unless a line break is forced.</li>
+ </ul>
+
+<h2 id="uncommon">Uncommon Assumptions</h2>
+
+ <p>In addition, some of the tests make one or more of the following
+ assumptions:</p>
+
+ <ul>
+ <li>The device is a full-color device.</li>
+ <li>The device has a viewport width of at least 640px (approx).</li>
+ <li>The resolution of the device is 96 CSS pixels per inch.</li>
+ <li>The UA imposes no minimum font size.</li>
+ <li>The 'medium' font-size computes to 16px.</li>
+ <li>The initial value of 'color' is black.</li>
+ <li>The canvas background is white.</li>
+ <li>The user stylesheet is empty (except where indicated by the tests).</li>
+ <li>The device is interactive and uses scroll bars.</li>
+ </ul>
+
+ <p>The tests that need these assumptions to be true have not yet been
+ marked, but it is likely that we will add a way to identify these
+ tests in due course. Tests should avoid relying on these assumptions
+ unless necessary.</p>
+
+<h2>License</h2>
+
+[% IF official %]
+ <p>This test suite is licensed under both the
+ <a href="http://www.w3.org/Consortium/Legal/2008/04-testsuite-license">W3C
+ Test Suite License</a> and the <a href="http://www.w3.org/Consortium/Legal/2008/03-bsd-license">W3C
+ 3-clause BSD License</a>. See W3C Legal's <a href="http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright">explanation
+ of the licenses</a>.</p>
+[% ELSE %]
+ <p>These tests are licensed under the <a href="LICENSE-BSD">BSD 3-clause
+ License</a>. You may modify and distribute them under those terms. Aside
+ from their titles, documentation, and location they are identical to the
+ official tests of the same date. However, only the
+ <a href="http://www.w3.org/Style/Test/[% suite %]/current/">official % suites.$suite.title %]
+ </a> may be used as the basis for CSS conformance
+ claims.</p>
+[% END %]
+
+<h2>Acknowledgements</h2>
+
+ <p>Many thanks to the following for their contributions:</p>
+ <ul>
+[%- FOREACH person = contributors.keys.sort %]
+ [% IF not person.match('^CSS1') %]
+ <li>[% person %]</li>
+ [% END %]
+[%- END %]
+ </ul>
+[% IF suite == 'css2.1' %]
+ <p>...and all the <a href="http://www.w3.org/Style/CSS/Test/CSS1/current/tsack.html">contributors
+ to the CSS1 test suite</a>.</p>
+[% END %]
diff --git a/testing/web-platform/tests/css/tools/w3ctestlib/templates/index.htm.tmpl b/testing/web-platform/tests/css/tools/w3ctestlib/templates/index.htm.tmpl
new file mode 100644
index 0000000000..c29ed4a3c7
--- /dev/null
+++ b/testing/web-platform/tests/css/tools/w3ctestlib/templates/index.htm.tmpl
@@ -0,0 +1,20 @@
+[% PROCESS "suitedata.tmpl" %]
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html lang="en">
+ <head>
+[% IF official %]
+ <title>[% suites.$suite.title %]</title>
+[% ELSE %]
+ <title>Unofficial [% suites.$suite.title %]</title>
+[% END %]
+ <style type="text/css">
+ @import "http://www.w3.org/StyleSheets/TR/base.css";
+ @import "indices.css";
+ </style>
+ </head>
+ <body>
+
+[% INCLUDE "index.content.tmpl" %]
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/tools/w3ctestlib/templates/index.xht.tmpl b/testing/web-platform/tests/css/tools/w3ctestlib/templates/index.xht.tmpl
new file mode 100644
index 0000000000..b355544cfa
--- /dev/null
+++ b/testing/web-platform/tests/css/tools/w3ctestlib/templates/index.xht.tmpl
@@ -0,0 +1,20 @@
+[% PROCESS "suitedata.tmpl" %]
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+ <head>
+[% IF official %]
+ <title>[% suites.$suite.title %]</title>
+[% ELSE %]
+ <title>Unofficial [% suites.$suite.title %]</title>
+[% END %]
+ <style type="text/css">
+ @import "http://www.w3.org/StyleSheets/TR/base.css";
+ @import "indices.css";
+ </style>
+ </head>
+ <body>
+
+[% INCLUDE index.content.tmpl %]
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/tools/w3ctestlib/templates/indices.css b/testing/web-platform/tests/css/tools/w3ctestlib/templates/indices.css
new file mode 100644
index 0000000000..7bc70eeef9
--- /dev/null
+++ b/testing/web-platform/tests/css/tools/w3ctestlib/templates/indices.css
@@ -0,0 +1,96 @@
+/* CSS for CSS Conformance Test Indices */
+/* Written by fantasai */
+
+/* Test Tables */
+
+ table {
+ border-collapse: collapse;
+ }
+
+ thead {
+ border-bottom: 0.2em solid;
+ }
+
+ tbody {
+ border: thin solid;
+ border-style: solid none;
+ }
+
+ tbody.ch {
+ border-top: 0.2em solid;
+ }
+ tbody.ch th {
+ font-weight: bold;
+ }
+
+ tbody th {
+ border-bottom: silver dotted thin;
+ background: #EEE;
+ color: black;
+ font-weight: normal;
+ font-style: italic;
+ }
+ tbody th :link {
+ color: gray;
+ background: transparent;
+ }
+ tbody th :visited {
+ color: #333;
+ background: transparent;
+ }
+
+ th, td {
+ padding: 0.2em;
+ text-align: left;
+ vertical-align: baseline;
+ }
+
+ td {
+ font-size: 0.9em;
+ }
+
+ /* flags */
+ td abbr {
+ border: solid thin gray;
+ padding: 0 0.1em;
+ cursor: help;
+ }
+ td abbr:hover {
+ background: #ffa;
+ color: black;
+ }
+
+
+ tr:hover {
+ background: #F9F9F9;
+ color: navy;
+ }
+
+ th a,
+ td a {
+ text-decoration: none;
+ }
+ th a:hover,
+ td a:hover,
+ th a:focus,
+ td a:focus {
+ text-decoration: underline;
+ }
+
+ td a {
+ display: block;
+ padding-left: 2em;
+ text-indent: -1em;
+ }
+ .refs {
+ font-weight: bold;
+ font-size: larger;
+ }
+ .assert, .assert > li {
+ list-style-type: none;
+ font-style: italic;
+ color: gray;
+ margin: 0;
+ padding: 0;
+ text-indent: 0;
+ }
diff --git a/testing/web-platform/tests/css/tools/w3ctestlib/templates/reftest-toc.tmpl b/testing/web-platform/tests/css/tools/w3ctestlib/templates/reftest-toc.tmpl
new file mode 100644
index 0000000000..91894235a4
--- /dev/null
+++ b/testing/web-platform/tests/css/tools/w3ctestlib/templates/reftest-toc.tmpl
@@ -0,0 +1,74 @@
+[%# variables in this template
+ isXML [bool]
+ extmap [ExtensionMap object]
+ suitetitle [string]
+ specroot [URI of spec]
+ formatdir [string]
+ chaptitle [string]
+ chapdir [string]
+ testcount [number]
+ sections [list of struct]
+ .id [string - section number or id]
+ .uri [URI of section]
+ .tests [list of struct]
+ .asserts [list of strings]
+ .flags [list of token strings]
+ .links [list of uri strings]
+ .name [string]
+%]
+[% PROCESS suitedata.tmpl %]
+[% IF isXML %]
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+[% formatMismatchFlag = 'HTMLonly' %]
+[% ELSE %]
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+[% formatMismatchFlag = 'nonHTML' %]
+[% END %]
+ <head>
+ <title>[% suitetitle %] Reftest Index</title>
+ <style type="text/css">
+ @import "http://www.w3.org/StyleSheets/TR/base.css";
+ @import "[% IF formatdir %]../[% END %]indices.css";
+ </style>
+ </head>
+
+ <body>
+
+ <h1>[% suitetitle %] Reftest Index</h1>
+ <table width="100%">
+ <col id="test-column">[% IF isXML %]</col>[% END %]
+ <col id="ref-column">[% IF isXML %]</col>[% END %]
+ <col id="flags-column">[% IF isXML %]</col>[% END %]
+ <thead>
+ <tr>
+ <th>Test</th>
+ <th>Reference</th>
+ <th>Flags</th>
+ </tr>
+ </thead>
+[% FOREACH entry IN tests.sort('name') %]
+ [% IF entry.references and not entry.flags.contains(formatMismatchFlag) %]
+ <tbody id="[% entry.name %]" class="[% entry.flags.join(' ') %]">
+ [% FOREACH refList IN entry.references %]
+ [% IF loop.first %]
+ <tr>
+ <td rowspan="[% loop.size %]" title="[% entry.title | collapse | html %]">
+ <a href="[% extmap.translate(entry.file) %]">[% entry.name %]</a></td>
+ <td>[% FOREACH ref IN refList %]<a href="[% extmap.translate(ref.relpath) %]">[% refCompMap.${ref.type} %]</a> [% END %]</td>
+ <td rowspan="[% entry.references.size %]">[% FOREACH flag IN entry.flags %][% IF flag != 'nonHTML' and flag != 'HTMLonly' %]<abbr class="[% flag %]" title="[% flagInfo.$flag.title %]">[% flagInfo.$flag.abbr %]</abbr>[% END %][% END %]</td>
+ </tr>
+ [% ELSE %]
+ <tr>
+ <td><a href="[% extmap.translate(ref.relpath) %]">[% refCompMap.${ref.type} %]</a></td>
+ </tr>
+ [% END %]
+ [% END %]
+ </tbody>
+ [% END %]
+[% END %]
+ </table>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/tools/w3ctestlib/templates/reftest.tmpl b/testing/web-platform/tests/css/tools/w3ctestlib/templates/reftest.tmpl
new file mode 100644
index 0000000000..14b9bb6595
--- /dev/null
+++ b/testing/web-platform/tests/css/tools/w3ctestlib/templates/reftest.tmpl
@@ -0,0 +1,7 @@
+[% FOR entry IN tests.sort('name') %]
+[% IF not entry.flags.contains(formatMismatchFlag) %]
+[% FOREACH refList IN entry.references %]
+[%+ extmap.translate(entry.file) %] [% FOREACH ref IN refList %] [%+ ref.type %] [%+ extmap.translate(ref.relpath) %][% END %]
+[% END %]
+[% END %]
+[% END %]
diff --git a/testing/web-platform/tests/css/tools/w3ctestlib/templates/suitedata.tmpl b/testing/web-platform/tests/css/tools/w3ctestlib/templates/suitedata.tmpl
new file mode 100644
index 0000000000..6aae9f2ea8
--- /dev/null
+++ b/testing/web-platform/tests/css/tools/w3ctestlib/templates/suitedata.tmpl
@@ -0,0 +1,23 @@
+[% refCompMap =
+ { '==' => '=',
+ '!=' => '&#x2260;'
+ }
+%]
+[% statusNames = {
+ 'dev' => {
+ 'title' => 'Development',
+ 'link' => 'http://www.w3.org/Style/CSS/Test/#phase-pa' },
+ 'alpha' => {
+ 'title' => 'Alpha',
+ 'link' => 'http://www.w3.org/Style/CSS/Test/#phase-alpha' },
+ 'beta' => {
+ 'title' => 'Beta',
+ 'link' => 'http://www.w3.org/Style/CSS/Test/#phase-beta' },
+ 'rc' => {
+ 'title' => 'Release Candidate',
+ 'link' => 'http://www.w3.org/Style/CSS/Test/#phase-rc' },
+ 'final' => {
+ 'title' => 'Final',
+ 'link' => 'http://www.w3.org/Style/CSS/Test/#phase-fin' },
+ }
+%]
diff --git a/testing/web-platform/tests/css/tools/w3ctestlib/templates/test-toc.tmpl b/testing/web-platform/tests/css/tools/w3ctestlib/templates/test-toc.tmpl
new file mode 100644
index 0000000000..ff9ffbc1b8
--- /dev/null
+++ b/testing/web-platform/tests/css/tools/w3ctestlib/templates/test-toc.tmpl
@@ -0,0 +1,97 @@
+[%# variables in this template
+ isXML [bool]
+ extmap [ExtensionMap object]
+ suitetitle [string]
+ specroot [URI of spec]
+ formatdir [string]
+ chaptitle [string]
+ chapdir [string]
+ testcount [number]
+ sections [list of struct]
+ .id [string - section number or id]
+ .uri [URI of section]
+ .tests [list of struct]
+ .asserts [list of strings]
+ .flags [list of token strings]
+ .links [list of uri strings]
+ .name [string]
+%]
+[% PROCESS suitedata.tmpl %]
+[% IF isXML %]
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+[% formatMismatchFlag = 'HTMLonly' %]
+[% ELSE %]
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+[% formatMismatchFlag = 'nonHTML' %]
+[% END %]
+ <head>
+ <title>[% chaptertitle %] - [% suitetitle %]</title>
+ <style type="text/css">
+ @import "http://www.w3.org/StyleSheets/TR/base.css";
+ @import "[% IF formatdir %]../[% END %]indices.css";
+ </style>
+ </head>
+
+ <body>
+
+ <h1>[% suitetitle %]</h1>
+[% IF chaptertitle %]
+ <h2>[% chaptertitle %] ([% testcount %] tests)</h2>
+[% END %]
+ <table width="100%">
+ <col id="test-column">[% IF isXML %]</col>[% END %]
+ <col id="refs-column">[% IF isXML %]</col>[% END %]
+ <col id="flags-column">[% IF isXML %]</col>[% END %]
+ <col id="info-column">[% IF isXML %]</col>[% END %]
+ <thead>
+ <tr>
+ <th>Test</th>
+ <th><abbr title="Rendering References">Refs</abbr></th>
+ <th>Flags</th>
+ <th>Info</th>
+ </tr>
+ </thead>
+[% FOREACH section IN sections %]
+ <tbody id="s[% section.numstr %]">
+ [% IF section.title %]
+ <tr><th colspan="4" scope="rowgroup">
+ <a href="#s[% section.numstr %]">+</a>
+ <a href="[% section.uri %]">[% section.numstr +%] [%+ section.title %]</a></th></tr>
+ [% END %]
+ <!-- [% section.tests.size %] tests -->
+ [% FOREACH entry IN section.tests.sort('name') %]
+ [% FOREACH flag IN entry.flags %]
+ [% SET skip = 1 IF flag == formatMismatchFlag %]
+ [% END %]
+ [% UNLESS skip %]
+ [% primary = (entry.links.0 == section.uri) or (entry.links.0 == section.uri.replace(specroot, draftroot)) %]
+ <tr id="[% entry.name %]-[% section.numstr %]" class="
+ [% 'primary' IF primary %]
+ [% ' ' IF primary and entry.flags.size > 0 %]
+ [% entry.flags.join(' ') %]">
+ <td>[% '<strong>' IF primary %]
+ <a href="[% extmap.translate(entry.file) %]">[% entry.name%]</a>
+ [% '</strong>' IF primary %]</td>
+ <td>[% FOREACH refList IN entry.references %][% FOREACH ref IN refList %]<a href="[% extmap.translate(ref.relpath) %]">[% refCompMap.${ref.type} %]</a> [%+ END %][%+ END %]</td>
+ <td>[% FOREACH flag IN entry.flags %][% IF flag != 'nonHTML' and flag != 'HTMLonly' %]<abbr class="[% flag %]" title="[% flagInfo.$flag.title %]">[% flagInfo.$flag.abbr %]</abbr>[% END %][% END %]</td>
+ <td>[% entry.title | collapse | html %]
+ [% IF entry.asserts.size > 0 %]
+ <ul class="assert">
+ [% FOREACH assertion IN entry.asserts %]
+ <li>[% assertion | collapse | html %]</li>
+ [% END %]
+ </ul>
+ [% END %]
+ </td>
+ </tr>
+ [% END %]
+ [% skip = 0 %]
+ [% END %]
+ </tbody>
+[% END %]
+ </table>
+
+ </body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/tools/w3ctestlib/templates/testinfo.data.tmpl b/testing/web-platform/tests/css/tools/w3ctestlib/templates/testinfo.data.tmpl
new file mode 100644
index 0000000000..d06a2a906c
--- /dev/null
+++ b/testing/web-platform/tests/css/tools/w3ctestlib/templates/testinfo.data.tmpl
@@ -0,0 +1,16 @@
+id references title flags links revision credits assertion
+[% FOREACH test IN tests.sort('name') %]
+[%+ test.file.replace('\.[a-z]+$', '') +%]
+[%- FOREACH refList IN test.references -%][%- FOREACH ref IN refList -%]
+[%- '!' IF ref.type == '!=' %][% extmap.translate(ref.relpath) %][% ',' IF not loop.last() -%]
+[%- END +%][% ';' IF not loop.last() -%]
+[%- END +%]
+[%- test.title FILTER collapse +%]
+[%- test.flags.join(',') +%]
+[%- test.links.join(',') +%]
+[%- test.revision +%]
+[%- FOREACH credit IN test.credits -%]
+`[% credit.0 %]`<[% credit.1 %]>[% ',' IF not loop.last() -%]
+[%- END +%]
+[%- test.asserts.join(' ') FILTER collapse +%]
+[% END %]