| Index: third_party/WebKit/LayoutTests/external/wpt/background-fetch/idl-tests.html
|
| diff --git a/third_party/WebKit/LayoutTests/external/wpt/background-fetch/idl-tests.html b/third_party/WebKit/LayoutTests/external/wpt/background-fetch/idl-tests.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..985d0c5be87b64757ce04a6bcfd777ba79ba10dc
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/external/wpt/background-fetch/idl-tests.html
|
| @@ -0,0 +1,86 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| + <head>
|
| + <meta charset="utf-8">
|
| + <title>Background Fetch IDL tests</title>
|
| + <script src=/resources/testharness.js></script>
|
| + <script src=/resources/testharnessreport.js></script>
|
| + <script src=/resources/WebIDLParser.js></script>
|
| + <script src=/resources/idlharness.js></script>
|
| + </head>
|
| + <body>
|
| + <!-- Setup -->
|
| + <script type=text/plain id='untested_idl'>
|
| + interface ServiceWorkerGlobalScope {
|
| + };
|
| + interface ServiceWorkerRegistration {
|
| + };
|
| + </script>
|
| + <script type=text/plain id='idl_for_testing'>
|
| + partial interface ServiceWorkerGlobalScope {
|
| + attribute EventHandler onbackgroundfetched;
|
| + attribute EventHandler onbackgroundfetchfail;
|
| + attribute EventHandler onbackgroundfetchabort;
|
| + attribute EventHandler onbackgroundfetchclick;
|
| + };
|
| +
|
| + partial interface ServiceWorkerRegistration {
|
| + readonly attribute BackgroundFetchManager backgroundFetch;
|
| + };
|
| +
|
| + [Exposed=(Window,Worker)]
|
| + interface BackgroundFetchManager {
|
| + Promise<BackgroundFetchRegistration> fetch(DOMString tag,
|
| + (RequestInfo or sequence<RequestInfo>) requests,
|
| + optional BackgroundFetchOptions options);
|
| + Promise<BackgroundFetchRegistration?> get(DOMString tag);
|
| + Promise<sequence<DOMString>> getTags();
|
| + };
|
| +
|
| + dictionary IconDefinition {
|
| + DOMString src;
|
| + DOMString sizes;
|
| + DOMString type;
|
| + };
|
| +
|
| + dictionary BackgroundFetchOptions {
|
| + sequence<IconDefinition> icons;
|
| + DOMString title;
|
| + long totalDownloadSize;
|
| + };
|
| +
|
| + [Exposed=(Window,Worker)]
|
| + interface BackgroundFetchActiveFetches : BackgroundFetchFetches {
|
| + readonly attribute Promise<Response> responseReady;
|
| + };
|
| +
|
| + [Exposed=(Window,Worker)]
|
| + interface BackgroundFetchRegistration {
|
| + readonly attribute DOMString tag;
|
| + readonly attribute FrozenArray<IconDefinition> icons;
|
| + readonly attribute long totalDownloadSize;
|
| + readonly attribute DOMString title;
|
| + readonly attribute FrozenArray<BackgroundFetchActiveFetches> fetches;
|
| +
|
| + void abort();
|
| + };
|
| +
|
| + [Exposed=(Window,Worker)]
|
| + interface BackgroundFetchFetches {
|
| + readonly attribute Request request;
|
| + };
|
| +
|
| + </script>
|
| +
|
| + <!-- Tests -->
|
| + <script>
|
| + var idl_array = new IdlArray();
|
| + idl_array.add_untested_idls(
|
| + document.getElementById('untested_idl').textContent);
|
| + idl_array.add_idls(
|
| + document.getElementById('idl_for_testing').textContent);
|
| + idl_array.test();
|
| +
|
| + </script>
|
| + </body>
|
| +</html>
|
|
|