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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/HTMLTemplateElement/no-form-association2.html

Issue 2143833003: [Match Spec] Form element pointer should not be updated w/in <template> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: undo labels which have been split into separate CL Created 4 years, 5 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <body>
3 <!-- based on WebKit test: https://trac.webkit.org/changeset/160182 -->
4 <script src="../../../resources/testharness.js"></script>
5 <script src="../../../resources/testharnessreport.js"></script>
6 <script>
7 function stripSpaces(str) {
8 return str.replace(/[\s\n]/gm, '');
9 }
10 </script>
11 <form>
12 <template id="templateWithFormInsideForm">
13 <form>
14 <input>
15 </form>
16 </template>
17 </form>
18 <script>
19 test(function() {
20 var templateWithFormInsideForm = document.getElementById('templateWithFormInsi deForm');
21 assert_equals(stripSpaces(templateWithFormInsideForm.innerHTML), '<form><input ></form>');
22 var formInsideTemplate = templateWithFormInsideForm.content.firstElementChild;
23 assert_equals(formInsideTemplate.localName, 'form');
24 var inputInsideTemplate = templateWithFormInsideForm.content.querySelector('in put');
25 assert_equals(inputInsideTemplate.form, formInsideTemplate);
26 assert_equals(formInsideTemplate.firstElementChild, inputInsideTemplate);
27 }, 'Form control elements inside templates should not be associated with forms o utside the template.');
28 </script>
29 <template id="templateWithNestedForms">
30 <form>
31 <form></form>
32 </form>
33 </template>
34 <script>
35 test(function() {
36 var templateWithNestedForms = document.getElementById('templateWithNestedForms ');
37 assert_equals(stripSpaces(templateWithNestedForms.innerHTML), '<form><form></f orm></form>');
38 }, '(Nested) form elements inside templates should be parsed correctly.');
39 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698