| OLD | NEW |
| 1 importScripts("/resources/testharness.js"); | 1 importScripts("/resources/testharness.js"); |
| 2 | 2 |
| 3 test(function() { | 3 test(function() { |
| 4 assert_true((performance !== undefined), "WorkerGlobalScope.performance exists
"); | 4 assert_true((performance !== undefined), "WorkerGlobalScope.performance exists
"); |
| 5 assert_equals((typeof performance.now), "function"); | 5 assert_equals((typeof performance.now), "function"); |
| 6 }, "WorkerGlobalScope.performance.now() is a function"); | 6 }, "WorkerGlobalScope.performance.now() is a function"); |
| 7 | 7 |
| 8 test(function() { | 8 test(function() { |
| 9 assert_true(performance.now() > 0); | 9 assert_true(performance.now() > 0); |
| 10 }, "WorkerGlobalScope.performance.now() returns a positive number"); | 10 }, "WorkerGlobalScope.performance.now() returns a positive number"); |
| 11 | 11 |
| 12 test(function() { | 12 test(function() { |
| 13 var now1 = performance.now(); | 13 var now1 = performance.now(); |
| 14 var now2 = performance.now(); | 14 var now2 = performance.now(); |
| 15 assert_true((now2-now1) >= 0); | 15 assert_true((now2-now1) >= 0); |
| 16 }, "WorkerGlobalScope.performance.now() difference is not negative"); | 16 }, "WorkerGlobalScope.performance.now() difference is not negative"); |
| 17 | 17 |
| 18 done(); | 18 done(); |
| OLD | NEW |