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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/form-attribute-nonexistence-form-id.html

Issue 2000423006: Drop LABEL element from form-associated elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
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 <form id="form"> 8 <form id="form">
9 <input type="hidden" id="input1" value="value1"> 9 <input type="hidden" id="input1" value="value1">
10 <input type="hidden" id="input2" value="value2" form="X"> 10 <input type="hidden" id="input2" value="value2" form="X">
11 <label id="label1">label1</label> 11 <label id="label1">label1</label>
12 <label id="label2" form="X">label2</label> 12 <label id="label2" form="X">label2</label>
13 </form> 13 </form>
14 <div id="console"></div> 14 <div id="console"></div>
15 <script> 15 <script>
16 description('This page ensures that &lt;input from="X"&gt; and &lt;label from="X "&gt; don\'t associate with any form elements when there is no &lt;form id="X"&g t;.'); 16 description('This page ensures that &lt;input from="X"&gt; and &lt;label from="X "&gt; don\'t associate with any form elements when there is no &lt;form id="X"&g t;.');
17 17
18 var form = document.getElementById('form'); 18 var form = document.getElementById('form');
19 var inputShouldHaveForm = document.getElementById('input1'); 19 var inputShouldHaveForm = document.getElementById('input1');
20 var inputShouldNotHaveForm = document.getElementById('input2'); 20 var inputShouldNotHaveForm = document.getElementById('input2');
21 var labelShouldHaveForm = document.getElementById('label1'); 21 var labelWithoutForm = document.getElementById('label1');
22 var labelShouldNotHaveForm = document.getElementById('label2'); 22 var labelWithInvalidForm = document.getElementById('label2');
23 shouldBe('inputShouldHaveForm.form', 'form'); 23 shouldBe('inputShouldHaveForm.form', 'form');
24 shouldBeNull('inputShouldNotHaveForm.form'); 24 shouldBeNull('inputShouldNotHaveForm.form');
25 shouldBe('labelShouldHaveForm.form', 'form'); 25 shouldBeNull('labelWithoutForm.form');
26 shouldBeNull('labelShouldNotHaveForm.form'); 26 shouldBeNull('labelWithInvalidForm.form');
27 </script> 27 </script>
28 </body> 28 </body>
29 </html> 29 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698