Reland "webauthn: implement getPublicKey() and friends."

This reverts commit e2c1b358db1755a91f62f4c27a1d220bd326c742.

https://chromium-review.googlesource.com/c/chromium/src/+/2238777 updates some Java tests with non-dummy data that should avoid causing problems.

Original change's description:
> Revert "webauthn: implement getPublicKey() and friends."
>
> This reverts commit c5d236776cd30849a65ca626e51cd19e651da7c6.
>
> Reason for revert: I suspect that this CL causes Fido2CredentialRequestTest failures on android-pie-x86-rel:
> https://ci.chromium.org/p/chromium/builders/ci/android-pie-x86-rel
>
> Here is a snippet of callstack:
> java.lang.AssertionError: expected:<11> but was:<0>
> 	at org.junit.Assert.fail(Assert.java:88)
> 	at org.junit.Assert.failNotEquals(Assert.java:834)
> 	at org.junit.Assert.assertEquals(Assert.java:118)
> 	at org.junit.Assert.assertEquals(Assert.java:144)
> 	at org.chromium.chrome.browser.webauth.Fido2CredentialRequestTest.testMakeCredential_attestationIndirect(Fido2CredentialRequestTest.java:921)
>
> Here is sample failure:
> https://00e9e64bac4dbda9c3b8a07931c85e48f4420a03929ffbcaf5-apidata.googleusercontent.com/download/storage/v1/b/chromium-result-details/o/html%2Fchrome_public_test_apk_android-pie-x86-rel_990_2020_06_09_T16_33_45-UTC?qk=AD5uMEvQvMK8K2ZyV-tHIDwdTtLEnQK-X1Mw0ohWLQeOpgogj0sVgm_7y9e5CdF-FMV6ObBmwjpVxD6Jh8_7VTv4z2FpOutuS8Gd6qQH5OxikfytS8cKFb_SRCCQXIgWq45BwD7DediOcKTF-UZea_JAoFuHO0ljO0PRqnkFYSoIHcPONuqaszXChp63b5o4VAKYsofAHDhpHru_hiAf6xUyfK91I8cr-2sdHjQU6Ks4XQIIWVnq2PSAiysd6hNeq51qWPEaX7HS8hCwWIpe55Xq9hIWLOtab3MY1WLLxM3UuWMY8IDCKfcvnrTiQMcRyeD7Iii33jHhC8-rDGttfDEl39kpFnWynDC-C0TmPFoCJVkl7mHxz0uCNlQJ3I0Rt_F2DTqA96qIKrpwEltNs96-0j1VgSOJCjU3s4od6h7juoIxpH5HThyg7G-fB1-MWzv7mQfAE5ZBilodU0CKMsFrnN_5Kf4thAbDj-RJUiUNpy0A9swLOhMLjEsfxQeDRldVvy9OVUNvcakhJziml5iA7LWoDB58E3eGTyUi-dA5aOLN3KWLR7T452j4MwnCHC5vTRNxxGxCkemgQQDkl1fHJas1u6GUcY4_ncvhIuGvLsfg8uqWpzFuau4CFamGC2USpyVpNIeNhpcf2w-lYzG1rkHjHWYgUKSvhoaItY3oeRFjnkYMgZrDsy8QmneuVVGTPd4nzoWWaCZbaG9ZaF80xRu9YhYnTUXI7GqQF1rlst09Mqu8IvDXo9dgYzodInIA6p3H7azZgnvCfzYUxL4QVrvskyjTQCITmz-o2W6CPUzBqWJhWLRTpZYcVSV7z8zjj1cFwDQPBKpJzQDRrtC1sZCM0WrmQ7oSNeU-AH3uBaNWeGBF2rkY8-9gx8dlr38DGQvXoKZVWHWi61jVnQhac27ctKBLKQ&isca=1
>
> Original change's description:
> > webauthn: implement getPublicKey() and friends.
> >
> > This change implements the getPublicKey(), getPublicKeyAlgorithm(), and
> > getAuthenticatorData() functions described in the editor's draft of
> > WebAuthn level two[1].
> >
> > [1] https://w3c.github.io/webauthn/#sctn-public-key-easy
> >
> > BUG=1083301
> >
> > Change-Id: I3a03279d5239a9f8df50a78f2166f30d01d38d3e
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2204087
> > Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> > Reviewed-by: Ken Buchanan <kenrb@chromium.org>
> > Reviewed-by: Alex Russell <slightlyoff@chromium.org>
> > Reviewed-by: Jared Saul <jsaul@google.com>
> > Reviewed-by: Adam Langley <agl@chromium.org>
> > Reviewed-by: Nina Satragno <nsatragno@chromium.org>
> > Reviewed-by: Martin Kreichgauer <martinkr@google.com>
> > Commit-Queue: Adam Langley <agl@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#776517}
>
> TBR=kenrb@chromium.org,agl@chromium.org,slightlyoff@chromium.org,nsatragno@chromium.org,agrieve@chromium.org,jsaul@google.com,martinkr@google.com
>
> Change-Id: I7429b5b7ecd7fa38c4e1ec2905b80a15e7c64216
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1083301
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2238749
> Reviewed-by: Pavel Yatsuk <pavely@chromium.org>
> Commit-Queue: Pavel Yatsuk <pavely@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#776637}

TBR=kenrb@chromium.org,agl@chromium.org,slightlyoff@chromium.org,pavely@chromium.org,nsatragno@chromium.org,agrieve@chromium.org,jsaul@google.com,martinkr@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1083301
Change-Id: I9e3c8278dde4b61b7a45b6277f48fe018b3a8188
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2241341
Reviewed-by: Adam Langley <agl@chromium.org>
Commit-Queue: Adam Langley <agl@chromium.org>
Cr-Commit-Position: refs/heads/master@{#777424}
2 files changed
tree: e7e07f221dbc3e2e73f6f7b2c63dfd77acc329b8
  1. .github/
  2. .well-known/
  3. accelerometer/
  4. accname/
  5. acid/
  6. ambient-light/
  7. animation-worklet/
  8. annotation-model/
  9. annotation-protocol/
  10. annotation-vocab/
  11. apng/
  12. appmanifest/
  13. audio-output/
  14. background-fetch/
  15. BackgroundSync/
  16. badging/
  17. battery-status/
  18. beacon/
  19. bluetooth/
  20. clear-site-data/
  21. client-hints/
  22. clipboard-apis/
  23. common/
  24. compat/
  25. compression/
  26. conformance-checkers/
  27. console/
  28. contacts/
  29. content-dpr/
  30. content-index/
  31. content-security-policy/
  32. contenteditable/
  33. cookie-store/
  34. cookies/
  35. core-aam/
  36. cors/
  37. credential-management/
  38. css/
  39. custom-elements/
  40. delegated-ink/
  41. device-memory/
  42. docs/
  43. document-policy/
  44. dom/
  45. domparsing/
  46. domxpath/
  47. dpub-aam/
  48. dpub-aria/
  49. editing/
  50. element-timing/
  51. encoding/
  52. encoding-detection/
  53. encrypted-media/
  54. entries-api/
  55. event-timing/
  56. eventsource/
  57. feature-policy/
  58. fetch/
  59. FileAPI/
  60. fonts/
  61. forced-colors-mode/
  62. fullscreen/
  63. gamepad/
  64. generic-sensor/
  65. geolocation-API/
  66. geolocation-sensor/
  67. graphics-aam/
  68. gyroscope/
  69. hr-time/
  70. html/
  71. html-longdesc/
  72. html-media-capture/
  73. idle-detection/
  74. imagebitmap-renderingcontext/
  75. images/
  76. import-maps/
  77. IndexedDB/
  78. inert/
  79. infrastructure/
  80. input-device-capabilities/
  81. input-events/
  82. installedapp/
  83. interfaces/
  84. intersection-observer/
  85. js/
  86. js-self-profiling/
  87. keyboard-lock/
  88. keyboard-map/
  89. largest-contentful-paint/
  90. layout-instability/
  91. lifecycle/
  92. loading/
  93. longtask-timing/
  94. magnetometer/
  95. manifest/
  96. mathml/
  97. measure-memory/
  98. media/
  99. media-capabilities/
  100. media-feeds/
  101. media-playback-quality/
  102. media-source/
  103. mediacapture-depth/
  104. mediacapture-fromelement/
  105. mediacapture-image/
  106. mediacapture-record/
  107. mediacapture-streams/
  108. mediasession/
  109. mimesniff/
  110. mixed-content/
  111. mst-content-hint/
  112. native-file-system/
  113. native-io/
  114. navigation-timing/
  115. netinfo/
  116. network-error-logging/
  117. notifications/
  118. old-tests/
  119. orientation-event/
  120. orientation-sensor/
  121. origin-isolation/
  122. origin-policy/
  123. page-lifecycle/
  124. page-visibility/
  125. paint-timing/
  126. payment-handler/
  127. payment-method-basic-card/
  128. payment-method-id/
  129. payment-request/
  130. performance-timeline/
  131. periodic-background-sync/
  132. permissions/
  133. permissions-request/
  134. permissions-revoke/
  135. picture-in-picture/
  136. pointerevents/
  137. pointerlock/
  138. portals/
  139. preload/
  140. presentation-api/
  141. priority-hints/
  142. proximity/
  143. push-api/
  144. quirks/
  145. referrer-policy/
  146. remote-playback/
  147. reporting/
  148. requestidlecallback/
  149. resize-observer/
  150. resource-timing/
  151. resources/
  152. screen-capture/
  153. screen-orientation/
  154. screen-wake-lock/
  155. screen_enumeration/
  156. scroll-animations/
  157. scroll-to-text-fragment/
  158. secure-contexts/
  159. selection/
  160. serial/
  161. server-timing/
  162. service-workers/
  163. shadow-dom/
  164. shape-detection/
  165. signed-exchange/
  166. speech-api/
  167. storage/
  168. storage-access-api/
  169. streams/
  170. subresource-integrity/
  171. svg/
  172. svg-aam/
  173. timing-entrytypes-registry/
  174. tools/
  175. touch-events/
  176. trust-tokens/
  177. trusted-types/
  178. uievents/
  179. upgrade-insecure-requests/
  180. url/
  181. user-timing/
  182. vibration/
  183. video-rvfc/
  184. visual-viewport/
  185. wai-aria/
  186. wasm/
  187. web-animations/
  188. web-bundle/
  189. web-locks/
  190. web-nfc/
  191. web-share/
  192. webaudio/
  193. webauthn/
  194. WebCryptoAPI/
  195. webdriver/
  196. webgl/
  197. webgpu/
  198. WebIDL/
  199. webmessaging/
  200. webmidi/
  201. webrtc/
  202. webrtc-extensions/
  203. webrtc-identity/
  204. webrtc-insertable-streams/
  205. webrtc-priority/
  206. webrtc-quic/
  207. webrtc-stats/
  208. webrtc-svc/
  209. websockets/
  210. webstorage/
  211. webtransport/
  212. webusb/
  213. webvr/
  214. webvtt/
  215. webxr/
  216. workers/
  217. worklets/
  218. x-frame-options/
  219. xhr/
  220. xslt/
  221. .azure-pipelines.yml
  222. .codecov.yml
  223. .gitattributes
  224. .gitignore
  225. .mailmap
  226. .pyup.yml
  227. .taskcluster.yml
  228. CODE_OF_CONDUCT.md
  229. CODEOWNERS
  230. CONTRIBUTING.md
  231. LICENSE.md
  232. lint.ignore
  233. README.md
  234. testharness_runner.html
  235. update-built-tests.sh
  236. wpt
  237. wpt.py
README.md

The web-platform-tests Project

Taskcluster CI Status documentation manifest Python 3

The web-platform-tests Project is a cross-browser test suite for the Web-platform stack. Writing tests in a way that allows them to be run in all browsers gives browser projects confidence that they are shipping software that is compatible with other implementations, and that later implementations will be compatible with their implementations. This in turn gives Web authors/developers confidence that they can actually rely on the Web platform to deliver on the promise of working across browsers and devices without needing extra layers of abstraction to paper over the gaps left by specification editors and implementors.

The most important sources of information and activity are:

  • github.com/web-platform-tests/wpt: the canonical location of the project's source code revision history and the discussion forum for changes to the code
  • web-platform-tests.org: the documentation website; details how to set up the project, how to write tests, how to give and receive peer review, how to serve as an administrator, and more
  • wpt.live: a public deployment of the test suite, allowing anyone to run the tests by visiting from an Internet-enabled browser of their choice
  • wpt.fyi: an archive of test results collected from an array of web browsers on a regular basis
  • Real-time chat room: the IRC chat room named #testing on irc.w3.org; includes participants located around the world, but busiest during the European working day; all discussion is archived here
  • Mailing list: a public and low-traffic discussion list
  • RFCs: a repo for requesting comments on substantial changes that would impact other stakeholders or users; people who work on WPT infra are encouraged to watch the repo.

If you'd like clarification about anything, don't hesitate to ask in the chat room or on the mailing list.

Setting Up the Repo

Clone or otherwise get https://github.com/web-platform-tests/wpt.

Note: because of the frequent creation and deletion of branches in this repo, it is recommended to “prune” stale branches when fetching updates, i.e. use git pull --prune (or git fetch -p && git merge).

Running the Tests

See the documentation website and in particular the system setup for running tests locally.

Command Line Tools

The wpt command provides a frontend to a variety of tools for working with and running web-platform-tests. Some of the most useful commands are:

  • wpt serve - For starting the wpt http server
  • wpt run - For running tests in a browser
  • wpt lint - For running the lint against all tests
  • wpt manifest - For updating or generating a MANIFEST.json test manifest
  • wpt install - For installing the latest release of a browser or webdriver server on the local machine.
  • wpt serve-wave - For starting the wpt http server and the WAVE test runner. For more details on how to use the WAVE test runner see the documentation.

Windows Notes

On Windows wpt commands must be prefixed with python or the path to the python binary (if python is not in your %PATH%).

python wpt [command]

Alternatively, you may also use Bash on Ubuntu on Windows in the Windows 10 Anniversary Update build, then access your windows partition from there to launch wpt commands.

Please make sure git and your text editor do not automatically convert line endings, as it will cause lint errors. For git, please set git config core.autocrlf false in your working tree.

Publication

The master branch is automatically synced to http://w3c-test.org/.

Pull requests are automatically mirrored except those that modify sensitive resources (such as .py). The latter require someone with merge access to comment with “LGTM” or “w3c-test:mirror” to indicate the pull request has been checked.

Branches

In the vast majority of cases the only upstream branch that you should need to care about is master. If you see other branches in the repository, you can generally safely ignore them.

Contributing

Save the Web, Write Some Tests!

Absolutely everyone is welcome to contribute to test development. No test is too small or too simple, especially if it corresponds to something for which you've noted an interoperability bug in a browser.

The way to contribute is just as usual:

  • Fork this repository (and make sure you're still relatively in sync with it if you forked a while ago).
  • Create a branch for your changes: git checkout -b topic.
  • Make your changes.
  • Run ./wpt lint as described above.
  • Commit locally and push that to your repo.
  • Create a pull request based on the above.

Issues with web-platform-tests

If you spot an issue with a test and are not comfortable providing a pull request per above to fix it, please file a new issue. Thank you!