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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/service-workers/stub-4.6.3-cache-storage.html

Issue 2415873002: Import w3c tests for the service workers (Closed)
Patch Set: Rebase Created 4 years, 2 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <title>Service Workers: CacheStorage</title>
4 <head>
5 <link rel="help" href="https://w3c.github.io/ServiceWorker/#cache-storag e">
6 <script src="/resources/testharness.js"></script>
7 <script src="/resources/testharnessreport.js"></script>
8
9 <script src=/resources/WebIDLParser.js></script>
10 <script src=/resources/idlharness.js></script>
11
12 </head>
13 <body>
14
15 <script type=text/plain id="idl_0">
16 [Constructor(sequence<any> iterable)]
17 interface CacheStorage {
18 Promise<any> match(ScalarValueString url, optional DOMString cacheName);
19 Promise<Cache> get(DOMString key);
20 Promise<boolean> has(DOMString key);
21 Promise<any> set(DOMString key, Cache val);
22 Promise<any> clear();
23 Promise<any> delete(DOMString key);
24 void forEach(CacheStorageIterationCallback callback, optional object thisArg);
25 Promise<sequence<any>> entries();
26 Promise<sequence<DOMString>> keys();
27 Promise<sequence<Cache>> values();
28 Promise<unsigned long> size();
29 };
30
31 callback CacheStorageIterationCallback = void (Cache value, DOMString key, Cache Storage map);
32 </pre>
33
34 <!--
35 **Note**:[CacheStorage][1]interface is designed to largely conform
36 to[ECMAScript 6 Map objects][2]but entirely async, and with additional
37 convenience methods.
38
39 [1]: #cache-storage-interface
40 [2]: http://goo.gl/gNnDPO
41 -->
42
43
44 <script type=text/plain id="untested_idls">
45 interface ScalarValueString {};
46 interface Cache {};
47 </pre>
48
49 <script>
50 var idl_array = new IdlArray();
51 idl_array.add_untested_idls(document.getElementById("untested_idls").tex tContent);
52 idl_array.add_idls(document.getElementById("idl_0").textContent);
53 idl_array.add_objects({
54 CacheStorage: ["throw new Error ('No object defined for the CacheSto rage interface')"],
55 CacheStorageIterationCallback: ["throw new Error ('No object defined for the CacheStorageIterationCallback callback')"]
56 });
57 idl_array.test();
58 </script>
59
60 </body>
61 </html>
62
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698