diff options
Diffstat (limited to 'testing/web-platform/tests/html/dom/documents/dom-tree-accessors/document.scripts.html')
-rw-r--r-- | testing/web-platform/tests/html/dom/documents/dom-tree-accessors/document.scripts.html | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/dom/documents/dom-tree-accessors/document.scripts.html b/testing/web-platform/tests/html/dom/documents/dom-tree-accessors/document.scripts.html new file mode 100644 index 0000000000..82d3db14b2 --- /dev/null +++ b/testing/web-platform/tests/html/dom/documents/dom-tree-accessors/document.scripts.html @@ -0,0 +1,21 @@ +<!doctype html> +<meta charset=utf-8> +<title>Document.scripts</title> +<link rel="author" title="Intel" href="http://www.intel.com"> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<div id=log></div> +<script> +test(function() { + var scripts = document.scripts; + assert_true(scripts instanceof HTMLCollection); + assert_equals(scripts.length, 3); + + var script = document.createElement("script"); + document.body.appendChild(script); + assert_equals(scripts.length, 4); + + document.body.removeChild(script); + assert_equals(scripts.length, 3); +}, "Document.scripts should be a live collection"); +</script> |