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

Side by Side Diff: LayoutTests/fast/forms/form-attribute.html

Issue 102263006: Implement HTMLOptionElement.form as required by spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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
OLDNEW
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <p id="description"></p> 7 <p id="description"></p>
8 <div id="console"></div> 8 <div id="console"></div>
9 <script> 9 <script>
10 description("This test checks the form attribute of the form-associated elements ."); 10 description("This test checks the form attribute of the form-associated elements .");
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 owner = document.getElementById('owner'); 171 owner = document.getElementById('owner');
172 shouldBeEqualToString('owner.name', 'secondOwner'); 172 shouldBeEqualToString('owner.name', 'secondOwner');
173 shouldBe('inputElement.form', 'owner'); 173 shouldBe('inputElement.form', 'owner');
174 shouldBe('labelElement.form', 'owner'); 174 shouldBe('labelElement.form', 'owner');
175 container.removeChild(owner); 175 container.removeChild(owner);
176 shouldBe('inputElement.form', 'null'); 176 shouldBe('inputElement.form', 'null');
177 shouldBe('labelElement.form', 'null'); 177 shouldBe('labelElement.form', 'null');
178 container.appendChild(owner); 178 container.appendChild(owner);
179 shouldBe('inputElement.form', 'owner'); 179 shouldBe('inputElement.form', 'owner');
180 shouldBe('labelElement.form', 'owner'); 180 shouldBe('labelElement.form', 'owner');
181
182 debug('');
183 debug('- Checks if option.form is only set if it has a &lt;select&gt; parent.');
184 container.innerHTML = '<form id=firstOwner><option id=firstOption></option></for m>' +
185 '<form id=secondOwner><optgroup><option id=secondOption></option></optgroup> </form>' +
186 '<form id=thirdOwner><select><optgroup><option id=thirdOption></option></opt group></select></form>';
187 var option1 = document.getElementById('firstOption');
188 shouldBe('option1.form', 'null');
189 var option2 = document.getElementById('secondOption');
190 shouldBe('option2.form', 'null');
191 owner = document.getElementById('thirdOwner');
192 var option3 = document.getElementById('thirdOption');
193 shouldBe('option3.form', 'owner');
181 </script> 194 </script>
182 </body> 195 </body>
183 </html> 196 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/forms/form-attribute-expected.txt » ('j') | Source/core/html/HTMLOptionElement.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698