Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/payments/payment-app-manager.html

Issue 2602213002: [PaymentApp] Fix a crash when enabledMethods called. (Closed)
Patch Set: [Payment] fix a crash when enabledMethods called. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698