navigate-base-url.html (596B)
1 <!doctype html> 2 <script src="/resources/testharness.js"></script> 3 <script src="/resources/testharnessreport.js"></script> 4 <iframe id="i" src="resources/page-with-base-url-common.html"></iframe> 5 <script> 6 async_test(t => { 7 window.onload = t.step_func(() => { 8 i.contentWindow.navigation.navigate("blank.html"); 9 i.onload = t.step_func_done(() => { 10 const iframeURL = new URL(i.contentWindow.navigation.currentEntry.url); 11 assert_equals(iframeURL.pathname, "/common/blank.html"); 12 }); 13 }); 14 }, "navigate() must resolve URLs relative to navigation object's base URL"); 15 </script>