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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/fetch/api/response/response-idl.html

Issue 2778753002: Import //fetch from Web Platform Tests. (Closed)
Patch Set: Baselines. 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/external/wpt/fetch/api/response/response-idl.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fetch/api/response/response-idl.html b/third_party/WebKit/LayoutTests/external/wpt/fetch/api/response/response-idl.html
new file mode 100644
index 0000000000000000000000000000000000000000..3bbf54e6f3c15c61b96adce3543afe1c55d4071c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/fetch/api/response/response-idl.html
@@ -0,0 +1,70 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>Response idl interface</title>
+ <meta name="help" href="https://fetch.spec.whatwg.org/#response">
+ <meta name="author" title="Canon Research France" href="https://www.crf.canon.fr">
+ <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>
+ <script id="body-idl" type="text/plain">
+ typedef any JSON;
+ typedef (Blob or BufferSource or FormData or URLSearchParams or USVString) BodyInit;
+
+ [NoInterfaceObject,
+ Exposed=(Window,Worker)]
+ interface Body {
+ readonly attribute ReadableStream? body;
+ readonly attribute boolean bodyUsed;
+ [NewObject] Promise<ArrayBuffer> arrayBuffer();
+ [NewObject] Promise<Blob> blob();
+ [NewObject] Promise<FormData> formData();
+ [NewObject] Promise<JSON> json();
+ [NewObject] Promise<USVString> text();
+ };
+ </script>
+ <script id="response-idl" type="text/plain">
+ [Constructor(optional BodyInit body, optional ResponseInit init),
+ Exposed=(Window,Worker)]
+ interface Response {
+ [NewObject] static Response error();
+ [NewObject] static Response redirect(USVString url, optional unsigned short status = 302);
+
+ readonly attribute ResponseType type;
+
+ readonly attribute USVString url;
+ readonly attribute unsigned short status;
+ readonly attribute boolean ok;
+ readonly attribute ByteString statusText;
+ [SameObject] readonly attribute Headers headers;
+ readonly attribute Promise<Headers> trailer;
+
+ [NewObject] Response clone();
+ };
+ Response implements Body;
+
+ dictionary ResponseInit {
+ unsigned short status = 200;
+ ByteString statusText = "OK";
+ HeadersInit headers;
+ };
+
+ enum ResponseType { "basic", "cors", "default", "error", "opaque", "opaqueredirect" };
+ </script>
+ <script>
+ var idlsArray = new IdlArray();
+ var idl = document.getElementById("body-idl").textContent
+ idl += document.getElementById("response-idl").textContent
+
+ idlsArray.add_idls(idl);
+ idlsArray.add_untested_idls("interface Headers {};");
+ idlsArray.add_untested_idls("interface ReadableStream {};");
+ idlsArray.add_objects({ Response: ['new Response()'] });
+ idlsArray.test();
+ </script>
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698