michael@0: function testDateNow() { michael@0: // Accessing global.Date for the first time will change the global shape, michael@0: // so do it before the loop starts; otherwise we have to loop an extra time michael@0: // to pick things up. michael@0: var time = Date.now(); michael@0: for (var j = 0; j < 9; ++j) michael@0: time = Date.now(); michael@0: return "ok"; michael@0: } michael@0: assertEq(testDateNow(), "ok");