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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/service-workers/stub-4.4-request-objects.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: Request Objects</title>
4 <head>
5 <link rel="help" href="https://w3c.github.io/ServiceWorker/#request-obje cts">
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(optional RequestInit init)]
17 interface Request {
18 attribute unsigned long timeout;
19 attribute DOMString url;
20 attribute ByteString method;
21 readonly attribute DOMString origin;
22 readonly attribute Mode mode;
23 attribute boolean synchronous;
24 attribute boolean forcePreflight;
25 attribute boolean omitCredentials;
26 readonly attribute DOMString referrer;
27 readonly attribute HeaderMap headers; // alternative: sequence<Header> headers ;
28 attribute any body;
29 };
30
31 dictionary RequestInit {
32 unsigned long timeout = 0;
33 DOMString url;
34 boolean synchronous = false;
35 boolean forcePreflight = false;
36 boolean omitCredentials = false;
37 ByteString method = "GET";
38 HeaderMap headers;
39 any body;
40 };
41
42 enum Mode {
43 "same origin",
44 "tainted cross-origin",
45 "CORS",
46 "CORS-with-forced-preflight"
47 };
48
49 [MapClass(DOMString, DOMString)]
50 interface HeaderMap {
51 };
52 </pre>
53
54
55
56
57 <script>
58 var idl_array = new IdlArray();
59 idl_array.add_untested_idls(document.getElementById("untested_idls").tex tContent);
60 idl_array.add_idls(document.getElementById("idl_0").textContent);
61 idl_array.add_objects({
62 Request: ["throw new Error ('No object defined for the Request inter face')"],
63 RequestInit: ["throw new Error ('No object defined for the RequestIn it dictionary')"],
64 Mode: ["throw new Error ('No object defined for the Mode enum')"],
65 HeaderMap: ["throw new Error ('No object defined for the HeaderMap i nterface')"]
66 });
67 idl_array.test();
68 </script>
69
70 </body>
71 </html>
72
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698