Skip to content

Commit 4c5fdf9

Browse files
committed
test/scripttest: [Per-Test Metadata]
1 parent 5a7c97e commit 4c5fdf9

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

test/scripttest.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ The discussion forum for the test harness is the W3C's cross-WG [[http://lists.w
3737

3838
==== Per-Test Metadata ====
3939

40-
Additionally, test-specific metadata can be passed in the properties. These are used when the individual test has different metadata from that stored in the <head>. The recognized metadata properties are:
40+
Test-specific metadata can be passed in the properties object to the test constructor. These are used when an individual test has different metadata from that stored in the <head>. The recognized metadata properties are:
4141

4242
* help - The url for the part of the specification being tested
4343
* assert - A human readable description of what the test is attempting to prove
@@ -56,4 +56,10 @@ test(function() { assert_true(true); },
5656

5757
These values would override any metadata set in the <head> of the test and are only needed when the individual test's metadata is different from what's in the <head>.
5858

59-
If there is only a single script test in a file, all metadata should be in the <head>.
59+
If there is only a single script test in a file, all metadata should be in the <head>.
60+
61+
=== Metadata Cache ===
62+
63+
The default version of testharnessreport.js now contains code that reads your per-test metadata and compares it to the cached version. If the cache is not present, or is out of sync, it'll display a message to that effect and generate a link which, when clicked, will generate the appropriate source code for the cached metadata suitable for copy/paste into the test's <head>. The metadata cache need only be generated once just before submitting a test to suites that care about metadata, and regenerated only when the metadata changes.
64+
65+
To access this functionality, launch your script test in a browser and follow the link that appears at the top of the page.

0 commit comments

Comments
 (0)