mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Cargoify servo
This commit is contained in:
parent
db2f642c32
commit
c6ab60dbfc
1761 changed files with 8423 additions and 2294 deletions
21
tests/content/test_element_attributes.html
Normal file
21
tests/content/test_element_attributes.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
<html>
|
||||
<head id="foo">
|
||||
<script src="harness.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div></div>
|
||||
<script>
|
||||
var attrs = [];
|
||||
for (var i = 'a'.charCodeAt(0); i != 'z'.charCodeAt(0); i++) {
|
||||
document.getElementsByTagName('div')[0].setAttribute(String.fromCharCode(i),
|
||||
i.toString());
|
||||
}
|
||||
var attributes = document.getElementsByTagName('div')[0].attributes;
|
||||
for (var i = 0; i < attributes.length; i++) {
|
||||
is(attributes[i].name, String.fromCharCode(i + 'a'.charCodeAt(0)));
|
||||
is(attributes[i].value, (i + 'a'.charCodeAt(0)).toString());
|
||||
}
|
||||
finish();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue