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

Side by Side Diff: LayoutTests/fast/dom/shadow/shadowdom-for-input-button.html

Issue 22852020: Only allow reprojecting shadows between ShadowRoots of the same type (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Delete another test Created 7 years, 4 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 <body>
3 <script>
4 if (window.internals)
5 internals.settings.setAuthorShadowDOMForAnyElementEnabled(true);
6 </script>
7
8 <p>1. If an input element has a shadow tree containing a &lt;shadow> element, it should get the value text of the input element.</p>
9 <div id="shadow">
10 <input type="button" value="Foo"><input type="button">
11 <input type="reset" value="Foo"><input type="reset">
12 <input type="submit" value="Foo"><input type="submit">
13 </div>
14
15 <p>2. If an author shadow tree contains no &lt;shadow> element, the button value should not be rendered.</p>
16 <div id="no-shadow">
17 <input type="button" value="Foo"><input type="button">
18 <input type="reset" value="Foo"><input type="reset">
19 <input type="submit" value="Foo"><input type="submit">
20 </div>
21
22 <p>3. If an author shadow tree contains only &lt;shadow> element, the button sho uld be rendered as it didn't have shadow trees.</p>
23 <div id="only-shadow">
24 <input type="button" value="Foo"><input type="button">
25 <input type="reset" value="Foo"><input type="reset">
26 <input type="submit" value="Foo"><input type="submit">
27 </div>
28
29 <p>4. Complex shadow tree.</p>
30 <div id="complex-shadow">
31 <input type="button" value="Foo"> <input type="button">
32 <input type="reset" value="Foo"> <input type="reset">
33 <input type="submit" value="Foo"> <input type="submit">
34 </div>
35
36 <script>
37 var hosts1 = document.querySelectorAll('#shadow input');
38 for (var i = 0; i < hosts1.length; ++i)
39 hosts1[i].createShadowRoot().innerHTML = '[<shadow></shadow>]';
40
41 var hosts2 = document.querySelectorAll('#no-shadow input');
42 for (var i = 0; i < hosts2.length; ++i)
43 hosts2[i].createShadowRoot().innerHTML = '[]';
44
45 var hosts3 = document.querySelectorAll('#only-shadow input');
46 for (var i = 0; i < hosts3.length; ++i)
47 hosts3[i].createShadowRoot().innerHTML = '<shadow />';
48
49 var hosts4 = document.querySelectorAll('#complex-shadow input');
50 for (var i = 0; i < hosts4.length; ++i)
51 hosts4[i].createShadowRoot().innerHTML = 'prefix <span style="color:red;">&h earts;</span><shadow></shadow> suffix';
52 </script>
53
54 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698