From e297bbf4c7b16bd56f4d55e5eee0caef3df7f6d0 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sat, 28 May 2022 17:54:47 +0200 Subject: [PATCH 1/2] Improve settings page display with disabled javascript --- src/librustdoc/html/render/context.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/librustdoc/html/render/context.rs b/src/librustdoc/html/render/context.rs index c5dbf8aa754e9..68e2f0cf9c06c 100644 --- a/src/librustdoc/html/render/context.rs +++ b/src/librustdoc/html/render/context.rs @@ -609,6 +609,11 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> { \ \ \ + \ \ ", From bfb16b9dd7f25dcbf37dec47cf6abf057446588d Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sat, 28 May 2022 18:03:35 +0200 Subject: [PATCH 2/2] Add GUI test for javascript disabled display of settings page --- src/test/rustdoc-gui/settings.goml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/test/rustdoc-gui/settings.goml b/src/test/rustdoc-gui/settings.goml index 1b2d1e31f520c..cbfc67e790603 100644 --- a/src/test/rustdoc-gui/settings.goml +++ b/src/test/rustdoc-gui/settings.goml @@ -65,3 +65,9 @@ assert-local-storage: {"rustdoc-disable-shortcuts": "true"} goto: file://|DOC_PATH|/settings.html wait-for: "#settings" assert-css: (".setting-line .toggle .slider", {"width": "45px", "margin-right": "20px"}) + +// We now check the display with JS disabled. +assert-false: "noscript section" +javascript: false +reload: +assert-css: ("noscript section", {"display": "block"})