test_bug874758.html 950 B

1234567891011121314151617181920212223242526272829303132
  1. <!DOCTYPE HTML>
  2. <html data-expando-prop="xyz">
  3. <!--
  4. https://bugzilla.mozilla.org/show_bug.cgi?id=874758
  5. -->
  6. <head>
  7. <meta charset="utf-8">
  8. <title>Test for Bug 874758</title>
  9. <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  10. <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
  11. <script type="application/javascript">
  12. /** Test for Bug 874758 **/
  13. Object.prototype.expandoProp = 5;
  14. is({}.expandoProp, 5, "Should see this on random objects");
  15. is(document.head.dataset.expandoProp, 5, "Should see this on dataset too");
  16. is(document.documentElement.dataset.expandoProp, "xyz",
  17. "But if the dataset has it, we should get it from there");
  18. </script>
  19. </head>
  20. <body>
  21. <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=874758">Mozilla Bug 874758</a>
  22. <p id="display"></p>
  23. <div id="content" style="display: none">
  24. </div>
  25. <pre id="test">
  26. </pre>
  27. </body>
  28. </html>