[webkit-changes] cvs commit: LayoutTests/fast/dom
clone-node-form-elements-expected.txt clone-node-form-elements.html
Anders
andersca at opensource.apple.com
Tue Jan 3 00:23:39 PST 2006
andersca 06/01/03 00:23:39
Modified: . ChangeLog
Added: fast/dom clone-node-form-elements-expected.txt
clone-node-form-elements.html
Log:
2006-01-03 Anders Carlsson <andersca at mac.com>
Reviewed by Darin.
- Add tests for http://bugzilla.opendarwin.org/show_bug.cgi?id=5177
Javascript cloneNode(deep) does not clone form elements correctly
* fast/dom/clone-node-form-elements-expected.txt: Added.
* fast/dom/clone-node-form-elements.html: Added.
Revision Changes Path
1.212 +10 -0 LayoutTests/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/LayoutTests/ChangeLog,v
retrieving revision 1.211
retrieving revision 1.212
diff -u -r1.211 -r1.212
--- ChangeLog 3 Jan 2006 02:07:12 -0000 1.211
+++ ChangeLog 3 Jan 2006 08:23:37 -0000 1.212
@@ -1,3 +1,13 @@
+2006-01-03 Anders Carlsson <andersca at mac.com>
+
+ Reviewed by Darin.
+
+ - Add tests for http://bugzilla.opendarwin.org/show_bug.cgi?id=5177
+ Javascript cloneNode(deep) does not clone form elements correctly
+
+ * fast/dom/clone-node-form-elements-expected.txt: Added.
+ * fast/dom/clone-node-form-elements.html: Added.
+
2006-01-03 Alexey Proskuryakov <ap at nypop.com>
Reviewed by Eric.
1.1 LayoutTests/fast/dom/clone-node-form-elements-expected.txt
Index: clone-node-form-elements-expected.txt
===================================================================
This tests that cloneNode and importNode copies the form element properties that aren't stored in values, such as 'value', and 'checked'. If this test is successful, the text SUCCESS should be shown below.
SUCCESS!
1.1 LayoutTests/fast/dom/clone-node-form-elements.html
Index: clone-node-form-elements.html
===================================================================
<html>
<head>
<script>
function debug(str) {
var c = document.getElementById('console')
c.innerHTML += (str + "<br>")
}
function runTests() {
if (window.layoutTestController)
layoutTestController.dumpAsText();
var input1 = document.getElementById('input1');
input1.value = 'Test';
var input1clone = input1.cloneNode(true);
if (input1clone.value != input1.value) {
debug('FAILURE: input1clone.value was "' + input1clone.value + '", expected "' + input1.value + '"')
return;
}
var input1imported = document.importNode(input1, true);
if (input1imported.value != input1.value) {
debug('FAILURE: input1imported.value was "' + input1imported.value + '", expected "' + input1.value + '"')
return;
}
var input2 = document.getElementById('input2');
input2.checked = true;
var input2clone = input2.cloneNode(true);
if (input2clone.checked != input2.checked) {
debug('FAILURE: input2clone.checked was "' + input2clone.checked + '", expected "' + input2.checked + '"')
return;
}
var input2imported = document.importNode(input2, true);
if (input2imported.checked != input2.checked) {
debug('FAILURE: input2imported.checked was "' + input2imported.checked + '", expected "' + input2.checked + '"')
return;
}
debug('SUCCESS!')
}
</script>
</head>
<body onload="runTests();">
<input id="input1" type="text">
<input id="input2" type="checkbox">
<div>
This tests that cloneNode and importNode copies the form element properties that aren't stored in values, such as 'value', and 'checked'. If this test is successful, the text SUCCESS should be shown below.
</div>
<pre id="console"></pre>
</body>
</html>
More information about the webkit-changes
mailing list