remove-success.tentative.https.html (1224B)
1 <!DOCTYPE html> 2 <title>Sub Apps: Valid calls for remove()</title> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <script src="resources/subapps-helpers.js"></script> 6 <script> 7 8 promise_test(async t => { 9 10 const url = '/sub-app'; 11 let remove_call_params = [url]; 12 let mocked_response = [{ "manifestIdPath": url, "resultCode": Status.SUCCESS }]; 13 let expected_results = {[url]: "success"}; 14 15 await subapps_remove_expect_success_with_result(t, remove_call_params, mocked_response, expected_results); 16 }, 'Remove API call works with one app.'); 17 18 promise_test(async t => { 19 20 const url_1 = '/sub-app-1'; 21 const url_2 = '/sub-app-2'; 22 const url_3 = '/sub-app-3'; 23 24 let remove_call_params = [url_1, url_2, url_3]; 25 26 let mocked_response = [ 27 { "manifestIdPath": url_1, "resultCode": Status.SUCCESS }, 28 { "manifestIdPath": url_2, "resultCode": Status.SUCCESS }, 29 { "manifestIdPath": url_3, "resultCode": Status.SUCCESS } 30 ]; 31 32 let expected_results = { 33 [url_1]: "success", 34 [url_2]: "success", 35 [url_3]: "success" 36 }; 37 38 await subapps_remove_expect_success_with_result(t, remove_call_params, mocked_response, expected_results); 39 }, 'Remove API call works with several apps.'); 40 41 </script>