mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Update web-platform-tests to revision e92532746b7615dcccdfa060937a87664816b1db
This commit is contained in:
parent
cccca27f4f
commit
726b56aa12
149 changed files with 22796 additions and 1884 deletions
|
@ -42,10 +42,17 @@ test(function() {
|
|||
|
||||
test(function() {
|
||||
var serializer = new XMLSerializer();
|
||||
var root = createXmlDoc().documentElement;
|
||||
root.firstChild.setAttribute('attr1', 'value1\tvalue2\r\n');
|
||||
var xmlString = serializer.serializeToString(root);
|
||||
assert_equals(xmlString, '<root><child1 attr1="value1	value2
">value1</child1></root>');
|
||||
var parser = new DOMParser();
|
||||
var root = parser.parseFromString('<root />', 'text/xml').documentElement;
|
||||
root.setAttribute('attr', '\t');
|
||||
assert_in_array(serializer.serializeToString(root), [
|
||||
'<root attr="	"/>', '<root attr="	"/>']);
|
||||
root.setAttribute('attr', '\n');
|
||||
assert_in_array(serializer.serializeToString(root), [
|
||||
'<root attr="
"/>', '<root attr=" "/>']);
|
||||
root.setAttribute('attr', '\r');
|
||||
assert_in_array(serializer.serializeToString(root), [
|
||||
'<root attr="
"/>', '<root attr=" "/>']);
|
||||
}, 'check XMLSerializer.serializeToString escapes attribute values for roundtripping');
|
||||
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue