test_resolveWorker-assignment.html 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. <!--
  2. Any copyright is dedicated to the Public Domain.
  3. http://creativecommons.org/publicdomain/zero/1.0/
  4. -->
  5. <!DOCTYPE html>
  6. <html>
  7. <head>
  8. <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  9. <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
  10. </head>
  11. <body>
  12. <script type="application/javascript">
  13. window.Worker = 17; // resolve through assignment
  14. var desc = Object.getOwnPropertyDescriptor(window, "Worker");
  15. ok(typeof desc === "object" && desc !== null, "Worker property must exist");
  16. is(desc.value, 17, "Overwrite didn't work correctly");
  17. is(desc.enumerable, false,
  18. "Initial descriptor was non-enumerable, and [[Put]] changes the " +
  19. "property value but not its enumerability");
  20. is(desc.configurable, true,
  21. "Initial descriptor was configurable, and [[Put]] changes the " +
  22. "property value but not its configurability");
  23. is(desc.writable, true,
  24. "Initial descriptor was writable, and [[Put]] changes the " +
  25. "property value but not its writability");
  26. </script>
  27. </body>
  28. </html>