Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
entries[length - 1] is current entry: true
currentEntry is a [object NavigationHistoryEntry]
transition is null: true
canGoBack: true
canGoBack: false
canGoForward: false
19 changes: 16 additions & 3 deletions Tests/LibWeb/Text/input/HTML/Navigation-object-properties.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
<!DOCTYPE html>
<!-- Run the assertions in an iframe so that the Navigation API object always
reflects a freshly-created navigable, independent of any history entries
accumulated by earlier tests in the same WebContent process. -->
<iframe id="testIframe"></iframe>
<script src="../include.js"></script>
<script>
test(() => {
let n = window.navigation;
asyncTest(async done => {
const iframe = document.getElementById("testIframe");

await new Promise(resolve => {
iframe.addEventListener("load", resolve, { once: true });
iframe.src = "about:blank";
});

let n = iframe.contentWindow.navigation;

let len = n.entries().length;

Expand All @@ -11,6 +22,8 @@

println(`transition is null: ${n.transition == null}`);
println(`canGoBack: ${n.canGoBack}`);
println(`canGoForward: ${n.canGoForward}`);
println(`canGoForward: ${n.canGoForward}`);

done();
});
</script>
Loading