summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2012-11-18 21:49:25 +0000
committerVincent Sanders <vince@kyllikki.org>2012-11-18 21:49:25 +0000
commit4769698d13ca82c535896d7b168ee956709b12a8 (patch)
tree3b1308af709b4a13785912399d8c14516bf98001 /test
parent8810bc01635996fc6afa33a84ffb004aca6095e3 (diff)
downloadnetsurf-4769698d13ca82c535896d7b168ee956709b12a8.tar.gz
netsurf-4769698d13ca82c535896d7b168ee956709b12a8.tar.bz2
add enumeration test on the document node
Diffstat (limited to 'test')
-rw-r--r--test/js/dom-document-enumerate.html26
-rw-r--r--test/js/index.html1
2 files changed, 27 insertions, 0 deletions
diff --git a/test/js/dom-document-enumerate.html b/test/js/dom-document-enumerate.html
new file mode 100644
index 000000000..18146ab8a
--- /dev/null
+++ b/test/js/dom-document-enumerate.html
@@ -0,0 +1,26 @@
+<html>
+<head>
+<title>document interface enumeration</title>
+<link rel="stylesheet" type="text/css" href="tst.css">
+</head>
+<body>
+<h1>Document interface enumeration</h1>
+
+<script>
+function output(x,y) {
+ document.body.appendChild(document.createTextNode(x));
+ document.body.appendChild(document.createTextNode("("));
+ if (y != undefined) {
+ document.body.appendChild(document.createTextNode(y.length));
+ }
+ document.body.appendChild(document.createTextNode(") = "));
+ document.body.appendChild(document.createTextNode(y));
+ document.body.appendChild(document.createElement('br'));
+}
+
+for(var key in document) {
+ output(key, document[key]);
+}
+</script>
+</body>
+</html>
diff --git a/test/js/index.html b/test/js/index.html
index c59b54157..75008701b 100644
--- a/test/js/index.html
+++ b/test/js/index.html
@@ -36,6 +36,7 @@
<ul>
<li><a href="dom-node-enumerate.html">Node element interface</a></li>
<li><a href="dom-body-enumerate.html">Body element interface</a></li>
+<li><a href="dom-document-enumerate.html">Document interface</a></li>
</ul>
<h3>Document element specific</h3>
<ul>