- From: Brad Hill <hillbrad@gmail.com>
- Date: Tue, 24 Jun 2014 17:47:45 -0700
- To: public-test-infra <public-test-infra@w3.org>
- Message-ID: <CAEeYn8h65MP3=xxjZxUrmOYakk5apEQ2s9p5xYLEcQsT5NDB8A@mail.gmail.com>
I think I got it: If your file contains more than one test, metadata should be provided in the <head> instead, as so: <head> ... <link rel='author' title='yourname@example.com'> <link rel='help' title='http://w3.org/TR/some-specification#truth-and-beauty'> ...</head> https://github.com/w3c/testtwf-website/pull/255 -Brad On Tue, Jun 24, 2014 at 4:40 PM, Brad Hill <hillbrad@gmail.com> wrote: > The "Contributing" section of README.md in WPT links to the TTWF page for > "How to write and review tests". > > There ( > http://testthewebforward.org/docs/testharness-tutorial.html#including-metadata ) > the example only shows including it inline with tests: > > test(function () { > assert_true(true, "The spec says it's true."); > }, > "True is true as per spec", > { > help: "http://w3.org/TR/some-specification#truth-and-beauty", > assert: ["Truth is true, you know."], > author: "Robin Berjon " > }); > > > But when you actually do this in a test, you get: > > Metadata property "author" for test: "Inline script in a <script> tag > should not run without an 'unsafe-inline' directive" must have name and > contact information ("name <email>" or "name http(s)://") > > Single tests should not have metadata. Move metadata to <head>. > If I go to the testharness.js docs ( > http://darobin.github.io/test-harness-tutorial/docs/using-testharness.html#metadata ), > it's similar. It says: > > All metadata provided per test will be added to any file-scoped metadata > found in the <head> section of the document. Metadata that is common to all > tests in a file should be placed in the <head>. > > But the example again only shows the inline usage: > > test(function () { > assert_true(true, "The spec says it's true."); > }, "True is true as per spec", { > help: ["http://www.w3.org/TR/some-specification/#truth-and-beauty", > "http://www.w3.org/TR/other-specification/#truthiness"] > , assert: "Truth is true, you know." > , author: "Robin Berjon <robin@berjon.com>" > , flags: "svg animated" > }); > > > If someone can provide me an authoritative example of including test > metadata in a <head>, I'll submit pull requests to update the documentation > appropriately. > > Thank, > > Brad >
Received on Wednesday, 25 June 2014 00:48:13 UTC