blob: 473c68cd9b87b609e6ea9095110d476df8d83445 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../../resources/js-test-pre.js"></script>
<base>
<a></a>
<script>
description('Tests how setting href attributes affects setting a new base for the URL.');
var base = document.querySelector('base');
var a = document.querySelector('a');
base.href = 'http://old_base/';
a.href = 'foo?query';
shouldBeEqualToString('a.href', 'http://old_base/foo?query');
base.href = 'http://new_base/';
shouldBeEqualToString("document.querySelector('a').href", 'http://new_base/foo?query');
// Remove @href to allow js-test-post to load.
base.href = null;
</script>
<script src="../../../resources/js-test-post.js"></script>