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

Side by Side Diff: LayoutTests/imported/web-platform-tests/shadow-dom/shadow-trees/custom-pseudo-elements/test-001.html

Issue 560893005: First checked-in import of the W3C's test suites. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add new expectations for newly failing w3c tests Created 6 years, 3 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 <!--
3 Distributed under both the W3C Test Suite License [1] and the W3C
4 3-clause BSD License [2]. To contribute to a W3C Test Suite, see the
5 policies and contribution forms [3].
6
7 [1] http://www.w3.org/Consortium/Legal/2008/04-testsuite-license
8 [2] http://www.w3.org/Consortium/Legal/2008/03-bsd-license
9 [3] http://www.w3.org/2004/10/27-testcases
10 -->
11 <html>
12 <head>
13 <title>Shadow DOM Test: A_04_10_01</title>
14 <link rel="author" title="Sergey G. Grekhov" href="mailto:sgrekhov@unipro.ru">
15 <link rel="help" href="http://www.w3.org/TR/2013/WD-shadow-dom-20130514/#custom- pseudo-elements">
16 <meta name="assert" content="Custom Pseudo-Elements: test valid pseudo-element">
17 <script src="../../../../../resources/testharness.js"></script>
18 <script src="../../../../../resources/testharnessreport.js"></script>
19 <script src="../../testcommon.js"></script>
20 <link rel="stylesheet" href="../../../../../resources/testharness.css">
21 </head>
22 <body>
23 <div id="log"></div>
24 <script>
25 // Test fails. See https://bugs.webkit.org/show_bug.cgi?id=103973
26 test(unit(function (ctx) {
27
28 var d = newRenderedHTMLDocument(ctx);
29
30 var style = d.createElement('style');
31 style.innerHTML = 'span {' +
32 'font-size: 10px;' +
33 '}';
34 d.head.appendChild(style);
35
36 var widget = d.createElement('div');
37 d.body.appendChild(widget);
38
39 var s = widget.createShadowRoot();
40
41 var thumb = d.createElement('span');
42 thumb.innerHTML = 'This is a pseudo-element';
43 //FIXME test works if prefixed version of API used.
44 //In other words works if webkitPseudo property is used
45 //thumb.webkitPseudo = 'x-thumb';
46 thumb.pseudo = 'x-thumb';
47 s.appendChild(thumb);
48
49 var height = thumb.offsetHeight;
50
51 assert_true(height > 0, 'Element should be rendered');
52
53 style = d.createElement('style');
54 style.innerHTML = 'div::x-thumb {' +
55 'font-size: 30px;' +
56 '}';
57 d.body.appendChild(style);
58
59 assert_true(thumb.offsetHeight > height, 'Pseudo-element style should be app lied');
60
61 }), 'A_04_10_01_T01');
62 </script>
63 </body>
64 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698