| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <meta charset="utf-8"> | 2 <meta charset="utf-8"> |
| 3 <title>Background Fetch API: BackgroundFetchRegistration.abort() tests</title> | 3 <title>Background Fetch API: BackgroundFetchRegistration.abort() tests</title> |
| 4 <script src="/resources/testharness.js"></script> | 4 <script src="/resources/testharness.js"></script> |
| 5 <script src="/resources/testharnessreport.js"></script> | 5 <script src="/resources/testharnessreport.js"></script> |
| 6 <script src="/serviceworker/resources/test-helpers.js"></script> | 6 <script src="/serviceworker/resources/test-helpers.js"></script> |
| 7 | 7 |
| 8 <h1>BackgroundFetchRegistration.abort()</h1> | 8 <h1>BackgroundFetchRegistration.abort()</h1> |
| 9 <p>This test validates the behaviour of the abort() method.</p> | 9 <p>This test validates the behaviour of the abort() method.</p> |
| 10 | 10 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 return backgroundFetchRegistration.abort(); | 38 return backgroundFetchRegistration.abort(); |
| 39 }) | 39 }) |
| 40 .then(success => { | 40 .then(success => { |
| 41 // The registration was valid, so aborting it should be successful. | 41 // The registration was valid, so aborting it should be successful. |
| 42 assert_true(success); | 42 assert_true(success); |
| 43 | 43 |
| 44 return backgroundFetchRegistration.abort(); | 44 return backgroundFetchRegistration.abort(); |
| 45 }) | 45 }) |
| 46 .then(success => { | 46 .then(success => { |
| 47 // The registration had already been aborted, so aborting it again should
fail. | 47 // The registration had already been aborted, so aborting it again should
fail. |
| 48 // TODO(peter): This is a change-detector test, and will deliberately | 48 assert_false(success); |
| 49 // start failing when the browser side has been hooked up. | |
| 50 assert_true(success); | |
| 51 }); | 49 }); |
| 52 | 50 |
| 53 }, 'BackgroundFetchRegistration.abort() return a Promise indicating success.'); | 51 }, 'BackgroundFetchRegistration.abort() return a Promise indicating success.'); |
| 54 </script> | 52 </script> |
| OLD | NEW |