Commit 6f772d47 authored by Boris Zbarsky's avatar Boris Zbarsky
Browse files

Add a test for bug 785941. r=ms2ger

parent ccbf76c6
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -34867,6 +34867,12 @@
        ]
      },
      "testharness": {
        "dom/collections/HTMLCollection-as-proto-length-get-throws.html": [
          {
            "path": "dom/collections/HTMLCollection-as-proto-length-get-throws.html",
            "url": "/dom/collections/HTMLCollection-as-proto-length-get-throws.html"
          }
        ],
        "js/builtins/Promise-incumbent-global.sub.html": [
          {
            "path": "js/builtins/Promise-incumbent-global.sub.html",
+13 −0
Original line number Diff line number Diff line
<!doctype html>
<meta charset=utf-8>
<title>Make sure browsers throw when getting .length on some random object whose proto is an HTMLCollection</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script>
test(function() {
  var obj = Object.create(document.getElementsByTagName("script"));
  assert_throws(new TypeError(), function() {
    obj.length;
  });
}, "HTMLcollection as a prototype should not allow getting .length on the base object")
</script>