js/xpconnect/tests/mochitest/file_bug706301.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/xpconnect/tests/mochitest/file_bug706301.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,27 @@
     1.4 +<!DOCTYPE html>
     1.5 +<html>
     1.6 +  <head>
     1.7 +    <script type="application/javascript">
     1.8 +      window.addEventListener('message', doContentTest);
     1.9 +
    1.10 +      function doContentTest() {
    1.11 +
    1.12 +        // This has always worked.
    1.13 +        var nodelist1 = document.getElementsByTagName('details');
    1.14 +        Object.getOwnPropertyDescriptor(nodelist1, 'length');
    1.15 +        ok(nodelist1['length'] == 0, "Content should be able to get the length of " +
    1.16 +                                     "its own nodelist after calling getOwnPropertyDescriptor.");
    1.17 +
    1.18 +        // This is bug 706301.
    1.19 +        var nodelist2 = document.getElementsByTagName('section');
    1.20 +        ok(getLengthInChrome(nodelist2), "Chrome should be able to get the length of " +
    1.21 +                                         "content nodelist after calling getOwnPropertyDescriptor.");
    1.22 +
    1.23 +        // All done.
    1.24 +        finishTestInChrome();
    1.25 +      }
    1.26 +    </script>
    1.27 +  </head>
    1.28 +  <body>
    1.29 +  </body>
    1.30 +</html>

mercurial