1 // Checks that the setting "line numbers" is working as expected.
2 goto: file://|DOC_PATH|/test_docs/fn.foo.html
4 // We check that without this setting, there is no line number displayed.
5 assert-false: "pre.line-number"
7 // We now set the setting to show the line numbers on code examples.
8 local-storage: {"rustdoc-line-numbers": "true" }
9 // We reload to make the line numbers appear.
12 // We wait for them to be added into the DOM by the JS...
13 wait-for: "pre.line-number"
14 // If the test didn't fail, it means that it was found!
15 // Let's now check some CSS properties...
16 assert-css: ("pre.line-number", {
18 "padding": "13px 8px",
19 "text-align": "right",
21 // The first code block has two lines so let's check its `<pre>` elements lists both of them.
22 assert-text: ("pre.line-number", "1\n2")