Rollup merge of #96900 - GuillaumeGomez:fix-js-error, r=notriddle

Fix js error

On the source code pages, we get a JS error:

![Screenshot from 2022-05-10 16-26-53](https://user-images.githubusercontent.com/3050060/167656292-51e0b0e9-6b0c-4f94-82e0-dd8fb77adf52.png)

It's fixed in the first commit. The second one is removing an unused CSS rule and the third one is a little cleanup of a GUI test.

cc ``@jsha``
r? ``@notriddle``
This commit is contained in:
Yuki Okushi 2022-05-11 13:16:33 +09:00 committed by GitHub
commit 95b2d37a39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 5 deletions

View File

@ -331,7 +331,6 @@ li {
nav.sub {
position: relative;
font-size: 1rem;
text-transform: uppercase;
}
.sub-container {

View File

@ -1,5 +1,5 @@
// From rust:
/* global search, sourcesIndex */
/* global sourcesIndex */
// Local js definitions:
/* global addClass, getCurrentValue, hasClass, onEachLazy, removeClass, browserSupportsHistoryApi */
@ -69,7 +69,6 @@ function createDirEntry(elem, parent, fullPath, currentFile, hasFoundFile) {
files.appendChild(file);
}
}
search.fullPath = fullPath;
children.appendChild(files);
parent.appendChild(name);
parent.appendChild(children);

View File

@ -15,6 +15,5 @@ assert-css: ("#sidebar-toggle", {"visibility": "visible", "opacity": 1})
assert-css: (".sidebar > *:not(#sidebar-toggle)", {"visibility": "hidden", "opacity": 0})
// Let's expand the sidebar now.
click: "#sidebar-toggle"
// Because of the transition CSS, better wait a second before checking.
// Because of the transition CSS, we check by using `wait-for-css` instead of `assert-css`.
wait-for-css: ("#sidebar-toggle", {"visibility": "visible", "opacity": 1})
assert-css: (".sidebar > *:not(#sidebar-toggle)", {"visibility": "visible", "opacity": 1})