summary refs log tree commit diff
path: root/src/test/rustdoc-gui
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-07-25 21:41:57 +0000
committerbors <bors@rust-lang.org>2021-07-25 21:41:57 +0000
commit76a3b609d0b93c5d8da5e4e3db37bd03e5cb1c30 (patch)
treecbdb085960c1960f952ed572e1dc9bf497f12146 /src/test/rustdoc-gui
parente742158ef5483b9cd756b193402329af3d4ba177 (diff)
downloadrust-76a3b609d0b93c5d8da5e4e3db37bd03e5cb1c30.tar.gz
rust-76a3b609d0b93c5d8da5e4e3db37bd03e5cb1c30.zip
Rustdoc accessibility: use real headers for doc items
Part of #87059

Partially reverts #84703

Preview at: https://notriddle.com/notriddle-rustdoc-test/real-headers/std/index.html
Diffstat (limited to 'src/test/rustdoc-gui')
-rw-r--r--src/test/rustdoc-gui/font-weight.goml6
-rw-r--r--src/test/rustdoc-gui/implementors.goml4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/test/rustdoc-gui/font-weight.goml b/src/test/rustdoc-gui/font-weight.goml
index 84e898660fa..92ad92a8c34 100644
--- a/src/test/rustdoc-gui/font-weight.goml
+++ b/src/test/rustdoc-gui/font-weight.goml
@@ -2,9 +2,9 @@ goto: file://|DOC_PATH|/lib2/struct.Foo.html
 // This test checks that the font weight is correctly applied.
 assert-css: ("//*[@class='docblock type-decl']//a[text()='Alias']", {"font-weight": "400"})
 assert-css: ("//*[@class='structfield small-section-header']//a[text()='Alias']", {"font-weight": "400"})
-assert-css: ("#method\.a_method > code", {"font-weight": "600"})
-assert-css: ("#associatedtype\.X > code", {"font-weight": "600"})
-assert-css: ("#associatedconstant\.Y > code", {"font-weight": "600"})
+assert-css: ("#method\.a_method > .code-header", {"font-weight": "600"})
+assert-css: ("#associatedtype\.X > .code-header", {"font-weight": "600"})
+assert-css: ("#associatedconstant\.Y > .code-header", {"font-weight": "600"})
 
 goto: file://|DOC_PATH|/test_docs/type.SomeType.html
 assert-css: (".top-doc .docblock p", {"font-weight": "400"}, ALL)
diff --git a/src/test/rustdoc-gui/implementors.goml b/src/test/rustdoc-gui/implementors.goml
index a4db5cee7c7..87e4f2a7bd1 100644
--- a/src/test/rustdoc-gui/implementors.goml
+++ b/src/test/rustdoc-gui/implementors.goml
@@ -8,9 +8,9 @@ assert-count: ("#implementors-list > .impl", 2)
 assert: ("#implementors-list > .impl:nth-child(1) > a.anchor")
 assert-attribute: ("#implementors-list > .impl:nth-child(1)", {"id": "impl-Whatever"})
 assert-attribute: ("#implementors-list > .impl:nth-child(1) > a.anchor", {"href": "#impl-Whatever"})
-assert: "#implementors-list > .impl:nth-child(1) > code.in-band"
+assert: "#implementors-list > .impl:nth-child(1) > .code-header.in-band"
 
 assert: ("#implementors-list > .impl:nth-child(2) > a.anchor")
 assert-attribute: ("#implementors-list > .impl:nth-child(2)", {"id": "impl-Whatever-1"})
 assert-attribute: ("#implementors-list > .impl:nth-child(2) > a.anchor", {"href": "#impl-Whatever-1"})
-assert: "#implementors-list > .impl:nth-child(2) > code.in-band"
+assert: "#implementors-list > .impl:nth-child(2) > .code-header.in-band"