OLD | NEW |
1 /* | 1 /* |
2 * worker-test-harness should be considered a temporary polyfill around | 2 * worker-test-harness should be considered a temporary polyfill around |
3 * testharness.js for supporting Service Worker based tests. It should not be | 3 * testharness.js for supporting Service Worker based tests. It should not be |
4 * necessary once the test harness is able to drive worker based tests natively. | 4 * necessary once the test harness is able to drive worker based tests natively. |
5 * See https://github.com/w3c/testharness.js/pull/82 for status of effort to | 5 * See https://github.com/w3c/testharness.js/pull/82 for status of effort to |
6 * update upstream testharness.js. Once the upstreaming is complete, tests that | 6 * update upstream testharness.js. Once the upstreaming is complete, tests that |
7 * reference worker-test-harness should be updated to directly import | 7 * reference worker-test-harness should be updated to directly import |
8 * testharness.js. | 8 * testharness.js. |
9 */ | 9 */ |
10 | 10 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 // argument. The function is run as a part of Promise chain owned by | 99 // argument. The function is run as a part of Promise chain owned by |
100 // promise_test(). As such, it is expected to behave in a manner identical (with | 100 // promise_test(). As such, it is expected to behave in a manner identical (with |
101 // the exception of the argument) to a function passed into promise_test(). | 101 // the exception of the argument) to a function passed into promise_test(). |
102 // | 102 // |
103 // E.g.: | 103 // E.g.: |
104 // cache_test(function(cache) { | 104 // cache_test(function(cache) { |
105 // // Do something with |cache|, which is a Cache object. | 105 // // Do something with |cache|, which is a Cache object. |
106 // }, "Some Cache test"); | 106 // }, "Some Cache test"); |
107 function cache_test(test_function, description) { | 107 function cache_test(test_function, description) { |
108 promise_test(function(test) { | 108 promise_test(function(test) { |
109 return create_temporary_cache(test) | 109 return create_temporary_cache(test) |
110 .then(test_function); | 110 .then(test_function); |
111 }, description); | 111 }, description); |
112 } | 112 } |
OLD | NEW |