| // Checks sidebar resizing | |
| go-to: "file://" + |DOC_PATH| + "/test_docs/index.html" | |
| assert-property: (".sidebar", {"clientWidth": "199"}) | |
| show-text: true | |
| // normal resizing | |
| drag-and-drop: ((205, 100), (185, 100)) | |
| assert-property: (".sidebar", {"clientWidth": "181"}) | |
| // resize past maximum (don't grow past 500) | |
| drag-and-drop: ((185, 100), (600, 100)) | |
| assert-property: (".sidebar", {"clientWidth": "499"}) | |
| // resize past minimum (hide sidebar) | |
| drag-and-drop: ((501, 100), (5, 100)) | |
| assert-property: (".sidebar", {"clientWidth": "0"}) | |
| assert-css: (".sidebar", {"display": "none"}) | |
| assert-local-storage: {"rustdoc-hide-sidebar": "true"} | |
| set-local-storage: {"rustdoc-hide-sidebar": "false"} | |
| // Now same thing, but for source code | |
| go-to: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html" | |
| assert-property: (".sidebar", {"clientWidth": "49"}) | |
| drag-and-drop: ((52, 100), (185, 100)) | |
| assert-property: (".sidebar", {"clientWidth": "181"}) | |
| drag-and-drop: ((185, 100), (600, 100)) | |
| assert-property: (".sidebar", {"clientWidth": "499"}) | |
| drag-and-drop: ((500, 100), (5, 100)) | |
| // instead of hiding the sidebar entirely, this | |
| // will switch to the toggle mode | |
| assert-property: (".sidebar", {"clientWidth": "49"}) |