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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/service-workers/stub-4.6.2-cache.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: Cache</title>
4 <head>
5 <link rel="help" href="https://w3c.github.io/ServiceWorker/#cache">
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 [Exposed=(Window,Worker)]
17 interface Cache {
18 Promise<Response> match(RequestInfo request, optional CacheQueryOptions option s);
19 Promise<sequence<Response>> matchAll(optional RequestInfo request, optional Ca cheQueryOptions options);
20 Promise<void> add(RequestInfo request);
21 Promise<void> addAll(sequence<RequestInfo> requests);
22 Promise<void> put(RequestInfo request, Response response);
23 Promise<boolean> delete(RequestInfo request, optional CacheQueryOptions option s);
24 Promise<sequence<Request>> keys(optional RequestInfo request, optional CacheQu eryOptions options);
25 };
26
27 dictionary CacheQueryOptions {
28 boolean ignoreSearch = false;
29 boolean ignoreMethod = false;
30 boolean ignoreVary = false;
31 DOMString cacheName;
32 };
33
34 dictionary CacheBatchOperation {
35 DOMString type;
36 Request request;
37 Response response;
38 CacheQueryOptions options;
39 };
40 </pre>
41
42
43
44 <script type=text/plain id="untested_idls">
45 interface AbstractResponse {};
46 interface Request {};
47 interface ScalarValueString {};
48 </pre>
49
50 <script>
51 var idl_array = new IdlArray();
52 idl_array.add_untested_idls(document.getElementById("untested_idls").tex tContent);
53 idl_array.add_idls(document.getElementById("idl_0").textContent);
54 idl_array.add_objects({
55 Cache: ["throw new Error ('No object defined for the Cache interface ')"],
56 QueryParams: ["throw new Error ('No object defined for the QueryPara ms dictionary')"],
57 CacheIterationCallback: ["throw new Error ('No object defined for th e CacheIterationCallback callback')"]
58 });
59 idl_array.test();
60 </script>
61
62 </body>
63 </html>
64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698