Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Side by Side Diff: LayoutTests/fast/dom/shadow/pseudoclass-update-enabled-area.html

Issue 610683002: Revert of Support for :enabled selector on Anchor & Area elements (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <style>
2 area {
3 display: inline;
4 }
5 </style>
6 <p>When an anchor tag catch 'href' attribute or release 'href' attribute, distri bution should happen.</p>
7 <div id="host1"></div>
8 <div id="host2"></div>
9 <script>
10 if (window.testRunner)
11 testRunner.waitUntilDone();
12
13 function createArea(href, textContent)
14 {
15 var area = document.createElement('area');
16 if (href)
17 area.setAttribute('href', href);
18 area.appendChild(document.createTextNode(textContent));
19
20 return area;
21 }
22
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');
27
28 host1.appendChild(area1);
29 host1.appendChild(area2);
30 host2.appendChild(area3);
31 host2.appendChild(area4);
32
33 host1.createShadowRoot().innerHTML = '<content select="area:enabled"></content>' ;
34 host2.createShadowRoot().innerHTML = '<content select="area:enabled"></content>' ;
35
36 setTimeout(function() {
37 area2.removeAttribute('href');
38 area4.setAttribute('href', 'http://www.example.com/');
39 if (testRunner)
40 testRunner.notifyDone();
41 }, 0);
42 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698