]> git.proxmox.com Git - rustc.git/blame - src/test/rustdoc-gui/font-weight.goml
Update unsuspicious file list
[rustc.git] / src / test / rustdoc-gui / font-weight.goml
CommitLineData
136023e0 1// This test checks that the font weight is correctly applied.
2b03887a
FG
2goto: "file://" + |DOC_PATH| + "/lib2/struct.Foo.html"
3assert-css: ("//*[@class='item-decl']//a[text()='Alias']", {"font-weight": "400"})
a2a8927a
XL
4assert-css: (
5 "//*[@class='structfield small-section-header']//a[text()='Alias']",
6 {"font-weight": "400"},
7)
136023e0
XL
8assert-css: ("#method\.a_method > .code-header", {"font-weight": "600"})
9assert-css: ("#associatedtype\.X > .code-header", {"font-weight": "600"})
10assert-css: ("#associatedconstant\.Y > .code-header", {"font-weight": "600"})
11
2b03887a 12goto: "file://" + |DOC_PATH| + "/test_docs/type.SomeType.html"
136023e0
XL
13assert-css: (".top-doc .docblock p", {"font-weight": "400"}, ALL)
14
2b03887a
FG
15goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
16assert-css: (".impl-items .method > .code-header", {"font-weight": "600"}, ALL)
136023e0 17
2b03887a 18goto: "file://" + |DOC_PATH| + "/lib2/trait.Trait.html"
94222f64
XL
19
20// This is a complex selector, so here's how it works:
21//
2b03887a 22// * //*[@class='item-decl'] — selects element of any tag with classes docblock and item-decl
94222f64
XL
23// * /pre[@class='rust trait'] — selects immediate child with tag pre and classes rust and trait
24// * /code — selects immediate child with tag code
25// * /a[@class='constant'] — selects immediate child with tag a and class constant
26// * //text() — selects child that is text node
27// * /parent::* — selects immediate parent of the text node (the * means it can be any tag)
28//
29// This uses '/parent::*' as a proxy for the style of the text node.
30// We can't just select the '<a>' because intermediate tags could be added.
a2a8927a 31assert-count: (
2b03887a 32 "//*[@class='item-decl']/pre[@class='rust trait']/code/a[@class='constant']//text()/parent::*",
a2a8927a
XL
33 1,
34)
35assert-css: (
2b03887a 36 "//*[@class='item-decl']/pre[@class='rust trait']/code/a[@class='constant']//text()/parent::*",
a2a8927a
XL
37 {"font-weight": "400"},
38)
94222f64 39
a2a8927a
XL
40assert-count: (".methods .associatedtype", 1)
41assert-css: (".methods .associatedtype", {"font-weight": "600"})
136023e0
XL
42assert-count: (".methods .constant", 1)
43assert-css: (".methods .constant", {"font-weight": "600"})
2b03887a 44assert-css: (".methods .method > .code-header", {"font-weight": "600"})