mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Update web-platform-tests to revision 075802c1d3387d07e31cd5887459d539b1297c8d.
This commit is contained in:
parent
10127d6b5a
commit
881fe95cd1
1617 changed files with 57062 additions and 2789 deletions
|
@ -8,29 +8,29 @@
|
|||
<script src=/resources/testharnessreport.js></script>
|
||||
<script src=named-character-references-data.js></script>
|
||||
<script>
|
||||
(function() {
|
||||
(function() {
|
||||
|
||||
function pad(string, totalCharacters) {
|
||||
return totalCharacters < string.length ? string : (Array(totalCharacters + 1).join('0') + string).slice(-totalCharacters);
|
||||
}
|
||||
function pad(string, totalCharacters) {
|
||||
return totalCharacters < string.length ? string : (Array(totalCharacters + 1).join('0') + string).slice(-totalCharacters);
|
||||
}
|
||||
|
||||
var dummy = document.createElement('p');
|
||||
var dummy = document.createElement('p');
|
||||
|
||||
Object.keys(data).forEach(function(entity) {
|
||||
var object = data[entity];
|
||||
dummy.innerHTML = entity;
|
||||
test(
|
||||
function() {
|
||||
assert_equals(
|
||||
dummy.textContent,
|
||||
object.characters
|
||||
);
|
||||
},
|
||||
entity + ' should match ' + object.codepoints.map(function(codePoint) {
|
||||
return 'U+' + pad(codePoint.toString(16).toUpperCase(), 5);
|
||||
}).join(' ')
|
||||
);
|
||||
});
|
||||
Object.keys(data).forEach(function(entity) {
|
||||
var object = data[entity];
|
||||
dummy.innerHTML = entity;
|
||||
test(
|
||||
function() {
|
||||
assert_equals(
|
||||
dummy.textContent,
|
||||
object.characters
|
||||
);
|
||||
},
|
||||
entity + ' should match ' + object.codepoints.map(function(codePoint) {
|
||||
return 'U+' + pad(codePoint.toString(16).toUpperCase(), 5);
|
||||
}).join(' ')
|
||||
);
|
||||
});
|
||||
|
||||
}());
|
||||
</script>
|
||||
}());
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue