| OLD | NEW |
| 1 if (self.importScripts) { | 1 if (self.importScripts) { |
| 2 importScripts('/resources/testharness.js'); | 2 importScripts('/resources/testharness.js'); |
| 3 importScripts('../resources/test-helpers.js'); | 3 importScripts('../resources/test-helpers.js'); |
| 4 } | 4 } |
| 5 | 5 |
| 6 cache_test(function(cache, test) { | 6 cache_test(function(cache, test) { |
| 7 return promise_rejects( | 7 return promise_rejects( |
| 8 test, | 8 test, |
| 9 new TypeError(), | 9 new TypeError(), |
| 10 cache.add(), | 10 cache.add(), |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 test, | 96 test, |
| 97 new TypeError(), | 97 new TypeError(), |
| 98 cache.add('../resources/fetch-status.php?status=500'), | 98 cache.add('../resources/fetch-status.php?status=500'), |
| 99 'Cache.add should reject if response is !ok'); | 99 'Cache.add should reject if response is !ok'); |
| 100 }, 'Cache.add with request that results in a status of 500'); | 100 }, 'Cache.add with request that results in a status of 500'); |
| 101 | 101 |
| 102 cache_test(function(cache, test) { | 102 cache_test(function(cache, test) { |
| 103 return promise_rejects( | 103 return promise_rejects( |
| 104 test, | 104 test, |
| 105 new TypeError(), | 105 new TypeError(), |
| 106 cache.add('../resources/fetch-status.php?status=206'), |
| 107 'Cache.add should reject on partial response'); |
| 108 }, 'Cache.add with request that results in a status of 206'); |
| 109 |
| 110 cache_test(function(cache, test) { |
| 111 return promise_rejects( |
| 112 test, |
| 113 new TypeError(), |
| 114 cache.addAll(['../resources/simple.txt', |
| 115 '../resources/fetch-status.php?status=206']), |
| 116 'Cache.addAll should reject on partial response'); |
| 117 }, 'Cache.addAll with request that results in a status of 206'); |
| 118 |
| 119 cache_test(function(cache, test) { |
| 120 return promise_rejects( |
| 121 test, |
| 122 new TypeError(), |
| 106 cache.addAll(), | 123 cache.addAll(), |
| 107 'Cache.addAll with no arguments should throw TypeError.'); | 124 'Cache.addAll with no arguments should throw TypeError.'); |
| 108 }, 'Cache.addAll with no arguments'); | 125 }, 'Cache.addAll with no arguments'); |
| 109 | 126 |
| 110 cache_test(function(cache, test) { | 127 cache_test(function(cache, test) { |
| 111 // Assumes the existence of ../resources/simple.txt and ../resources/blank.h
tml | 128 // Assumes the existence of ../resources/simple.txt and ../resources/blank.h
tml |
| 112 var urls = ['../resources/simple.txt', undefined, '../resources/blank.html']
; | 129 var urls = ['../resources/simple.txt', undefined, '../resources/blank.html']
; |
| 113 return promise_rejects( | 130 return promise_rejects( |
| 114 test, | 131 test, |
| 115 new TypeError(), | 132 new TypeError(), |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 var request = new Request('../resources/simple.txt'); | 256 var request = new Request('../resources/simple.txt'); |
| 240 return promise_rejects( | 257 return promise_rejects( |
| 241 test, | 258 test, |
| 242 'InvalidStateError', | 259 'InvalidStateError', |
| 243 cache.addAll([request, request]), | 260 cache.addAll([request, request]), |
| 244 'Cache.addAll should throw InvalidStateError if the same request is added
' + | 261 'Cache.addAll should throw InvalidStateError if the same request is added
' + |
| 245 'twice.'); | 262 'twice.'); |
| 246 }, 'Cache.addAll called with the same Request object specified twice'); | 263 }, 'Cache.addAll called with the same Request object specified twice'); |
| 247 | 264 |
| 248 done(); | 265 done(); |
| OLD | NEW |