6 <p>When an anchor tag catch 'href' attribute or release 'href' attribute, distribution should happen.</p>
10 if (window.testRunner)
11 testRunner.waitUntilDone();
13 function createArea(href, textContent)
15 var area = document.createElement('area');
17 area.setAttribute('href', href);
18 area.appendChild(document.createTextNode(textContent));
23 var area1 = createArea('http://www.example.com/', 'Anchor 1');
24 var area2 = createArea('http://www.example.com/', 'Anchor 2');
25 var area3 = createArea(null, 'Anchor 3');
26 var area4 = createArea(null, 'Anchor 4');
28 host1.appendChild(area1);
29 host1.appendChild(area2);
30 host2.appendChild(area3);
31 host2.appendChild(area4);
33 host1.createShadowRoot().innerHTML = '<content select="area:enabled"></content>';
34 host2.createShadowRoot().innerHTML = '<content select="area:enabled"></content>';
36 setTimeout(function() {
37 area2.removeAttribute('href');
38 area4.setAttribute('href', 'http://www.example.com/');
40 testRunner.notifyDone();