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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/background-fetch/idl-tests.html

Issue 2736943002: Exposing new BackgroundFetchManager on SWReg
Patch Set: Created 3 years, 9 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/LayoutTests/external/wpt/background-fetch/idl-tests-expected.txt » ('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 <html> 2 <html>
3 <head> 3 <head>
4 <meta charset="utf-8"> 4 <meta charset="utf-8">
5 <title>Background Fetch IDL tests</title> 5 <title>Background Fetch IDL tests</title>
6 <script src=/resources/testharness.js></script> 6 <script src=/resources/testharness.js></script>
7 <script src=/resources/testharnessreport.js></script> 7 <script src=/resources/testharnessreport.js></script>
8 <script src=/resources/WebIDLParser.js></script> 8 <script src=/resources/WebIDLParser.js></script>
9 <script src=/resources/idlharness.js></script> 9 <script src=/resources/idlharness.js></script>
10 </head> 10 </head>
11 <body> 11 <body>
12 <!-- Setup --> 12 <!-- Setup -->
13 <script type=text/plain id='untested_idl'> 13 <script type=text/plain id='untested_idl'>
14 interface ServiceWorkerGlobalScope {
15 };
16 interface ServiceWorkerRegistration { 14 interface ServiceWorkerRegistration {
17 }; 15 };
18 </script> 16 </script>
19 <script type=text/plain id='idl_for_testing'> 17 <script type=text/plain id='idl_for_testing'>
20 partial interface ServiceWorkerGlobalScope {
21 attribute EventHandler onbackgroundfetched;
22 attribute EventHandler onbackgroundfetchfail;
23 attribute EventHandler onbackgroundfetchabort;
24 attribute EventHandler onbackgroundfetchclick;
25 };
26
27 partial interface ServiceWorkerRegistration { 18 partial interface ServiceWorkerRegistration {
28 readonly attribute BackgroundFetchManager backgroundFetch; 19 readonly attribute BackgroundFetchManager backgroundFetch;
29 }; 20 };
30 21
31 [Exposed=(Window,Worker)] 22 [Exposed=(Window,Worker)]
32 interface BackgroundFetchManager { 23 interface BackgroundFetchManager {
33 Promise<BackgroundFetchRegistration> fetch(DOMString tag, 24 // TODO(awdf) Should be a method returning a promise.
34 (RequestInfo or sequence<RequestInfo>) requests, 25 readonly attribute DOMString tag;
35 optional BackgroundFetchOptions options);
36 Promise<BackgroundFetchRegistration?> get(DOMString tag);
37 Promise<sequence<DOMString>> getTags();
38 }; 26 };
39
40 dictionary IconDefinition {
41 DOMString src;
42 DOMString sizes;
43 DOMString type;
44 };
45
46 dictionary BackgroundFetchOptions {
47 sequence<IconDefinition> icons;
48 DOMString title;
49 long totalDownloadSize;
50 };
51
52 [Exposed=(Window,Worker)]
53 interface BackgroundFetchActiveFetches : BackgroundFetchFetches {
54 readonly attribute Promise<Response> responseReady;
55 };
56
57 [Exposed=(Window,Worker)]
58 interface BackgroundFetchRegistration {
59 readonly attribute DOMString tag;
60 readonly attribute FrozenArray<IconDefinition> icons;
61 readonly attribute long totalDownloadSize;
62 readonly attribute DOMString title;
63 readonly attribute FrozenArray<BackgroundFetchActiveFetches> fetches;
64
65 void abort();
66 };
67
68 [Exposed=(Window,Worker)]
69 interface BackgroundFetchFetches {
70 readonly attribute Request request;
71 };
72
73 </script> 27 </script>
74 28
75 <!-- Tests --> 29 <!-- Tests -->
76 <script> 30 <script>
77 var idl_array = new IdlArray(); 31 var idl_array = new IdlArray();
78 idl_array.add_untested_idls( 32 idl_array.add_untested_idls(
79 document.getElementById('untested_idl').textContent); 33 document.getElementById('untested_idl').textContent);
80 idl_array.add_idls( 34 idl_array.add_idls(
81 document.getElementById('idl_for_testing').textContent); 35 document.getElementById('idl_for_testing').textContent);
82 idl_array.test(); 36 idl_array.test();
83 37
84 </script> 38 </script>
85 </body> 39 </body>
86 </html> 40 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/external/wpt/background-fetch/idl-tests-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698