| <!DOCTYPE html> |
| <meta charset="utf-8"> |
| <!-- Generate token with the command: |
| generate_token.py http://127.0.0.1:8000 BackgroundFetch --expire-timestamp=2000000000 |
| --> |
| |
| <meta http-equiv="origin-trial" content="AtDl/AukAuUX0Sw7KRz+mrV2vpSYrfDyVS4vdO3I1clqoNgKGqCX5Np5KIhlC6oQl8XcULXJz5bc9Y4CcYj9xA4AAABXeyJvcmlnaW4iOiAiaHR0cDovLzEyNy4wLjAuMTo4MDAwIiwgImZlYXR1cmUiOiAiQmFja2dyb3VuZEZldGNoIiwgImV4cGlyeSI6IDIwMDAwMDAwMDB9" /> |
| <title>Background Fetch API - interfaces exposed by origin trial</title> |
| <script src="/resources/testharness.js"></script> |
| <script src="/resources/testharnessreport.js"></script> |
| <script src="/resources/origin-trials-helper.js"></script> |
| <script src="/serviceworker/resources/test-helpers.js"></script> |
| <script> |
| |
| test(t => { |
| OriginTrialsHelper.check_properties(this, { |
| 'BackgroundFetchManager': ['fetch', 'get', 'getIds'], |
| 'BackgroundFetchUpdateUIEvent': ['updateUI'], |
| 'BackgroundFetchRegistration': ['id', 'uploadTotal', 'uploaded', |
| 'downloadTotal', 'downloaded', 'result', |
| 'failureReason', 'recordsAvailable', |
| 'onprogress', 'match', 'matchAll'], |
| 'ServiceWorkerRegistration': ['backgroundFetch'], |
| }); |
| }, 'Background Fetch API interfaces and properties in Origin-Trial enabled document.'); |
| |
| fetch_tests_from_worker(new Worker('resources/backgroundfetch-origin-trial-interfaces-worker.js')); |
| |
| // Only run "disabled" tests if the feature is not enabled via runtime flags. |
| if (!self.internals.runtimeFlags.backgroundFetchEnabled) { |
| service_worker_test('resources/backgroundfetch-origin-trial-interfaces-serviceworker-disabled.js'); |
| } |
| |
| service_worker_test('resources/backgroundfetch-origin-trial-interfaces-serviceworker-enabled.php'); |
| |
| </script> |