| OLD | NEW |
| 1 # Writing Layout Tests | 1 # Writing Layout Tests |
| 2 | 2 |
| 3 _Layout tests_ is a bit of a misnomer. This term is | 3 _Layout tests_ is a bit of a misnomer. This term is |
| 4 [a part of our WebKit heritage](https://webkit.org/blog/1452/layout-tests-theory
/), | 4 [a part of our WebKit heritage](https://webkit.org/blog/1452/layout-tests-theory
/), |
| 5 and we use it to refer to every test that is written as a Web page (HTML, SVG, | 5 and we use it to refer to every test that is written as a Web page (HTML, SVG, |
| 6 or XHTML) and lives in | 6 or XHTML) and lives in |
| 7 [third_party/WebKit/LayoutTests/](../../third_party/WebKit/LayoutTests). | 7 [third_party/WebKit/LayoutTests/](../../third_party/WebKit/LayoutTests). |
| 8 | 8 |
| 9 [TOC] | 9 [TOC] |
| 10 | 10 |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 [Google's JavaScript Style Guide](https://google.github.io/styleguide/jsguide.ht
ml), | 299 [Google's JavaScript Style Guide](https://google.github.io/styleguide/jsguide.ht
ml), |
| 300 and | 300 and |
| 301 [Google's HTML/CSS Style Guide](https://google.github.io/styleguide/htmlcssguide
.xml), | 301 [Google's HTML/CSS Style Guide](https://google.github.io/styleguide/htmlcssguide
.xml), |
| 302 with the following exceptions. | 302 with the following exceptions. |
| 303 | 303 |
| 304 * Rules related to Google Closure and JSDoc do not apply. | 304 * Rules related to Google Closure and JSDoc do not apply. |
| 305 * Modern Web Platform and JavaScript features should be preferred to legacy | 305 * Modern Web Platform and JavaScript features should be preferred to legacy |
| 306 constructs that target old browsers. | 306 constructs that target old browsers. |
| 307 * Per the JavaScript guide, new tests should also follow any per-project | 307 * Per the JavaScript guide, new tests should also follow any per-project |
| 308 style guide, such as the | 308 style guide, such as the |
| 309 [ServiceWorker Tests Style guide](http://www.chromium.org/blink/serviceworker/
testing). | 309 [ServiceWorker Tests Style guide](https://www.chromium.org/blink/serviceworker
/testing). |
| 310 | 310 |
| 311 ## JavaScript Tests | 311 ## JavaScript Tests |
| 312 | 312 |
| 313 Whenever possible, the testing criteria should be expressed in JavaScript. The | 313 Whenever possible, the testing criteria should be expressed in JavaScript. The |
| 314 alternatives, which will be described in future sections, result in slower and | 314 alternatives, which will be described in future sections, result in slower and |
| 315 less reliable tests. | 315 less reliable tests. |
| 316 | 316 |
| 317 All new JavaScript tests should be written using the | 317 All new JavaScript tests should be written using the |
| 318 [testharness.js](https://github.com/w3c/testharness.js/) testing framework. This | 318 [testharness.js](https://github.com/w3c/testharness.js/) testing framework. This |
| 319 framework is used by the tests in the | 319 framework is used by the tests in the |
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 880 * The `http/` directory hosts tests that require an HTTP server (see above). | 880 * The `http/` directory hosts tests that require an HTTP server (see above). |
| 881 * The `resources/` subdirectory in every directory contains binary files, such | 881 * The `resources/` subdirectory in every directory contains binary files, such |
| 882 as media files, and code that is shared by multiple test files. | 882 as media files, and code that is shared by multiple test files. |
| 883 | 883 |
| 884 *** note | 884 *** note |
| 885 Some layout tests consist of a minimal HTML page that references a JavaScript | 885 Some layout tests consist of a minimal HTML page that references a JavaScript |
| 886 file in `resources/`. Please do not use this pattern for new tests, as it goes | 886 file in `resources/`. Please do not use this pattern for new tests, as it goes |
| 887 against the minimality principle. JavaScript and CSS files should only live in | 887 against the minimality principle. JavaScript and CSS files should only live in |
| 888 `resources/` if they are shared by at least two test files. | 888 `resources/` if they are shared by at least two test files. |
| 889 *** | 889 *** |
| OLD | NEW |