Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Unified Diff: third_party/WebKit/LayoutTests/webaudio/tools/README.md

Issue 2872393002: Add layout-test-tidy to LayoutTests/webaudio/tools (Closed)
Patch Set: Remove indentation hack after l-g-t-m Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.

Powered by Google App Engine
This is Rietveld 408576698