Chromium Code Reviews| Index: LayoutTests/fast/forms/form-pseudo-valid-style.html |
| diff --git a/LayoutTests/fast/forms/form-pseudo-valid-style.html b/LayoutTests/fast/forms/form-pseudo-valid-style.html |
| index a62fddb3f03f1aa2e3cbdcb7d00b4f11f99d601f..d189c0f20e85b862aa6d3a521be025dd7d953875 100644 |
| --- a/LayoutTests/fast/forms/form-pseudo-valid-style.html |
| +++ b/LayoutTests/fast/forms/form-pseudo-valid-style.html |
| @@ -30,7 +30,7 @@ var parent = document.createElement('div'); |
| document.body.appendChild(parent); |
| debug('Removing and adding required text inputs and modifying ther value by a DOM tree mutation:'); |
| -parent.innerHTML = '<form id=form1><input type=text id=input1 required><input type=text id=input2 required value="a"><input type=submit id=sub1></form>'; |
| +parent.innerHTML = '<form id=form1><input type=text id=input1 required><input type=text id=input2 required value=a><input type=submit id=sub1></form>'; |
|
keishi
2014/10/17 04:52:37
nit: unintentional change?
Bartek Nowierski
2014/10/17 05:34:57
Yes. I wanted to make it consistent, 'coz the rest
|
| var form1 = $('form1'); |
| var input1 = $('input1'); |
| var input2 = $('input2'); |
| @@ -59,7 +59,7 @@ form1.appendChild(div1); |
| shouldBe('div1.appendChild(input1); backgroundOf(form1)', 'invalidColor'); |
| debug(''); |
| -debug('Render multiple forms and move an invalid input from one to another:'); |
| +debug('Render multiple forms and reassign an invalid input from one to another:'); |
| parent.innerHTML = '<form id=form1><input type=text id=input1 required><input type=text id=input2 required value="a"></form>' |
| + '<form id=form2><input type=text id=input3><input type=text id=input4 required value="a"></form>' |
| + '<form id=form3></form>'; |
| @@ -67,13 +67,20 @@ shouldBe('backgroundOf($("form1"))', 'invalidColor'); |
| shouldBe('backgroundOf($("form2"))', 'validColor'); |
| shouldBe('backgroundOf($("form3"))', 'validColor'); |
| var input1 = $('input1'); |
| -var form1 = $('form1'); |
| -var form3 = $('form3'); |
| input1.setAttribute("form", "form3"); |
| shouldBe('backgroundOf($("form1"))', 'validColor'); |
| shouldBe('backgroundOf($("form3"))', 'invalidColor'); |
| debug(''); |
| +debug('Ensure that invalid event was not triggered on style evaluation:'); |
| +var val = '0'; |
| +parent.innerHTML = '<form id=form1><input type=text id=input1 required oninvalid="val=\'1\';"></form>'; |
| +var form1 = $('form1'); |
| +shouldBe('backgroundOf(form1)', 'invalidColor'); |
| +shouldBe('val', '"0"'); |
| +shouldBe('form1.checkValidity(); val', '"1"'); |
| +debug(''); |
| + |
| parent.innerHTML = ''; |
| </script> |
| </body> |