about summary refs log tree commit diff
path: root/src/test/rustdoc-gui
AgeCommit message (Collapse)AuthorLines
2021-08-19Rollup merge of #88093 - Kobzol:rustdoc-wrap-code-in-code-tag, r=GuillaumeGomezGuillaume Gomez-1/+21
[rustdoc] Wrap code blocks in <code> tag This PR modifies Rustdoc output so that fenced code snippets, items and whole file source codes are wrapped in `<pre><code>` instead of just `<pre>`. This should improve the semantic meaning of the generated content. I'm not sure what to do about `render_attributes_in_pre` and `render_attributes_in_code`. These functions were clearly expected to be used for things inside `<pre>` or `<code>`, and since I added `<code>` in this PR, some of them will be used in a different context than before. However, it seems to me that even before they were not consistent. For example, `item_constant` used `render_attributes_in_code` for its attributes, however there was no `<code>` used for constants before this PR... Should I create some `rustdoc-gui` tests? For example to check that all `<pre>` tags have a `<code>` child? Fixes: https://github.com/rust-lang/rust/issues/88020
2021-08-19[rustdoc] Wrap code blocks in <code> tagJakub Beránek-1/+21
2021-08-16Merge the two test files as they are testing the same featuresStefan Schindler-21/+19
2021-08-16Add a font test based on #85669Stefan Schindler-0/+21
2021-08-13Add rustdoc GUI test for headersGuillaume Gomez-1/+47
2021-07-25Auto merge of #87390 - notriddle:notriddle/rustdoc-headers-patch, ↵bors-5/+5
r=GuillaumeGomez Rustdoc accessibility: use real headers for doc items Part of #87059 Partially reverts #84703 Preview at: https://notriddle.com/notriddle-rustdoc-test/real-headers/std/index.html
2021-07-25Rustdoc accessibility: use real headers for doc itemsbors-5/+5
Part of #87059 Partially reverts #84703 Preview at: https://notriddle.com/notriddle-rustdoc-test/real-headers/std/index.html
2021-07-24Rollup merge of #87398 - GuillaumeGomez:test-font-module-items, r=notriddleYuki Okushi-0/+4
Add test for fonts used for module items Fixes #85632. r? `@notriddle`
2021-07-23Add test for fonts used for module itemsGuillaume Gomez-0/+4
2021-07-22Rollup merge of #87288 - ijackson:rustdoc-theme, r=GuillaumeGomezGuillaume Gomez-11/+40
rustdoc: Restore --default-theme, etc, by restoring varname escaping In #86157 cd0f93193c84ddc6698f9b65909da71c084dcb74 Use Tera templates for rustdoc. dropped the following transformation from the keys of the default settings element's `data-` attribute names: .map(|(k, v)| format!(r#" data-{}="{}""#, k.replace('-', "_"), Escape(v))) The `Escape` part is indeed no longer needed, because Tera does that for us. But the massaging of `-` to `_` is needed, for the (bizarre) reasons explained in the new comments. I have tested that the default theme function works again for me. I have also verified that passing (in shell syntax) '--default-theme="zork&"' escapes the value in the HTML. Closes #87263
2021-07-22Move implementors directly into lib2Guillaume Gomez-1/+1
2021-07-22Add tests for default-settingsGuillaume Gomez-0/+53
2021-07-21Remove cargo workspace to build rustdoc-gui test crates because of cargo ↵Guillaume Gomez-24/+0
config not being applied
2021-07-21Add test to ensure tables are not inside items summaryGuillaume Gomez-0/+13
2021-07-21Rollup merge of #87230 - GuillaumeGomez:docblock-table-overflow, r=notriddleGuillaume Gomez-7/+18
Fix docblock <table> overflow Before: ![Screenshot from 2021-07-18 00-05-23](https://user-images.githubusercontent.com/3050060/126050272-ce08bc5f-74ff-4135-bc12-d708d87470cc.png) After: ![Screenshot from 2021-07-18 00-03-55](https://user-images.githubusercontent.com/3050060/126050273-42f41b4d-ad57-4a87-91de-18e63f8504ec.png) cc `@SergioBenitez` r? `@notriddle`
2021-07-19Rollup merge of #87251 - GuillaumeGomez:item-info-width, r=notriddleGuillaume Gomez-0/+10
Fix "item info" width Fixes #87202. It now looks again like this: ![Screenshot from 2021-07-18 12-33-27](https://user-images.githubusercontent.com/3050060/126064005-013acabc-7f17-4436-8dfc-cb6b9bc24413.png) cc `@jyn514` r? `@notriddle`
2021-07-18Add test to check width of item-infoGuillaume Gomez-0/+10
2021-07-18Add GUI test for <table> overflowGuillaume Gomez-0/+18
2021-07-18Remove unused fileGuillaume Gomez-7/+0
2021-07-17Fix sidebar-mobile test to focus on an actual focusable elementMichael Howell-1/+1
2021-07-16Rollup merge of #87188 - GuillaumeGomez:gui-test-auto-hide-trait-impl, ↵Guillaume Gomez-0/+20
r=notriddle Add GUI test for auto-hide-trait-implementations setting Fixes #85592. r? ``@notriddle``
2021-07-16Rollup merge of #87180 - notriddle:notriddle/sidebar-keyboard-mobile, ↵Guillaume Gomez-0/+10
r=GuillaumeGomez feat(rustdoc): open sidebar menu when links inside it are focused Fixes #87172 Based on #87167 (which should be merged first) r? ``@GuillaumeGomez`` Preview it at https://notriddle.com/notriddle-rustdoc-test/std/index.html
2021-07-16feat(rustdoc): open sidebar menu when links inside it are focusedMichael Howell-0/+10
Fixes #87172 Based on #87167 (which should be merged first) Preview it at https://notriddle.com/notriddle-rustdoc-test/std/index.html Co-authored-by: Guillaume Gomez <guillaume.gomez@huawei.com>
2021-07-16Add GUI test for auto-hide-trait-implementations settingGuillaume Gomez-0/+20
2021-07-16Rollup merge of #87167 - GuillaumeGomez:sidebar-display-mobile, r=notriddleGuillaume Gomez-0/+10
Fix sidebar display on small devices Part of #87059. Instead of hiding the sidebar on small devices, we instead move it out of the viewport so that it remains "visible" to our text only users. Could you confirm it works for you `@ahicks92` and `@DataTriny` please? You can give it a try at [this URL](https://guillaume-gomez.fr/rustdoc-test/test_docs/index.html). r? `@notriddle`
2021-07-15Add test for sidebar display value on mobileGuillaume Gomez-0/+10
2021-07-15Add regression test for type declaration layout overflowGuillaume Gomez-0/+15
2021-07-14Rollup merge of #87125 - GuillaumeGomez:ayu-code-color, r=notriddleGuillaume Gomez-0/+14
Fix Ayu theme <code> color Fixes #87072 (the second regression). r? `@notriddle`
2021-07-14Rollup merge of #87056 - GuillaumeGomez:fix-codeblocks-overflow, r=notriddleGuillaume Gomez-0/+22
Fix codeblocks overflow Fixes #87043. Instead of completely relying on `pulldown-cmark` (and its potential changes), I decided to move the generation of codeblocks HTML directly in rustdoc so we can unify the DOM and the CSS classes. r? `@Nemo157`
2021-07-14Add GUI test to check ayu <code> colorsGuillaume Gomez-0/+14
2021-07-14Add test for codeblocks overflowGuillaume Gomez-0/+22
2021-07-14Rollup merge of #87102 - GuillaumeGomez:go-to-first-feature, ↵Yuki Okushi-0/+20
r=Manisheart,notriddle Add GUI test for "go to first" feature It adds a test for #85876 to ensure the feature is working as expected and prevent potential regression. cc ```@jeanlucthumm``` r? ```@Manishearth```
2021-07-13Add test for "go to first" featureGuillaume Gomez-0/+20
2021-07-13Add test for keyword/primitive text colorGuillaume Gomez-0/+10
2021-07-13Add test for search results colorsGuillaume Gomez-0/+32
2021-07-12Add test for implementorsGuillaume Gomez-0/+30
2021-07-12Simplify build system for rustdoc-gui test cratesGuillaume Gomez-0/+50
2021-07-01Enable the tests developed with #86594Stefan Schindler-6/+6
2021-06-30Auto merge of #86650 - GuillaumeGomez:fix-boldness, r=Nemo157bors-2/+15
Fix boldness (put it back where needed) I realized that I created a GUI test that wasn't run because it had ".rs" extension instead of ".goml" so I moved its content into `font-weight.goml` (since it was checking font weight).
2021-06-28Add test for item-table with resize to mobileStefan Schindler-0/+42
2021-06-26Add tests to ensure the font-weight is the correct oneGuillaume Gomez-0/+15
2021-06-26Remove erroneously created fileGuillaume Gomez-2/+0
2021-06-24Fixing the test rustdoc by ignoring ↵Stefan Schindler-5/+5
`*[@id="module-item"]//following-sibling::item-right` relationship and rustdoc-gui
2021-06-23Fix search filter updateGuillaume Gomez-0/+17
2021-06-23Rollup merge of #86542 - GuillaumeGomez:line-numbers-aligned-with-content, ↵Dylan DPC-39/+41
r=jyn514 Line numbers aligned with content We had the issue a few times in the past where the source code pages' content wasn't aligned with the line numbers but completely below. This test will prevent this change to go unnoticed. The first commit comes from https://github.com/rust-lang/rust/pull/86541 so it needs it to be merged first. r? `@jsha`
2021-06-22Add check to ensure that the line numbers are aligned with the source codeGuillaume Gomez-0/+2
2021-06-22Update browser-ui-test versionGuillaume Gomez-39/+39
2021-06-22Rollup merge of #86297 - GuillaumeGomez:rustdoc-gui-args, r=Mark-SimulacrumYuki Okushi-0/+12
Allow to pass arguments to rustdoc-gui tool Very convenient for testing. This is another part of https://github.com/rust-lang/rust/pull/86293 cc ``@jsha`` r? ``@Mark-Simulacrum``
2021-06-19Update browser-ui-test versionGuillaume Gomez-100/+100
2021-06-16Factor out render_rightsideJacob Hoffman-Andrews-3/+0
This covers rendering of stability_since and the srclink across methods and trait implementations, so their DOM representation is consistent.