1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/workers/test/test_resolveWorker.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,31 @@ 1.4 +<!-- 1.5 + Any copyright is dedicated to the Public Domain. 1.6 + http://creativecommons.org/publicdomain/zero/1.0/ 1.7 +--> 1.8 +<!DOCTYPE html> 1.9 +<html> 1.10 + <head> 1.11 + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.12 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 1.13 + </head> 1.14 + <body> 1.15 + <script type="application/javascript"> 1.16 + window.Worker; // resolve not through assignment 1.17 + Worker = 17; 1.18 + 1.19 + var desc = Object.getOwnPropertyDescriptor(window, "Worker"); 1.20 + ok(typeof desc === "object" && desc !== null, "Worker property must exist"); 1.21 + 1.22 + is(desc.value, 17, "Overwrite didn't work correctly"); 1.23 + is(desc.enumerable, false, 1.24 + "Initial descriptor was non-enumerable, and [[Put]] changes the " + 1.25 + "property value but not its enumerability"); 1.26 + is(desc.configurable, true, 1.27 + "Initial descriptor was configurable, and [[Put]] changes the " + 1.28 + "property value but not its configurability"); 1.29 + is(desc.writable, true, 1.30 + "Initial descriptor was writable, and [[Put]] changes the " + 1.31 + "property value but not its writability"); 1.32 + </script> 1.33 + </body> 1.34 +</html>