Best headless browser for AI agents. Lite, Fast, High-Compatibility. Built in Rust
Rust ai-agentsai-toolsbrowserbrowser-automationcloud-browserheadlessheadless-browserkitesurfplaywrightpuppeteerrustservoweb-crawlerweb-crawlingweb-scraperweb-scraping
<!doctype html>
<meta charset="utf-8">
<script src="/wpt/resources/testharness.js"></script>
<script src="/wpt/resources/testharnessreport.js"></script>
<script src="/wpt/resources/moli-wpt-adapter.js"></script>
<script>
const STORAGE_PREFIX = "__lm_wpt_navigation_cross_document_result_promises_basic__";
test(function () {
assert_equals(
sessionStorage.getItem(STORAGE_PREFIX + "resultOrder"),
"surface:true|sync:false,false",
"cross-document navigate() should return committed/finished promises without settling them in the source document",
);
assert_equals(
sessionStorage.getItem(STORAGE_PREFIX + "sourceLog"),
"before|after-call",
"source currententrychange hooks should stay quiet before the destination loads",
);
assert_equals(
sessionStorage.getItem(STORAGE_PREFIX + "committedType"),
null,
"committed should still be unresolved before the destination load completes",
);
assert_equals(
sessionStorage.getItem(STORAGE_PREFIX + "finishedType"),
null,
"finished should still be unresolved before the destination load completes",
);
assert_equals(
sessionStorage.getItem(STORAGE_PREFIX + "committedUrl"),
null,
"committed should not expose a destination entry before destination load",
);
assert_equals(
sessionStorage.getItem(STORAGE_PREFIX + "finishedUrl"),
null,
"finished should not expose a destination entry before destination load",
);
}, "Cross-document navigation result promises stay pending until the destination document takes over");
</script>