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

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

Issue 1129673002: Remove support for pseudo classes in <content select>. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix more tests. Created 5 years, 7 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 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../../resources/js-test.js"></script>
5 </head>
6
7 <body>
8
9 <p>When an option element became 'enabled' or not-'enabled', distribution should happen.</p>
10 <p>Since an option element does not create a renderer, we cannot check this usin g reftest.</p>
11
12 <div id="container">
13 <div id="host1">
14 <option id="option1">option 1</option>
15 <option id="option2">option 2</option>
16 </div>
17
18 <div id="host2">
19 <option id="option3" disabled>option 3</option>
20 <option id="option4" disabled>option 4</option>
21 </div>
22 </div>
23
24 <pre id="console"></pre>
25
26 <script>
27 jsTestIsAsync = true;
28
29 var shadowRoot1 = host1.createShadowRoot();
30 var shadowRoot2 = host2.createShadowRoot();
31
32 shadowRoot1.innerHTML = '<content select=":enabled">';
33 shadowRoot2.innerHTML = '<content select=":enabled">';
34
35 var content1 = shadowRoot1.querySelector('content');
36 var content2 = shadowRoot2.querySelector('content');
37
38 setTimeout(function() {
39 option2.setAttribute('disabled', true);
40 option4.removeAttribute('disabled');
41
42 nodes1 = content1.getDistributedNodes();
43 shouldBe('nodes1.length', '1');
44 shouldBe('nodes1.item(0).innerHTML', '"option 1"');
45
46 nodes2 = content2.getDistributedNodes();
47 shouldBe('nodes2.length', '1');
48 shouldBe('nodes2.item(0).innerHTML', '"option 4"');
49
50 container.innerHTML = "";
51 finishJSTest();
52 }, 0);
53
54 </script>
55 </body>
56 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698