diff options
| author | Michael Howell <michael@notriddle.com> | 2022-10-04 11:54:40 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2022-10-05 16:56:07 -0700 |
| commit | 3cb03cb34247383ffb67a017ae70134741e8c4da (patch) | |
| tree | 0bef7997b57c9dd1132e5b3664d23aefbb9d8381 /src/test | |
| parent | c97d02cdb5ca5f5e9eff1fa9e4560d220d1fd2a0 (diff) | |
| download | rust-3cb03cb34247383ffb67a017ae70134741e8c4da.tar.gz rust-3cb03cb34247383ffb67a017ae70134741e8c4da.zip | |
rustdoc: remove unused CSS class `in-band`
Since a7c25b29575c17434406b69773f8c2961af343b3 removed `in-band` from code headers, the only remaining uses of the `in-band` class are: https://github.com/rust-lang/rust/blob/02cd79afb8080fce8c8ce35533c54d8ecf8f390e/src/librustdoc/html/render/write_shared.rs#L520-L521 https://github.com/rust-lang/rust/blob/02cd79afb8080fce8c8ce35533c54d8ecf8f390e/src/librustdoc/html/templates/print_item.html#L2-L3 https://github.com/rust-lang/rust/blob/02cd79afb8080fce8c8ce35533c54d8ecf8f390e/src/librustdoc/html/render/context.rs#L637-L638 https://github.com/rust-lang/rust/blob/02cd79afb8080fce8c8ce35533c54d8ecf8f390e/src/librustdoc/html/render/mod.rs#L368-L369 https://github.com/rust-lang/rust/blob/02cd79afb8080fce8c8ce35533c54d8ecf8f390e/src/librustdoc/html/render/mod.rs#L401-L402 https://github.com/rust-lang/rust/blob/02cd79afb8080fce8c8ce35533c54d8ecf8f390e/src/librustdoc/html/static/js/main.js#L525 Since all of these uses are nested below `h1.fqn`, we can get rid of it, and the support code that was used for when `in-band` was part of item rendering.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/rustdoc-gui/anchors.goml | 18 | ||||
| -rw-r--r-- | src/test/rustdoc-gui/search-result-go-to-first.goml | 6 | ||||
| -rw-r--r-- | src/test/rustdoc-gui/toggle-click-deadspace.goml | 2 | ||||
| -rw-r--r-- | src/test/rustdoc/index-page.rs | 2 | ||||
| -rw-r--r-- | src/test/rustdoc/keyword.rs | 2 | ||||
| -rw-r--r-- | src/test/rustdoc/primitive-reference.rs | 2 | ||||
| -rw-r--r-- | src/test/rustdoc/primitive-slice-auto-trait.rs | 2 | ||||
| -rw-r--r-- | src/test/rustdoc/primitive-tuple-auto-trait.rs | 2 | ||||
| -rw-r--r-- | src/test/rustdoc/primitive-unit-auto-trait.rs | 2 | ||||
| -rw-r--r-- | src/test/rustdoc/primitive.rs | 2 |
10 files changed, 20 insertions, 20 deletions
diff --git a/src/test/rustdoc-gui/anchors.goml b/src/test/rustdoc-gui/anchors.goml index 3ad62c721b4..fc05fe669d1 100644 --- a/src/test/rustdoc-gui/anchors.goml +++ b/src/test/rustdoc-gui/anchors.goml @@ -10,8 +10,8 @@ local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"} reload: assert-css: ("#toggle-all-docs", {"color": "rgb(0, 0, 0)"}) -assert-css: (".fqn .in-band a:nth-of-type(1)", {"color": "rgb(0, 0, 0)"}) -assert-css: (".fqn .in-band a:nth-of-type(2)", {"color": "rgb(173, 55, 138)"}) +assert-css: (".fqn a:nth-of-type(1)", {"color": "rgb(0, 0, 0)"}) +assert-css: (".fqn a:nth-of-type(2)", {"color": "rgb(173, 55, 138)"}) assert-css: ( ".rightside .srclink", {"color": "rgb(56, 115, 173)", "text-decoration": "none solid rgb(56, 115, 173)"}, @@ -41,7 +41,7 @@ goto: file://|DOC_PATH|/test_docs/struct.HeavilyDocumentedStruct.html assert-css: ("#top-doc-prose-title", {"color": "rgb(0, 0, 0)"}) assert-css: (".sidebar a", {"color": "rgb(53, 109, 164)"}) -assert-css: (".in-band a", {"color": "rgb(0, 0, 0)"}) +assert-css: ("h1.fqn a", {"color": "rgb(0, 0, 0)"}) // We move the cursor over the "Implementations" title so the anchor is displayed. move-cursor-to: "h2#implementations" @@ -60,8 +60,8 @@ local-storage: {"rustdoc-theme": "dark", "rustdoc-use-system-theme": "false"} goto: file://|DOC_PATH|/staged_api/struct.Foo.html assert-css: ("#toggle-all-docs", {"color": "rgb(221, 221, 221)"}) -assert-css: (".fqn .in-band a:nth-of-type(1)", {"color": "rgb(221, 221, 221)"}) -assert-css: (".fqn .in-band a:nth-of-type(2)", {"color": "rgb(45, 191, 184)"}) +assert-css: (".fqn a:nth-of-type(1)", {"color": "rgb(221, 221, 221)"}) +assert-css: (".fqn a:nth-of-type(2)", {"color": "rgb(45, 191, 184)"}) assert-css: ( ".rightside .srclink", {"color": "rgb(210, 153, 29)", "text-decoration": "none solid rgb(210, 153, 29)"}, @@ -91,7 +91,7 @@ goto: file://|DOC_PATH|/test_docs/struct.HeavilyDocumentedStruct.html assert-css: ("#top-doc-prose-title", {"color": "rgb(221, 221, 221)"}) assert-css: (".sidebar a", {"color": "rgb(253, 191, 53)"}) -assert-css: (".in-band a", {"color": "rgb(221, 221, 221)"}) +assert-css: ("h1.fqn a", {"color": "rgb(221, 221, 221)"}) // We move the cursor over the "Implementations" title so the anchor is displayed. move-cursor-to: "h2#implementations" @@ -110,8 +110,8 @@ local-storage: {"rustdoc-theme": "ayu", "rustdoc-use-system-theme": "false"} goto: file://|DOC_PATH|/staged_api/struct.Foo.html assert-css: ("#toggle-all-docs", {"color": "rgb(197, 197, 197)"}) -assert-css: (".fqn .in-band a:nth-of-type(1)", {"color": "rgb(255, 255, 255)"}) -assert-css: (".fqn .in-band a:nth-of-type(2)", {"color": "rgb(255, 160, 165)"}) +assert-css: (".fqn a:nth-of-type(1)", {"color": "rgb(255, 255, 255)"}) +assert-css: (".fqn a:nth-of-type(2)", {"color": "rgb(255, 160, 165)"}) assert-css: ( ".rightside .srclink", {"color": "rgb(57, 175, 215)", "text-decoration": "none solid rgb(57, 175, 215)"}, @@ -141,7 +141,7 @@ goto: file://|DOC_PATH|/test_docs/struct.HeavilyDocumentedStruct.html assert-css: ("#top-doc-prose-title", {"color": "rgb(255, 255, 255)"}) assert-css: (".sidebar a", {"color": "rgb(83, 177, 219)"}) -assert-css: (".in-band a", {"color": "rgb(255, 255, 255)"}) +assert-css: ("h1.fqn a", {"color": "rgb(255, 255, 255)"}) // We move the cursor over the "Implementations" title so the anchor is displayed. move-cursor-to: "h2#implementations" diff --git a/src/test/rustdoc-gui/search-result-go-to-first.goml b/src/test/rustdoc-gui/search-result-go-to-first.goml index 255470a3e35..c197d4dd29c 100644 --- a/src/test/rustdoc-gui/search-result-go-to-first.goml +++ b/src/test/rustdoc-gui/search-result-go-to-first.goml @@ -3,17 +3,17 @@ // First, we check that the first page doesn't have the string we're looking for to ensure // that the feature is changing page as expected. goto: file://|DOC_PATH|/test_docs/index.html -assert-text-false: (".fqn .in-band", "Struct test_docs::Foo") +assert-text-false: (".fqn", "Struct test_docs::Foo") // We now check that we land on the search result page if "go_to_first" isn't set. goto: file://|DOC_PATH|/test_docs/index.html?search=struct%3AFoo // Waiting for the search results to appear... wait-for: "#titles" -assert-text-false: (".fqn .in-band", "Struct test_docs::Foo") +assert-text-false: (".fqn", "Struct test_docs::Foo") // Ensure that the search results are displayed, not the "normal" content. assert-css: ("#main-content", {"display": "none"}) // Now we can check that the feature is working as expected! goto: file://|DOC_PATH|/test_docs/index.html?search=struct%3AFoo&go_to_first=true // Waiting for the page to load... -wait-for-text: (".fqn .in-band", "Struct test_docs::Foo") +wait-for-text: (".fqn", "Struct test_docs::Foo") diff --git a/src/test/rustdoc-gui/toggle-click-deadspace.goml b/src/test/rustdoc-gui/toggle-click-deadspace.goml index 8c3a0bf5bb7..c902d186cc2 100644 --- a/src/test/rustdoc-gui/toggle-click-deadspace.goml +++ b/src/test/rustdoc-gui/toggle-click-deadspace.goml @@ -12,4 +12,4 @@ assert-attribute-false: (".impl-items .rustdoc-toggle", {"open": ""}) // Click the "Trait" part of "impl Trait" and verify it navigates. click: "#impl-Trait-for-Foo h3 a:first-of-type" -assert-text: (".fqn .in-band", "Trait lib2::Trait") +assert-text: (".fqn", "Trait lib2::Trait") diff --git a/src/test/rustdoc/index-page.rs b/src/test/rustdoc/index-page.rs index 5677019fbb8..0c947ea2e28 100644 --- a/src/test/rustdoc/index-page.rs +++ b/src/test/rustdoc/index-page.rs @@ -5,7 +5,7 @@ #![crate_name = "foo"] // @has foo/../index.html -// @has - '//span[@class="in-band"]' 'List of all crates' +// @has - '//h1[@class="fqn"]' 'List of all crates' // @has - '//ul[@class="all-items"]//a[@href="foo/index.html"]' 'foo' // @has - '//ul[@class="all-items"]//a[@href="all_item_types/index.html"]' 'all_item_types' pub struct Foo; diff --git a/src/test/rustdoc/keyword.rs b/src/test/rustdoc/keyword.rs index 1cebe4c6797..ea127385091 100644 --- a/src/test/rustdoc/keyword.rs +++ b/src/test/rustdoc/keyword.rs @@ -7,7 +7,7 @@ // @has foo/index.html '//div[@class="sidebar-elems"]//li/a' 'Keywords' // @has foo/index.html '//div[@class="sidebar-elems"]//li/a/@href' '#keywords' // @has foo/keyword.match.html '//a[@class="keyword"]' 'match' -// @has foo/keyword.match.html '//span[@class="in-band"]' 'Keyword match' +// @has foo/keyword.match.html '//h1[@class="fqn"]' 'Keyword match' // @has foo/keyword.match.html '//section[@id="main-content"]//div[@class="docblock"]//p' 'this is a test!' // @has foo/index.html '//a/@href' '../foo/index.html' // @!has foo/foo/index.html diff --git a/src/test/rustdoc/primitive-reference.rs b/src/test/rustdoc/primitive-reference.rs index 431c9aa79c7..ea8d2d16602 100644 --- a/src/test/rustdoc/primitive-reference.rs +++ b/src/test/rustdoc/primitive-reference.rs @@ -9,7 +9,7 @@ // @has - '//div[@class="sidebar-elems"]//li/a/@href' '#primitives' // @has foo/primitive.reference.html // @has - '//a[@class="primitive"]' 'reference' -// @has - '//span[@class="in-band"]' 'Primitive Type reference' +// @has - '//h1[@class="fqn"]' 'Primitive Type reference' // @has - '//section[@id="main-content"]//div[@class="docblock"]//p' 'this is a test!' // There should be only one implementation listed. diff --git a/src/test/rustdoc/primitive-slice-auto-trait.rs b/src/test/rustdoc/primitive-slice-auto-trait.rs index 7f8f74ff457..cdddd6b6507 100644 --- a/src/test/rustdoc/primitive-slice-auto-trait.rs +++ b/src/test/rustdoc/primitive-slice-auto-trait.rs @@ -4,7 +4,7 @@ #![feature(rustdoc_internals)] // @has foo/primitive.slice.html '//a[@class="primitive"]' 'slice' -// @has - '//span[@class="in-band"]' 'Primitive Type slice' +// @has - '//h1[@class="fqn"]' 'Primitive Type slice' // @has - '//section[@id="main-content"]//div[@class="docblock"]//p' 'this is a test!' // @has - '//h2[@id="synthetic-implementations"]' 'Auto Trait Implementations' // @has - '//div[@id="synthetic-implementations-list"]//h3' 'impl<T> Send for [T]where T: Send' diff --git a/src/test/rustdoc/primitive-tuple-auto-trait.rs b/src/test/rustdoc/primitive-tuple-auto-trait.rs index a2fbbf078d5..df681457f0f 100644 --- a/src/test/rustdoc/primitive-tuple-auto-trait.rs +++ b/src/test/rustdoc/primitive-tuple-auto-trait.rs @@ -4,7 +4,7 @@ #![feature(rustdoc_internals)] // @has foo/primitive.tuple.html '//a[@class="primitive"]' 'tuple' -// @has - '//span[@class="in-band"]' 'Primitive Type tuple' +// @has - '//h1[@class="fqn"]' 'Primitive Type tuple' // @has - '//section[@id="main-content"]//div[@class="docblock"]//p' 'this is a test!' // @has - '//h2[@id="synthetic-implementations"]' 'Auto Trait Implementations' // @has - '//div[@id="synthetic-implementations-list"]//h3' 'Send' diff --git a/src/test/rustdoc/primitive-unit-auto-trait.rs b/src/test/rustdoc/primitive-unit-auto-trait.rs index 76182622ef5..391e33bea61 100644 --- a/src/test/rustdoc/primitive-unit-auto-trait.rs +++ b/src/test/rustdoc/primitive-unit-auto-trait.rs @@ -4,7 +4,7 @@ #![feature(rustdoc_internals)] // @has foo/primitive.unit.html '//a[@class="primitive"]' 'unit' -// @has - '//span[@class="in-band"]' 'Primitive Type unit' +// @has - '//h1[@class="fqn"]' 'Primitive Type unit' // @has - '//section[@id="main-content"]//div[@class="docblock"]//p' 'this is a test!' // @has - '//h2[@id="synthetic-implementations"]' 'Auto Trait Implementations' // @has - '//div[@id="synthetic-implementations-list"]//h3' 'impl Send for ()' diff --git a/src/test/rustdoc/primitive.rs b/src/test/rustdoc/primitive.rs index 605ca4d170b..6347fdac3db 100644 --- a/src/test/rustdoc/primitive.rs +++ b/src/test/rustdoc/primitive.rs @@ -7,7 +7,7 @@ // @has foo/index.html '//div[@class="sidebar-elems"]//li/a' 'Primitive Types' // @has foo/index.html '//div[@class="sidebar-elems"]//li/a/@href' '#primitives' // @has foo/primitive.i32.html '//a[@class="primitive"]' 'i32' -// @has foo/primitive.i32.html '//span[@class="in-band"]' 'Primitive Type i32' +// @has foo/primitive.i32.html '//h1[@class="fqn"]' 'Primitive Type i32' // @has foo/primitive.i32.html '//section[@id="main-content"]//div[@class="docblock"]//p' 'this is a test!' // @has foo/index.html '//a/@href' '../foo/index.html' // @!has foo/index.html '//span' '🔒' |
