Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / HTMLAnchorElement / set-href-attribute-rebase.html
blob542331b977e5084efcfb2d6a5719ab33065afddd
1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script>
3 <base>
4 <a></a>
5 <script>
7 description('Tests how setting href attributes affects setting a new base for the URL.');
9 var base = document.querySelector('base');
10 var a = document.querySelector('a');
12 base.href = 'http://old_base/';
13 a.href = 'foo?query';
14 shouldBeEqualToString('a.href', 'http://old_base/foo?query');
15 base.href = 'http://new_base/';
16 shouldBeEqualToString("document.querySelector('a').href", 'http://new_base/foo?query');
18 // Remove @href to allow js-test-post to load.
19 base.href = null;
21 </script>