Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / anchor-origin.html
blobd1ebcb05f81cdf72a9266185782fed522c589e06
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script>
5 if (window.testRunner)
6 testRunner.dumpAsText();
8 var cases = [
9 "http://example.com/foo/bar",
10 "HTTP://example.com/foo/bar",
11 "https://example.com/ttt?ggg",
12 "ftp://example.com/ttt?ggg",
13 "file:///home/abarth",
14 "data:text/html,<b>foo</b>"
17 window.onload = function(e)
19 for (var i = 0; i < cases.length; ++i) {
20 var a = document.createElement('a');
21 a.href = cases[i];
22 a.textContent = 'Link';
23 document.body.appendChild(a);
24 document.body.appendChild(document.createElement('br'));
27 var s = '';
28 var elmts = document.getElementsByTagName('a');
29 for (var i = 0; i < elmts.length; ++i)
30 s += elmts[i].href + ' => ' + elmts[i].origin + '\n';
32 var pre = document.createElement('pre');
33 pre.textContent = s;
34 document.body.appendChild(pre);
37 </script>
38 </body>
39 </html>