OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../resources/testharness.js"></script> | 2 <script src="../resources/testharness.js"></script> |
3 <script src="../resources/testharnessreport.js"></script> | 3 <script src="../resources/testharnessreport.js"></script> |
4 <script src="../../serviceworker/resources/test-helpers.js"></script> | 4 <script src="../../serviceworker/resources/test-helpers.js"></script> |
5 <script> | 5 <script> |
6 | 6 |
7 promise_test(test => { | 7 promise_test(test => { |
8 var registration; | 8 var registration; |
9 var script_url = 'resources/empty-worker.js'; | 9 var script_url = 'resources/empty-worker.js'; |
10 var scope = 'resources/'; | 10 var scope = 'resources/'; |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 .then(state => { | 183 .then(state => { |
184 assert_equals(state, 'activated'); | 184 assert_equals(state, 'activated'); |
185 return registration.paymentAppManager.getManifest(); | 185 return registration.paymentAppManager.getManifest(); |
186 }) | 186 }) |
187 .then(unreached_fulfillment(test)) | 187 .then(unreached_fulfillment(test)) |
188 .catch(error => { | 188 .catch(error => { |
189 assert_equals(error.name, 'AbortError'); | 189 assert_equals(error.name, 'AbortError'); |
190 }); | 190 }); |
191 }, 'If there is no manifest data, then throws AbortError.'); | 191 }, 'If there is no manifest data, then throws AbortError.'); |
192 | 192 |
| 193 promise_test(test => { |
| 194 var registration; |
| 195 var script_url = 'resources/empty-worker.js'; |
| 196 var scope = 'resources/'; |
| 197 |
| 198 return service_worker_unregister_and_register(test, script_url, scope) |
| 199 .then(r => { |
| 200 registration = r; |
| 201 return wait_for_state(test, registration.installing, 'activated'); |
| 202 }) |
| 203 .then(state => { |
| 204 assert_equals(state, 'activated'); |
| 205 return registration.paymentAppManager.setManifest({ |
| 206 name: 'Payment App', |
| 207 icon: 'payment-app-icon', |
| 208 options: [{ |
| 209 name: 'Visa ****', |
| 210 icon: 'payment-app-icon', |
| 211 id: 'payment-app-id' |
| 212 }] |
| 213 }); |
| 214 }) |
| 215 .catch(unreached_rejection(test)); |
| 216 }, 'enabled_methods of PaymentAppOption is not required member. ' |
| 217 + 'so this test should be pass.'); |
| 218 |
193 </script> | 219 </script> |
OLD | NEW |