blob: b33ce5fcedd5f9b3a1268c39164ab44d2802b184 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="resources/polyfill.js"></script>
</head>
<body>
<p>When an anchor tag catch 'href' attribute or release 'href' attribute, distribution should happen.</p>
<div id="host1">
<a id="anchor1" href="http://www.example.com/">Anchor 1</a>
<a id="anchor2" href="http://www.example.com/">Anchor 2</a>
</div>
<div id="host2">
<a id="anchor3">Anchor 3</a>
<a id="anchor4">Anchor 4</a>
</div>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
host1.webkitCreateShadowRoot().innerHTML = '<content select=":link"></content>';
host2.webkitCreateShadowRoot().innerHTML = '<content select=":link"></content>';
setTimeout(function() {
anchor2.removeAttribute('href');
anchor4.setAttribute('href', 'http://www.example.com/');
testRunner.notifyDone();
}, 0);
</script>
</body>
</html>