mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Update web-platform-tests to revision fab2c513bffb2bd19600d23b495264d123df092f
This commit is contained in:
parent
c226bf85a9
commit
ebddcc2d7f
441 changed files with 3689 additions and 1521 deletions
|
@ -0,0 +1,48 @@
|
|||
<!doctype html>
|
||||
<title>innerHTML getter for pre/textarea/listing with initial LF</title>
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<div id="outer">
|
||||
<div id="inner">
|
||||
<pre id="pre1">
|
||||
x</pre>
|
||||
<pre id="pre2">
|
||||
|
||||
x</pre>
|
||||
<textarea id="textarea1">
|
||||
x</textarea>
|
||||
<textarea id="textarea2">
|
||||
|
||||
x</textarea>
|
||||
<listing id="listing1">
|
||||
x</listing>
|
||||
<listing id="listing2">
|
||||
|
||||
x</listing>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var expected_outer = '\n<div id="inner">\n<pre id="pre1">x</pre>\n<pre id="pre2">\n\nx</pre>\n<textarea id="textarea1">x</textarea>\n<textarea id="textarea2">\n\nx</textarea>\n<listing id="listing1">x</listing>\n<listing id="listing2">\n\nx</listing>\n</div>\n';
|
||||
var expected_inner = expected_outer.replace('\n<div id="inner">', '').replace('</div>\n', '');
|
||||
var expected_1 = 'x';
|
||||
var expected_2 = '\nx';
|
||||
|
||||
test(function() {
|
||||
assert_equals(outer.innerHTML, expected_outer);
|
||||
}, 'outer div');
|
||||
|
||||
test(function() {
|
||||
assert_equals(inner.innerHTML, expected_inner);
|
||||
}, 'inner div');
|
||||
|
||||
['pre', 'textarea', 'listing'].forEach(function(tag) {
|
||||
test(function() {
|
||||
assert_equals(document.getElementById(tag + '1').innerHTML, expected_1);
|
||||
}, tag + '1');
|
||||
|
||||
test(function() {
|
||||
assert_equals(document.getElementById(tag + '2').innerHTML, expected_2);
|
||||
}, tag + '2');
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue