Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / clone-node-form-elements-with-attr.html
blobeb8ecac038fa36555bf7e7166ce45d1416dfccc2
1 <html>
2 <head>
3 <script>
4 function debug(str) {
5 var c = document.getElementById('console')
6 c.innerHTML += (str + "<br>")
9 function runTests() {
10 if (window.testRunner)
11 testRunner.dumpAsText();
13 var input1 = document.getElementById('input1');
14 input1.value = 'Test';
16 var input1clone = input1.cloneNode(true);
17 if (input1clone.value != input1.value) {
18 debug('FAILURE: input1clone.value was "' + input1clone.value + '", expected "' + input1.value + '"')
19 return;
22 var input1imported = document.importNode(input1, true);
23 if (input1imported.value != input1.value) {
24 debug('FAILURE: input1imported.value was "' + input1imported.value + '", expected "' + input1.value + '"')
25 return;
28 var input2 = document.getElementById('input2');
29 input2.checked = true;
30 var input2clone = input2.cloneNode(true);
31 if (input2clone.checked != input2.checked) {
32 debug('FAILURE: input2clone.checked was "' + input2clone.checked + '", expected "' + input2.checked + '"')
33 return;
36 var input2imported = document.importNode(input2, true);
37 if (input2imported.checked != input2.checked) {
38 debug('FAILURE: input2imported.checked was "' + input2imported.checked + '", expected "' + input2.checked + '"')
39 return;
43 debug('SUCCESS!')
45 </script>
46 </head>
47 <body onload="runTests();">
48 <input id="input1" type="text">
49 <input id="input2" type="checkbox" checked="checked">
50 <div>
51 This tests that cloneNode and importNode copy the form element properties that aren't stored in values, such as 'value', and 'checked'.
52 If this test is successful, the text SUCCESS should be shown below.
53 This is a variation on the base test that has the checked attribute already set, which at one point
54 caused a crash (see <a href="https://bugs.webkit.org/show_bug.cgi?id=6617">Bugzilla bug 6617</a>).
55 </div>
56 <pre id="console"></pre>
57 </body>
58 </html>