tizen beta release
[framework/web/webkit-efl.git] / LayoutTests / fast / forms / script-tests / output-reset-assertion-failed.js
1 description('Ensures that assertion failures don\'t occur on updating the value of <output> elements.');
2
3 debug('- A test in the value is set twice.');
4 var output = document.createElement('output');
5 document.body.appendChild(output);
6 output.value = '';
7 output.value = '';
8 testPassed('Not crashed');
9 document.body.removeChild(output);
10
11 debug('');
12 debug('- A test in the value is set to different values twice.');
13 output = document.createElement('output');
14 document.body.appendChild(output);
15 output.value = '';
16 output.value = 'foo';
17 testPassed('Not crashed');
18 document.body.removeChild(output);
19
20 debug('');
21 debug('- A test in reset events occur twice when there is no default value.');
22 var form = document.createElement('form');
23 document.body.appendChild(form);
24 output = document.createElement('output');
25 form.appendChild(output);
26 form.reset();
27 form.reset();
28 testPassed('Not crashed');
29 document.body.removeChild(form);
30
31 debug('');
32 debug('- A test in reset events occur twice when the value is the same as the default value.');
33 form = document.createElement('form');
34 document.body.appendChild(form);
35 output = document.createElement('output');
36 output.defaultValue = 'foo';
37 output.value = 'foo';
38 form.appendChild(output);
39 form.reset();
40 form.reset();
41 testPassed('Not crashed');
42 document.body.removeChild(form);