about summary refs log tree commit diff
path: root/tests/rustdoc-gui/sidebar-source-code.goml
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2024-04-05 22:33:30 +0200
committerGitHub <noreply@github.com>2024-04-05 22:33:30 +0200
commita074d278d30df4d4a3d6cd55117e6fdddfc9dd25 (patch)
tree7830e167c8616df4839086a109b14fef75e66819 /tests/rustdoc-gui/sidebar-source-code.goml
parentb3b7f27e612da4ffdf2f33e60a5fe2618dbe925b (diff)
parent7659ef47f03f4e2bbbef65856427add98f898ef5 (diff)
downloadrust-a074d278d30df4d4a3d6cd55117e6fdddfc9dd25.tar.gz
rust-a074d278d30df4d4a3d6cd55117e6fdddfc9dd25.zip
Rollup merge of #123515 - GuillaumeGomez:use-include, r=notriddle
Use `include` command to reduce code duplication

Since we updated `browser-ui-test` version, let's make use of the new commands. :)

r? `@notriddle`
Diffstat (limited to 'tests/rustdoc-gui/sidebar-source-code.goml')
-rw-r--r--tests/rustdoc-gui/sidebar-source-code.goml7
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/rustdoc-gui/sidebar-source-code.goml b/tests/rustdoc-gui/sidebar-source-code.goml
index 3f7ef643d18..ef0b5ab38b1 100644
--- a/tests/rustdoc-gui/sidebar-source-code.goml
+++ b/tests/rustdoc-gui/sidebar-source-code.goml
@@ -1,5 +1,6 @@
 // The goal of this test is to ensure that the sidebar is working as expected in the source
 // code pages.
+include: "utils.goml"
 go-to: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
 show-text: true
 
@@ -8,11 +9,7 @@ define-function: (
     "check-colors",
     [theme, color, background_color],
     block {
-        set-local-storage: {
-            "rustdoc-theme": |theme|,
-            "rustdoc-use-system-theme": "false",
-        }
-        reload:
+        call-function: ("switch-theme", {"theme": |theme|})
         // Checking results colors.
         assert-css: (".src .sidebar", {
             "color": |color|,