tree: c13a0127420b59da75450cc8ec1e1665e503e349 [path history] [tgz]
  1. reference/
  2. html-ruby-001.html
  3. html-ruby-002.html
  4. html-ruby-003.html
  5. html-ruby-004.html
  6. html-ruby-005.html
  7. html-ruby-006.html
  8. html-ruby-007.html
  9. html-ruby-008.html
  10. html-ruby-009.html
  11. html-ruby-010.html
  12. html-ruby-011.html
  13. html-ruby-012.html
  14. html-ruby-013.html
  15. html-ruby-014.html
  16. html-ruby-015.html
  17. html-ruby-016.html
  18. html-ruby-101.html
  19. html-ruby-102.html
  20. html-ruby-103.html
  21. html-ruby-104.html
  22. html-ruby-105.html
  23. html-ruby-106.html
  24. html-ruby-107.html
  25. html-ruby-108.html
  26. html-ruby-109.html
  27. html-ruby-110.html
  28. html-ruby-111.html
  29. html-ruby-112.html
  30. html-ruby-201.html
  31. html-ruby-202.html
  32. html-ruby-203.html
  33. html-ruby-204.html
  34. html-ruby-205.html
  35. html-ruby-206.html
  36. html-ruby-207.html
  37. html-ruby-208.html
  38. html-ruby-209.html
  39. html-ruby-210.html
  40. html-ruby-211.html
  41. html-ruby-212.html
  42. html-ruby-301.html
  43. html-ruby-302.html
  44. html-ruby-303.html
  45. html-ruby-304.html
  46. html-ruby-305.html
  47. html-ruby-306.html
  48. html-ruby-307.html
  49. html-ruby-308.html
  50. html-ruby-309.html
  51. html-ruby-310.html
  52. html-ruby-311.html
  53. html-ruby-312.html
  54. html-ruby-313.html
  55. html-ruby-314.html
  56. html-ruby-315.html
  57. html-ruby-316.html
  58. html-ruby-401.html
  59. html-ruby-402.html
  60. html-ruby-403.html
  61. html-ruby-404.html
  62. html-ruby-405.html
  63. html-ruby-406.html
  64. html-ruby-407.html
  65. html-ruby-408.html
  66. html-ruby-409.html
  67. html-ruby-410.html
  68. html-ruby-411.html
  69. html-ruby-412.html
  70. html-ruby-413.html
  71. html-ruby-414.html
  72. html-ruby-415.html
  73. html-ruby-416.html
  74. html-ruby-501.html
  75. html-ruby-502.html
  76. html-ruby-503.html
  77. html-ruby-504.html
  78. html-ruby-601.html
  79. html-ruby-602.html
  80. html-ruby-603.html
  81. html-ruby-604.html
  82. html-ruby-701.html
  83. html-ruby-702.html
  84. html-ruby-703.html
  85. html-ruby-704.html
  86. README.md
html-ruby-extensions/README.md

Tests for HTML Ruby Markup extensions

Specification: https://www.w3.org/TR/html-ruby-extensions/

WARNING: These are manual tests. There is some support for automation, but the results must be evaluated manually. Simply relying on automated reports of tests passing is not sufficient.

These tests are hard to write reliably, because without relying on a styling mechanism (which should be tested separately), there's no prescribed rendering, yet the rendering is how we can tell whether the markup did the right thing: ruby must be segmented correctly, and the correct ruby annotation must be paired with the correct base. That is something you can tell visually.

The approach taken here follows the same logic as the pre-existing html/semantics/text-level-semantics/the-ruby-element/ruby-usage.html: use a mismatch ref-test against what the rendering is likely to be if the browser didn‘t do anything, or did the wrong thing. In that original example, the mismatch reference is simply what you’d get in a browser with no support for ruby at all. The tests in this directory do that too, and add a few variants of possible wrong renderings, some attested in existing layout engines, some “just in case”.

As such, automated test failures are indicative of something being wrong with the implementation, but tests passing could be false positives: maybe it is implemented right, or maybe it is implemented wrong in a novel way.

Therefore, each test is written including a description of the pass condition, in a way that can be evaluated by a person looking at the test.

It would be better to write these tests so that their pass condition can be automated, but as far as I can tell, that's not reliably doable.

For instance, it might be tempting to use <ruby>X<rt>1</rt>Y<rt>2</rt></ruby> or <ruby>X<rt>1</ruby><ruby>Y<rt>2</ruby> as a reference for <ruby><rb>X<rb>Y<rt>1<rt>2</ruby> as they are defined to have the same base/annotation pairing, but it is not required that they have precisely the same rendering. And indeed, some implementations do vary (notably in terms of base/annotation alignment).

So we're left with semi-manual tests.

Anyone finding false positives is encouraged to add corresponding mismatch references.