| OLD | NEW |
| 1 # Web Platform Tests | 1 # Web Platform Tests |
| 2 | 2 |
| 3 Interoperability between browsers is | 3 Interoperability between browsers is |
| 4 [critical](https://www.chromium.org/blink/platform-predictability) to | 4 [critical](https://www.chromium.org/blink/platform-predictability) to Chromium's |
| 5 Chromium's mission of improving the web. We believe that leveraging and | 5 mission of improving the web. We believe that leveraging and contributing to a |
| 6 contributing to a shared test suite is one of the most important tools in | 6 shared test suite is one of the most important tools in achieving |
| 7 achieving interoperability between browsers. The [web-platform-tests | 7 interoperability between browsers. The [web-platform-tests |
| 8 repository](https://github.com/w3c/web-platform-tests) is the primary shared | 8 repository](https://github.com/w3c/web-platform-tests) is the primary shared |
| 9 test suite where all browser engines are collaborating. There's also a | 9 test suite where all browser engines are collaborating. There's also a |
| 10 [csswg-test repository](https://github.com/w3c/csswg-test) for CSS tests, but | 10 [csswg-test repository](https://github.com/w3c/csswg-test) for CSS tests, but |
| 11 that will [soon be merged into | 11 that will [soon be merged into |
| 12 web-platform-tests](https://github.com/w3c/csswg-test/issues/1102). | 12 web-platform-tests](https://github.com/w3c/csswg-test/issues/1102). |
| 13 | 13 |
| 14 [TOC] | 14 [TOC] |
| 15 | 15 |
| 16 ## Import | 16 ## Import |
| 17 | 17 |
| 18 Chromium has mirrors | 18 Chromium has mirrors |
| 19 ([web-platform-tests](https://chromium.googlesource.com/external/w3c/web-platfor
m-tests/), | 19 ([web-platform-tests](https://chromium.googlesource.com/external/w3c/web-platfor
m-tests/), |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 ### Manual import | 54 ### Manual import |
| 55 | 55 |
| 56 To pull the latest versions of the tests that are currently being imported, you | 56 To pull the latest versions of the tests that are currently being imported, you |
| 57 can also directly invoke the | 57 can also directly invoke the |
| 58 [wpt-import](../../third_party/WebKit/Tools/Scripts/wpt-import) script. | 58 [wpt-import](../../third_party/WebKit/Tools/Scripts/wpt-import) script. |
| 59 | 59 |
| 60 That script will pull the latest version of the tests from our mirrors of the | 60 That script will pull the latest version of the tests from our mirrors of the |
| 61 upstream repositories. If any new versions of tests are found, they will be | 61 upstream repositories. If any new versions of tests are found, they will be |
| 62 committed locally to your local repository. You may then upload the changes. | 62 committed locally to your local repository. You may then upload the changes. |
| 63 | 63 |
| 64 ### Enabling import for a new directory |
| 65 |
| 64 If you wish to add more tests (by un-skipping some of the directories currently | 66 If you wish to add more tests (by un-skipping some of the directories currently |
| 65 skipped in `W3CImportExpectations`), you can modify that file locally and commit | 67 skipped in `W3CImportExpectations`), you can modify that file locally and commit |
| 66 it, and on the next auto-import, the new tests should be imported. If you want | 68 it, and on the next auto-import, the new tests should be imported. |
| 67 to import immediately, you can also run `wpt-import --allow-local-commits`. | 69 |
| 70 If you want to import immediately (in order to try the tests out locally, etc) |
| 71 you can also run `wpt-import --allow-local-commits`, but this is not required. |
| 68 | 72 |
| 69 ## Contributing tests back to the Web Platform Tests project. | 73 ## Contributing tests back to the Web Platform Tests project. |
| 70 | 74 |
| 71 If you need to make changes to Web Platform Tests, just commit your changes | 75 If you need to make changes to Web Platform Tests, just commit your changes |
| 72 directly to | 76 directly to |
| 73 [LayoutTests/external/wpt](../../third_party/WebKit/LayoutTests/external/wpt) | 77 [LayoutTests/external/wpt](../../third_party/WebKit/LayoutTests/external/wpt) |
| 74 and the changes will be automatically upstreamed within 24 hours. | 78 and the changes will be automatically upstreamed within 24 hours. |
| 75 | 79 |
| 76 Note that tests in Web Platform Tests are expected to match behavior defined by | 80 Note that tests in Web Platform Tests are expected to match behavior defined by |
| 77 the relevant WHATWG or W3C specification, not simply Blink's behavior. If in | 81 the relevant WHATWG or W3C specification, not simply Blink's behavior. If in |
| 78 doubt, please request code review from someone with expertise in the relevant | 82 doubt, please request code review from someone with expertise in the relevant |
| 79 specification text. | 83 specification text. |
| 80 | 84 |
| 81 Note: if you're adding a new test in `external/wpt`, you'll need to re-generate | 85 Note: if you're adding a new test in `external/wpt`, you'll need to re-generate |
| 82 MANIFEST.json manually until [CL 2644783003](https://crrev.com/2644783003) is | 86 MANIFEST.json manually until [CL 2644783003](https://crrev.com/2644783003) is |
| 83 landed. The command to do so is: | 87 landed. The command to do so is: |
| 84 | 88 |
| 85 ```bash | 89 ```bash |
| 86 Tools/Scripts/webkitpy/thirdparty/wpt/wpt/manifest --work \ | 90 Tools/Scripts/webkitpy/thirdparty/wpt/wpt/manifest --work \ |
| 87 --tests-root=LayoutTests/external/wpt | 91 --tests-root=LayoutTests/external/wpt |
| 88 ``` | 92 ``` |
| 89 | 93 |
| 94 ### What kinds of changes can be upstreamed? |
| 95 |
| 96 In general, changes involving adding, removing or modifying tests can all be |
| 97 upstreamed. From a Chromium commit, any changes outside of |
| 98 [external/wpt](../../third_party/WebKit/LayoutTests/external/wpt) will not be |
| 99 upstreamed, and any changes `*-expected.txt`, `OWNERS`, and `MANIFEST.json`, |
| 100 will also not be upstreamed. |
| 101 |
| 102 Entirely new top-level directories should generally be added upstream, since |
| 103 that's the only way to add an OWNERS file upstream. After adding a new top-level |
| 104 directory upstream, you should add a line for it in `W3CImportExpectations`. |
| 105 |
| 90 ### Will the exported commits be linked to my GitHub profile? | 106 ### Will the exported commits be linked to my GitHub profile? |
| 91 | 107 |
| 92 The email you commit with in Chromium will be the author of the commit on | 108 The email you commit with in Chromium will be the author of the commit on |
| 93 GitHub. You can [add it as a secondary address on your GitHub | 109 GitHub. You can [add it as a secondary address on your GitHub |
| 94 account](https://help.github.com/articles/adding-an-email-address-to-your-github
-account/) | 110 account](https://help.github.com/articles/adding-an-email-address-to-your-github
-account/) |
| 95 to link your exported commits to your GitHub profile. | 111 to link your exported commits to your GitHub profile. |
| 96 | 112 |
| 97 ### What if there are conflicts? | 113 ### What if there are conflicts? |
| 98 | 114 |
| 99 This cannot be avoided entirely as the two repositories are independent, but | 115 This cannot be avoided entirely as the two repositories are independent, but |
| 100 should be rare with frequent imports and exports. When it does happen, manual | 116 should be rare with frequent imports and exports. When it does happen, manual |
| 101 intervention will be needed and in non-trivial cases you may be asked to help | 117 intervention will be needed and in non-trivial cases you may be asked to help |
| 102 resolve the conflict. | 118 resolve the conflict. |
| 103 | 119 |
| 104 ### Direct pull requests | 120 ### Direct pull requests |
| 105 | 121 |
| 106 It's still possible to make direct pull requests to web-platform-tests. The | 122 It's still possible to make direct pull requests to web-platform-tests. The |
| 107 processes for getting new tests committed the W3C repos are at | 123 processes for getting new tests committed the W3C repos are at |
| 108 http://testthewebforward.org/docs/. Some specifics are at | 124 http://testthewebforward.org/docs/. Some specifics are at |
| 109 http://testthewebforward.org/docs/github-101.html. | 125 http://testthewebforward.org/docs/github-101.html. |
| OLD | NEW |