| Index: third_party/WebKit/LayoutTests/webaudio/tools/README.md
|
| diff --git a/third_party/WebKit/LayoutTests/webaudio/tools/README.md b/third_party/WebKit/LayoutTests/webaudio/tools/README.md
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..12ed3699104323e0b8201df3ed9952213752bd21
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/webaudio/tools/README.md
|
| @@ -0,0 +1,57 @@
|
| +# layout-test-tidy
|
| +
|
| +This tool, a Node.js CLI utility, performs a set of clean-up tasks for layout
|
| +test files in LayoutTests/webaudio. (Potentially it can be applied to any kind
|
| +of layout test files in HTML or JS format.)
|
| +
|
| +The clean-up tasks includes:
|
| +
|
| + - Sanitize missing or incorrect HTML elements: reordering |script| elements
|
| + or adding missing |title| element.
|
| + - Apply [html-tidy](http://www.html-tidy.org/).
|
| + - Apply [clang-format](https://clang.llvm.org/docs/ClangFormat.html).
|
| + - Perform RegExp substitution based on predefined dictionary. (e.g. |var| to
|
| + |let|, or redundant empty lines in markup.)
|
| +
|
| +For every step of clean-up processing, the tool collects warning, diagnostics
|
| +or notes and print out the logs at the end of the processing.
|
| +
|
| +
|
| +## Installation
|
| +
|
| +```
|
| +cd ${WHERE_PACKAGE_JSON_IS} npm install
|
| +```
|
| +
|
| +The warning from html-tidy package can be safely ignored.
|
| +
|
| +
|
| +## Usage
|
| +
|
| +```
|
| +node layout-test-tidy ${TARGET_PATH}
|
| +```
|
| +
|
| +When the target path is a directory, it scans all the files in the subdirectory.
|
| +Specifying a single file is also valid operation.
|
| +
|
| +```
|
| +node layout-test-tidy ${TARGET_PATH} -v > result.txt
|
| +```
|
| +
|
| +By default, the result will be written to stdout, so you can pipe the result to
|
| +a file as shown above. `-v` or `--verbose` option is useful when collecting
|
| +warnings and notes generated by the tool.
|
| +
|
| +```
|
| +node layout-test-tidy ${TARGET_PATH} -i
|
| +```
|
| +
|
| +For in-place processing, use `-i` or `--inplace` switch.
|
| +
|
| +```
|
| +node layout-test-tidy ${CHROME_SRC}/third_party/WebKit/LayoutTests/webaudio
|
| +```
|
| +
|
| + - If there is a file to be skipped, simply create `skip-tidy` file and add
|
| + absolute file paths of files to be skipped.
|
|
|