Chromium Code Reviews| 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..9b0bffa14d12b87b5b01473384db4d2ca58b087f |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/webaudio/tools/README.md |
| @@ -0,0 +1,36 @@ |
| +# 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.) |
|
Raymond Toy
2017/05/10 21:28:43
These lines can be wrapped to 80 columns for markd
hongchan
2017/05/11 21:13:01
"When you do want to insert a break tag using Mark
|
| + |
| +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 |
| + |
| +``` |
| +# Run the tool at a target path or a file. |
| +node layout-test-tidy ${TARGET_PATH} |
| + |
| +# Dry run and piping. |
|
Raymond Toy
2017/05/10 21:28:43
Add a note that you need to inspect result.txt bec
hongchan
2017/05/11 21:13:01
Done.
|
| +node layout-test-tidy ${TARGET_PATH} --dryrun > result.txt |
|
Raymond Toy
2017/05/10 21:28:43
I would really like it if layout-test-tidy would r
hongchan
2017/05/11 21:13:01
Make sense, but it sounds like a big change for th
|
| + |
| +# Sample command for LayoutTests/webaudio. |
| +node layout-test-tidy ${CHROMIUM_SRC}/third_party/WebKit/LayoutTests/webaudio |
| +``` |
| + |
| + - If there is a file to be skipped, simply add its absolute file path to |skip-tidy| file. |
|
Raymond Toy
2017/05/10 21:28:43
Do we really want to support a skip-tidy file? I'm
hongchan
2017/05/11 21:13:01
If you want to leave out certain files for some re
|