Update web-platform-tests to revision e92532746b7615dcccdfa060937a87664816b1db

This commit is contained in:
WPT Sync Bot 2018-02-21 20:12:51 -05:00
parent cccca27f4f
commit 726b56aa12
149 changed files with 22796 additions and 1884 deletions

View file

@ -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&#9;value2&#xD;&#xA;">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="&#9;"/>', '<root attr="&#x9;"/>']);
root.setAttribute('attr', '\n');
assert_in_array(serializer.serializeToString(root), [
'<root attr="&#xA;"/>', '<root attr="&#10;"/>']);
root.setAttribute('attr', '\r');
assert_in_array(serializer.serializeToString(root), [
'<root attr="&#xD;"/>', '<root attr="&#13;"/>']);
}, 'check XMLSerializer.serializeToString escapes attribute values for roundtripping');
</script>