]> git.proxmox.com Git - rustc.git/blame - src/test/rustdoc-gui/source-code-page.goml
New upstream version 1.58.1+dfsg1
[rustc.git] / src / test / rustdoc-gui / source-code-page.goml
CommitLineData
136023e0
XL
1goto: file://|DOC_PATH|/src/test_docs/lib.rs.html
2// Check that we can click on the line number.
3click: (40, 224) // This is the position of the span for line 4.
4// Unfortunately, "#4" isn't a valid query selector, so we have to go around that limitation
5// by instead getting the nth span.
6assert-attribute: (".line-numbers > span:nth-child(4)", {"class": "line-highlighted"})
7// We now check that the good spans are highlighted
8goto: file://|DOC_PATH|/src/test_docs/lib.rs.html#4-6
9assert-attribute-false: (".line-numbers > span:nth-child(3)", {"class": "line-highlighted"})
10assert-attribute: (".line-numbers > span:nth-child(4)", {"class": "line-highlighted"})
11assert-attribute: (".line-numbers > span:nth-child(5)", {"class": "line-highlighted"})
12assert-attribute: (".line-numbers > span:nth-child(6)", {"class": "line-highlighted"})
13assert-attribute-false: (".line-numbers > span:nth-child(7)", {"class": "line-highlighted"})
14// This is to ensure that the content is correctly align with the line numbers.
94222f64 15compare-elements-position: ("//*[@id='1']", ".rust > code > span", ("y"))