| <script src="resources/polyfill.js"></script> |
| <p>When an anchor tag catch 'href' attribute or release 'href' attribute, distribution should happen.</p> |
| testRunner.waitUntilDone(); |
| function createArea(href, textContent) |
| var area = document.createElement('area'); |
| area.setAttribute('href', href); |
| area.appendChild(document.createTextNode(textContent)); |
| var area1 = createArea('http://www.example.com/', 'Anchor 1'); |
| var area2 = createArea('http://www.example.com/', 'Anchor 2'); |
| var area3 = createArea(null, 'Anchor 3'); |
| var area4 = createArea(null, 'Anchor 4'); |
| host1.appendChild(area1); |
| host1.appendChild(area2); |
| host2.appendChild(area3); |
| host2.appendChild(area4); |
| host1.webkitCreateShadowRoot().innerHTML = '<content select="area:visited"></content>'; |
| host2.webkitCreateShadowRoot().innerHTML = '<content select="area:visited"></content>'; |
| area2.removeAttribute('href'); |
| area4.setAttribute('href', 'http://www.example.com/'); |