From 5f8de423f190bbb79a62f804151bc24824fa32d8 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 2 Feb 2018 04:16:08 -0500 Subject: Add m-esr52 at 52.6.0 --- testing/web-platform/tests/docs/test-templates.md | 135 ++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 testing/web-platform/tests/docs/test-templates.md (limited to 'testing/web-platform/tests/docs/test-templates.md') diff --git a/testing/web-platform/tests/docs/test-templates.md b/testing/web-platform/tests/docs/test-templates.md new file mode 100644 index 000000000..3738ebf13 --- /dev/null +++ b/testing/web-platform/tests/docs/test-templates.md @@ -0,0 +1,135 @@ +This page contains templates for creating tests. The template syntax +is compatible with several popular editors including TextMate, Sublime +Text, and emacs' YASnippet mode. + +Each template is given in two forms, one minimal and one including +[extra metadata](css-metadata.html). Usually the metadata is required +by CSS tests and optional for other tests. + +Templates for filenames are also given. In this case `{}` is used to +delimit text to be replaced and `#` represents a digit. + +## Reftests + +### Minimal Reftest + +``` html + + +${1:Test title} + + + + ${4:Test content} + +``` + +Filename: `{test-topic}-###.html` + +### Reftest Including Metadata + +``` html + + +${1:Test area}: ${2:Scope of test} + + + + + + + + ${10:Test content} + +``` + +Filename: `{test-topic}-###.html` + +### Minimal Reftest Reference: + +``` html + + +${1:Reference title} + + + ${3:Reference content} + +``` + +Filename: `{description}.html` or `{test-topic}-###-ref.html` + +### Reference Including Metadata + +``` html + + +${1:Reference title} + + + + ${5:Reference content} + +``` + +Filename: `{description}.html` or `{test-topic}-###-ref.html` + +## testharness.js tests + +### Minimal Script Test + +``` html + + +${1:Test title} + + + +``` + +Filename: `{test-topic}-###.html` + +### Script Test With Metadata + +``` html + + +${1:Test title} + + + + + + + +``` + +Filename: `{test-topic}-###.html` + +### Manual Test + +``` html + + +${1:Test title} + + + +``` + +Filename: `{test-topic}-###-manual.html` -- cgit v1.2.3