about summary refs log tree commit diff
path: root/tests/rustdoc-gui
AgeCommit message (Collapse)AuthorLines
2025-10-03Auto merge of #145898 - lolbinarycat:rustdoc-search-trait-parent, ↵bors-20/+29
r=GuillaumeGomez,notriddle If a trait item appears in rustdoc search, hide the corrosponding impl items fixes rust-lang/rust#138251 cc `@notriddle`
2025-10-02fix rustdoc tests broke by trait item filteringbinarycat-20/+29
2025-09-27Remove `doc_auto_cfg` feature as wellGuillaume Gomez-1/+0
2025-09-26Rollup merge of #147047 - notriddle:toolbar-index, r=GuillaumeGomezMatthias Krüger-0/+13
rustdoc: put the toolbar on the all item index
2025-09-25rustdoc-search: add test case for all/index.html searchMichael Howell-0/+13
2025-09-25rustdoc: hide `#[repr(...)]` if it isn't part of the public ABILeón Orell Valerian Liehr-4/+4
2025-09-05Ensure that `--html-after-content` option is used to check ↵Guillaume Gomez-2/+4
`scrape_examples_ice` rustdoc GUI test
2025-09-02squash fix `render_call_locations` panic when default span points at file ↵Janis-1/+36
outside of local_sources add test against crashing with --html-after-content file correctly add --html-after-content to env not args formatting fix for rustdoc-call-locations-after-content/rmake.rs Use local crate source file as default span in `render_call_locations` - avoids unwrapping the first file added to the source map as a local file in `href_from_span` move test to tests/rustdoc-gui, rename to scrape_examples_ice test link is correct use rustdocflags, rename path in example, track lock file factor out duplicate function calls use compile-flags to make sure the after.html file is actually included in the rustdoc call fix goml go-to path increment assert-count in sidebar-source-code.goml adjust crate-search width in search-result-display.goml renamed Bar in scrape_examples_ice test make crate name shorter ..
2025-08-28Add tests for `doc(attribute = "...")` attributeGuillaume Gomez-2/+48
2025-08-24Auto merge of #137229 - GuillaumeGomez:expand-macro, r=lolbinarycatbors-1/+203
Add support for macro expansion in rustdoc source code pages This is what it looks like: ![Screenshot From 2025-02-18 18-08-51](https://github.com/user-attachments/assets/ce2b3806-6218-47df-94bf-e9e9ed40cd41) ![image](https://github.com/user-attachments/assets/891042db-8632-4dba-9343-e28570c058fe) You can test it [here](https://rustdoc.crud.net/imperio/macro-expansion/src/lib/lib.rs.html). In this case, I also enabled the `--generate-link-to-definition` to show that both options work well together. Note: <del>There is a bug currently in firefox where the line numbers are not displayed correctly if they're inside the "macro expansion" span: https://bugzilla.mozilla.org/show_bug.cgi?id=1949948<del> Found a workaround around this bug. r? `@notriddle`
2025-08-23Improve code and add test with macro coming from another file from the same ↵Guillaume Gomez-45/+69
crate
2025-08-23Make macro expansion feature buttons accessibleGuillaume Gomez-5/+44
2025-08-23Do macro expansion at AST level rather than HIRGuillaume Gomez-27/+27
2025-08-23Add GUI test for `--generate-macro-expansion` optionGuillaume Gomez-1/+140
2025-08-21rustdoc-search: GUI tests check for `//` in URLMichael Howell-0/+7
When this fails, you get output that looks like: /home/user/rust/tests/rustdoc-gui/search-result-impl-disambiguation.goml search-result-impl-disambiguation... FAILED [ERROR] `tests/rustdoc-gui/utils.goml` around line 49 from `tests/rustdoc-gui/search-result-impl-disambiguation.goml` line 25: JS errors occurred: Event: Event Making the error message more informative requires patching browser-ui-test.
2025-08-15rustdoc-search: search backend with partitioned suffix treeMichael Howell-360/+312
2025-08-04Add GUI regression test for tooltips `i` iconsGuillaume Gomez-0/+15
2025-08-04Fix wrong font being used for tooltips `i` iconsGuillaume Gomez-2/+16
2025-07-01Update rustdoc GUI testsGuillaume Gomez-10/+25
2025-06-16rustdoc: make srcIndex no longer a global variablebinarycat-3/+0
this is one-time initialization data, it can just be a function parameter. we also move the json parsing into createSrcSidebar to save a few bytes.
2025-05-25Rollup merge of #139831 - lolbinarycat:rustdoc-mobile-sidebar, r=GuillaumeGomezJacob Pratt-19/+8
rustdoc: on mobile, make the sidebar full width and linewrap this is because the mobile sidebar cannot be resized, unlike on desktop.
2025-05-23rustdoc-gui test: apply suggestions from code reviewbinarycat-1/+4
2025-05-22rustdoc: rip out all the gui tests for <100% width mobile sidebarbinarycat-19/+5
stuff like "clicking the settings menu closes the mobile sidebar" is now impossible for users to observe, since the mobile sidebar will always cover the settings menu due to being full-width, which is good because that behavior is also now impossible for our testing framework to observe.
2025-05-22Rollup merge of #140868 - SpecificProtagonist:rustdoc-trait-impl-code-link, ↵Matthias Krüger-0/+27
r=notriddle rustdoc: Fix links with inline code in trait impl docs Fixes #140857
2025-05-11better checksSpecificProtagonist-1/+5
2025-05-11remove superfluous importSpecificProtagonist-1/+0
2025-05-10gui test different linkSpecificProtagonist-1/+1
2025-05-10gui testSpecificProtagonist-0/+24
2025-05-09rustdoc: add a handle that makes sidebar resizing more obviousMichael Howell-15/+15
This change is based on some discussion on [lolbinarycat's idea], but with a more "traditional" design. Specifically, this is the closest thing I could find to a consensus across many systems I looked at for inspiration: - In Jira, resizable sidebars have a stack of four dots. - In The GIMP, resizable sidebars have a stack of three dots. - In [old Windows], "panes" are defined to have the same border style as a window, which has a raised appearance. - In [NeXT], a drag point usually had an innie, whether the line in a slider or the circle in a scroller; I can also hide and show the favorites bar in Workspace by dragging on a circular "grip spot" - In [old Mac], drag handles for things usually had a "grip track" of parallel lines. - [OSX] kept that, but the "Source List" part of the Finder still had the circle grip for a time the same way Workspace did [lolbinarycat's idea]: https://github.com/rust-lang/rust/pull/139420 [old Windows]: https://archive.org/details/windowsinterface00micr/page/n9/mode/2up [old Mac]: https://archive.org/details/apple-hig/1996_Human_Interface_Guidelines_for_Mac_OS_8_%28WWDC_Release%29/page/16/mode/2up [NeXT]: https://archive.org/details/apple-hig/1993%20NeXTSTEP%20User%20Interface%20Guidelines%20-%20Release%203/page/145/mode/2up [OSX]: https://dn721903.ca.archive.org/0/items/apple-hig/MacOSX_HIG_2005_09_08.pdf#page=267
2025-05-06Rollup merge of #140135 - GuillaumeGomez:sidebars-image, r=rustdocGuillaume Gomez-0/+36
Unify sidebar buttons to use the same image Part of https://github.com/rust-lang/rust/issues/139832. The source sidebar looks like this with the new image: ![image](https://github.com/user-attachments/assets/df4fee52-fb71-4794-91b7-3afc6d2aab70) You can test it [here](https://rustdoc.crud.net/imperio/sidebar-images/src/foo/foo.rs.html). r? `@notriddle`
2025-04-24Add/update GUI test for impl indent fixGuillaume Gomez-2/+44
2025-04-23Add rustdoc-gui test to ensure sidebars share the same imageGuillaume Gomez-0/+36
2025-04-07Add regression test for #139282Guillaume Gomez-0/+14
2025-02-25Rollup merge of #137539 - GuillaumeGomez:copy-content-tests, r=notriddleLeón Orell Valerian Liehr-2/+9
Add rustdoc-gui regression test for #137082 Fixes https://github.com/rust-lang/rust/issues/137082. Added new commands in `browser-ui-test` allowing us to add a regression test for #137082 and also another to copy code examples content. r? `@notriddle`
2025-02-24Add rustdoc-gui regression test for #137082Guillaume Gomez-2/+9
2025-02-24Rollup merge of #136991 - GuillaumeGomez:code-wrapping, r=notriddleJacob Pratt-52/+72
[rustdoc] Add new setting to wrap source code lines when too long Fixes https://github.com/rust-lang/rust/issues/127334. Wrapped lines look like this: ![image](https://github.com/user-attachments/assets/92006a27-ed1e-4beb-91f2-f453b72c5e1a) It works in both source code pages and doc pages. You can test it [here](https://rustdoc.crud.net/imperio/code-wrapping/bar/index.html). r? ``@notriddle``
2025-02-22Rename feature into `Word wrap source code`Guillaume Gomez-3/+6
2025-02-19Add custom sort for link in rustdocyukang-0/+33
2025-02-14Add GUI test for code wrappingGuillaume Gomez-0/+53
2025-02-14Update rustdoc-gui testGuillaume Gomez-52/+16
2025-02-12rustdoc: use better, consistent SVG icons for scraped examplesMichael Howell-0/+26
This continues two ongoing projects: - Replacing ascii art with real icons that don't look like syntax, are understandable to people who're familiar with desktop computers and smart devices, and aren't ugly. - Using labels and tooltips to clarify these icons, when the limits of popular iconography hit us. In this case, I've added tooltips, because, unfortunately, there's not room for always-visible labels.
2025-02-11Update rustdoc testsGuillaume Gomez-147/+62
2025-01-29Add GUI test for new "sans serif fonts" settingGuillaume Gomez-4/+35
2025-01-24Add GUI regression test for indent of trait items on mobileGuillaume Gomez-1/+49
2025-01-18Remove more CSS classesGuillaume Gomez-44/+44
2025-01-17Update rustdoc testsGuillaume Gomez-5/+5
2025-01-16Treat other items as functions for the purpose of type-based searchbinarycat-1/+1
constants and statics are nullary functions, and struct fields are unary functions. functions (along with methods and trait methods) are prioritized over other items, like fields and constants.
2025-01-15Add GUI test for #135499Guillaume Gomez-0/+6
2024-12-28Add GUI test for item info elements colorGuillaume Gomez-0/+23
2024-12-17Remove `rustc::existing_doc_keyword` lint.Nicholas Nethercote-5/+6
`CheckAttrVisitor::check_doc_keyword` checks `#[doc(keyword = "..")]` attributes to ensure they are on an empty module, and that the value is a non-empty identifier. The `rustc::existing_doc_keyword` lint checks these attributes to ensure that the value is the name of a keyword. It's silly to have two different checking mechanisms for these attributes. This commit does the following. - Changes `check_doc_keyword` to check that the value is the name of a keyword (avoiding the need for the identifier check, which removes a dependency on `rustc_lexer`). - Removes the lint. - Updates tests accordingly. There is one hack: the `SelfTy` FIXME case used to used to be handled by disabling the lint, but now is handled with a special case in `is_doc_keyword`. That hack will go away if/when the FIXME is fixed. Co-Authored-By: Guillaume Gomez <guillaume1.gomez@gmail.com>