mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
LibWeb: Don't assert when calling navigation properties
The invariants for these property getters are supposed to be checked by the has_entries_and_events_disabled AO, but we don't have all the plumbing hooked up between Navigables and Navigation yet. Add a test to make sure that these methods don't assert when calling them on a fresh page.
This commit is contained in:
parent
aae7905369
commit
587cfa7739
Notes:
sideshowbarker
2024-07-17 07:38:17 +09:00
Author: https://github.com/ADKaster
Commit: 587cfa7739
Pull-request: https://github.com/SerenityOS/serenity/pull/20782
Issue: https://github.com/SerenityOS/serenity/issues/20778
Reviewed-by: https://github.com/awesomekling ✅
3 changed files with 32 additions and 6 deletions
|
@ -0,0 +1,15 @@
|
|||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
let n = window.navigation;
|
||||
|
||||
// FIXME: Once we set up the interaction between Navigables and Navigation,
|
||||
// These two should become 1 and [object NavigationHistoryEntry], respectively
|
||||
println(`entries is empty: ${n.entries().length == 0}`);
|
||||
println(`currentEntry is null: ${n.currentEntry == null}`);
|
||||
|
||||
println(`transition is null: ${n.transition == null}`);
|
||||
println(`canGoBack: ${n.canGoBack}`);
|
||||
println(`canGoForward: ${n.canGoForward}`);
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue