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

Side by Side Diff: LayoutTests/imported/web-platform-tests/shadow-dom/html-elements-in-shadow-trees/html-forms/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_08_02_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/#html-fo rms">
16 <meta name="assert" content="HTML Elements in shadow trees: Form elements and fo rm-associated elements in shadow tree are not accessible using document DOM obje ct's tree accessors">
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 form-associated elements
26 test(function () {
27 var d = newHTMLDocument();
28
29 var form = d.createElement('form');
30 form.setAttribute('id', 'form_id');
31 d.body.appendChild(form);
32
33 var div = d.createElement('div');
34 d.body.appendChild(div);
35 var s = div.createShadowRoot();
36
37
38 HTML5_FORM_ASSOCIATED_ELEMENTS.forEach(function (tagName) {
39
40 var el = d.createElement(tagName);
41 el.setAttribute('form', 'form_id');
42 el.setAttribute('id', tagName + '_id');
43 s.appendChild(el);
44
45 assert_equals(d.querySelector('#' + tagName + '_id'), null, 'Form-associ ated element ' + tagName +
46 ' in shadow tree must not be accessible using owner\'s document tree accessors');
47 });
48 }, 'A_08_02_01_T01');
49
50
51 //test form elements
52 test(function () {
53 var d = newHTMLDocument();
54
55 var form = d.createElement('form');
56 d.body.appendChild(form);
57
58 var div = d.createElement('div');
59 form.appendChild(div);
60 s = div.createShadowRoot();
61
62 HTML5_FORM_ASSOCIATED_ELEMENTS.forEach(function (tagName) {
63
64 var el = d.createElement(tagName);
65 el.setAttribute('id', tagName + '_id');
66 s.appendChild(el);
67
68 assert_equals(d.querySelector('#' + tagName + '_id'), null, 'Form elemen t ' + tagName +
69 ' in shadow tree must not be accessible using owner\'s document tree accessors');
70 });
71 }, 'A_08_02_01_T02');
72 </script>
73 </body>
74 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698