Update web-platform-tests to revision 0d318188757a9c996e20b82db201fd04de5aa255

This commit is contained in:
James Graham 2015-03-27 09:15:38 +00:00
parent b2a5225831
commit 1a81b18b9f
12321 changed files with 544385 additions and 6 deletions

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<title>title.text with comment and element children.</title>
<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-title-text">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
try {
var title = document.getElementsByTagName("title")[0];
while (title.childNodes.length)
title.removeChild(title.childNodes[0]);
title.appendChild(document.createComment("COMMENT"));
title.appendChild(document.createTextNode("TEXT"));
title.appendChild(document.createElement("a"))
.appendChild(document.createTextNode("ELEMENT"))
} catch (e) {
}
</script>
<script>
test(function() {
assert_equals(title.text, "TEXT");
assert_equals(title.textContent, "TEXTELEMENT");
})
</script>

View file

@ -0,0 +1,30 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>title.text with comment and element children.</title>
<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com"/>
<link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-title-text"/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="log"></div>
<script>
try {
var title = document.getElementsByTagName("title")[0];
while (title.childNodes.length)
title.removeChild(title.childNodes[0]);
title.appendChild(document.createComment("COMMENT"));
title.appendChild(document.createTextNode("TEXT"));
title.appendChild(document.createElement("a"))
.appendChild(document.createTextNode("ELEMENT"))
} catch (e) {
}
</script>
<script>
test(function() {
assert_equals(title.text, "TEXT");
assert_equals(title.textContent, "TEXTELEMENT");
})
</script>
</body>
</html>

View file

@ -0,0 +1,32 @@
<!DOCTYPE html>
<title> title.text and space normalization </title>
<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-title-text">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
test(function() {
assert_equals(document.getElementsByTagName("title")[0].text,
" title.text and space normalization ");
assert_equals(document.getElementsByTagName("title")[0].textContent,
" title.text and space normalization ");
assert_equals(document.getElementsByTagName("title")[0].firstChild.nodeValue,
" title.text and space normalization ");
}, "title.text and space normalization (markup)");
[
"one space", "two spaces",
"one\ttab", "two\t\ttabs",
"one\nnewline", "two\n\nnewlines",
"one\fform feed", "two\f\fform feeds",
"one\rcarriage return", "two\r\rcarriage returns"
].forEach(function(str) {
test(function() {
document.title = str;
var title = document.getElementsByTagName("title")[0];
assert_equals(title.text, str);
assert_equals(title.textContent, str);
assert_equals(title.firstChild.nodeValue, str);
}, "title.text and space normalization: " + format_value(str))
});
</script>

View file

@ -0,0 +1,37 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> title.text and space normalization </title>
<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com"/>
<link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-title-text"/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="log"></div>
<script>
test(function() {
assert_equals(document.getElementsByTagName("title")[0].text,
" title.text and space normalization ");
assert_equals(document.getElementsByTagName("title")[0].textContent,
" title.text and space normalization ");
assert_equals(document.getElementsByTagName("title")[0].firstChild.nodeValue,
" title.text and space normalization ");
}, "title.text and space normalization (markup)");
[
"one space", "two spaces",
"one\ttab", "two\t\ttabs",
"one\nnewline", "two\n\nnewlines",
"one\fform feed", "two\f\fform feeds",
"one\rcarriage return", "two\r\rcarriage returns"
].forEach(function(str) {
test(function() {
document.title = str;
var title = document.getElementsByTagName("title")[0];
assert_equals(title.text, str);
assert_equals(title.textContent, str);
assert_equals(title.firstChild.nodeValue, str);
}, "title.text and space normalization: " + format_value(str))
});
</script>
</body>
</html>