Title: [120796] trunk/LayoutTests
- Revision
- 120796
- Author
- [email protected]
- Date
- 2012-06-19 21:26:13 -0700 (Tue, 19 Jun 2012)
Log Message
Fix a form restore test broken by HTML5 parser
https://bugs.webkit.org/show_bug.cgi?id=89539
Reviewed by Kentaro Hara.
Before HTML5 parser, we parsed innerHTML input text and we attached
renderers to parsed nodes at the same time. The parsed nodes had
restored form values because we restore form values only for attached
elements.
After HTML5 parser, we don't attach renderers during innerHTML
parsing. state-restore-to-nonedited-controls.html used innerHTML to
built a form and the test haven't worked since introducing HTML5 parser.
This patch changes the test so that it uses document.write() instead of
innerHTML.
* fast/forms/state-restore-to-non-edited-controls-expected.txt:
Note that the FAIL line is expected. It's due to Bug 88685.
* fast/forms/state-restore-to-non-edited-controls.html:
Use document.write() instead of innerHTML.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (120795 => 120796)
--- trunk/LayoutTests/ChangeLog 2012-06-20 04:06:17 UTC (rev 120795)
+++ trunk/LayoutTests/ChangeLog 2012-06-20 04:26:13 UTC (rev 120796)
@@ -1,3 +1,27 @@
+2012-06-19 Kent Tamura <[email protected]>
+
+ Fix a form restore test broken by HTML5 parser
+ https://bugs.webkit.org/show_bug.cgi?id=89539
+
+ Reviewed by Kentaro Hara.
+
+ Before HTML5 parser, we parsed innerHTML input text and we attached
+ renderers to parsed nodes at the same time. The parsed nodes had
+ restored form values because we restore form values only for attached
+ elements.
+
+ After HTML5 parser, we don't attach renderers during innerHTML
+ parsing. state-restore-to-nonedited-controls.html used innerHTML to
+ built a form and the test haven't worked since introducing HTML5 parser.
+
+ This patch changes the test so that it uses document.write() instead of
+ innerHTML.
+
+ * fast/forms/state-restore-to-non-edited-controls-expected.txt:
+ Note that the FAIL line is expected. It's due to Bug 88685.
+ * fast/forms/state-restore-to-non-edited-controls.html:
+ Use document.write() instead of innerHTML.
+
2012-06-19 Ryosuke Niwa <[email protected]>
Test fix after r120521.
Modified: trunk/LayoutTests/fast/forms/state-restore-to-non-edited-controls-expected.txt (120795 => 120796)
--- trunk/LayoutTests/fast/forms/state-restore-to-non-edited-controls-expected.txt 2012-06-20 04:06:17 UTC (rev 120795)
+++ trunk/LayoutTests/fast/forms/state-restore-to-non-edited-controls-expected.txt 2012-06-20 04:26:13 UTC (rev 120796)
@@ -1,11 +1,11 @@
Test to NOT save state for non-edited controls
PASS document.getElementById("button").value is "2"
-PASS document.getElementById("hidden").value is "2"
+FAIL document.getElementById("hidden").value should be 2. Was 1.
PASS document.getElementById("image").value is "2"
PASS document.getElementById("reset").value is "2"
PASS document.getElementById("submit1").value is "2"
-PASS document.getElementById("text1").value is "2"
+PASS document.getElementById("text1").value is "edit"
PASS document.getElementById("text2").value is "2"
PASS document.getElementById("textarea").value is "2"
Modified: trunk/LayoutTests/fast/forms/state-restore-to-non-edited-controls.html (120795 => 120796)
--- trunk/LayoutTests/fast/forms/state-restore-to-non-edited-controls.html 2012-06-20 04:06:17 UTC (rev 120795)
+++ trunk/LayoutTests/fast/forms/state-restore-to-non-edited-controls.html 2012-06-20 04:26:13 UTC (rev 120796)
@@ -3,7 +3,7 @@
<head>
<script src=""
</head>
-<body _onload_="runTest()">
+<body>
<p>Test to NOT save state for non-edited controls</p>
<div id="console"></div>
@@ -14,7 +14,7 @@
<script>
function makeForm(parent, buttonValue, hiddenValue, imageValue, resetValue, submitValue, textValue1, textValue2, textAreaValue) {
- parent.innerHTML = '<form action="" id=form1>'
+ document.write('<form action="" id=form1>'
+ '<input name=button id=button type=button value="' + buttonValue + '">'
+ '<input name=hidden id=hidden type=hidden value="' + hiddenValue + '">'
+ '<input name=image id=image type=image value="' + imageValue + '">'
@@ -23,7 +23,7 @@
+ '<input name=text1 id=text1 type=text value="' + textValue1 + '">'
+ '<input name=text2 id=text2 type=text value="' + textValue2 + '">'
+ '<textarea name=textarea id=textarea>' + textAreaValue + '</textarea>'
- + '</form>';
+ + '</form>');
}
function runTest()
@@ -49,7 +49,7 @@
shouldBe('document.getElementById("image").value', '"2"');
shouldBe('document.getElementById("reset").value', '"2"');
shouldBe('document.getElementById("submit1").value', '"2"');
- shouldBe('document.getElementById("text1").value', '"2"');
+ shouldBe('document.getElementById("text1").value', '"edit"');
shouldBe('document.getElementById("text2").value', '"2"');
shouldBe('document.getElementById("textarea").value', '"2"');
@@ -58,5 +58,7 @@
layoutTestController.notifyDone();
}
}
+
+runTest();
</script>
</body>
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes