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

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

Issue 2701203004: Background Fetch: Added an idlharness web platform test - WIP
Patch Set: [Background Fetch: Added an idlharness web platform test 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
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/external/wpt/background-fetch/idl-tests.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/background-fetch/idl-tests.html b/third_party/WebKit/LayoutTests/external/wpt/background-fetch/idl-tests.html
new file mode 100644
index 0000000000000000000000000000000000000000..985d0c5be87b64757ce04a6bcfd777ba79ba10dc
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/background-fetch/idl-tests.html
@@ -0,0 +1,86 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>Background Fetch IDL tests</title>
+ <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>
+ <!-- Setup -->
+ <script type=text/plain id='untested_idl'>
+ interface ServiceWorkerGlobalScope {
+ };
+ interface ServiceWorkerRegistration {
+ };
+ </script>
+ <script type=text/plain id='idl_for_testing'>
+ partial interface ServiceWorkerGlobalScope {
+ attribute EventHandler onbackgroundfetched;
+ attribute EventHandler onbackgroundfetchfail;
+ attribute EventHandler onbackgroundfetchabort;
+ attribute EventHandler onbackgroundfetchclick;
+ };
+
+ partial interface ServiceWorkerRegistration {
+ readonly attribute BackgroundFetchManager backgroundFetch;
+ };
+
+ [Exposed=(Window,Worker)]
+ interface BackgroundFetchManager {
+ Promise<BackgroundFetchRegistration> fetch(DOMString tag,
+ (RequestInfo or sequence<RequestInfo>) requests,
+ optional BackgroundFetchOptions options);
+ Promise<BackgroundFetchRegistration?> get(DOMString tag);
+ Promise<sequence<DOMString>> getTags();
+ };
+
+ dictionary IconDefinition {
+ DOMString src;
+ DOMString sizes;
+ DOMString type;
+ };
+
+ dictionary BackgroundFetchOptions {
+ sequence<IconDefinition> icons;
+ DOMString title;
+ long totalDownloadSize;
+ };
+
+ [Exposed=(Window,Worker)]
+ interface BackgroundFetchActiveFetches : BackgroundFetchFetches {
+ readonly attribute Promise<Response> responseReady;
+ };
+
+ [Exposed=(Window,Worker)]
+ interface BackgroundFetchRegistration {
+ readonly attribute DOMString tag;
+ readonly attribute FrozenArray<IconDefinition> icons;
+ readonly attribute long totalDownloadSize;
+ readonly attribute DOMString title;
+ readonly attribute FrozenArray<BackgroundFetchActiveFetches> fetches;
+
+ void abort();
+ };
+
+ [Exposed=(Window,Worker)]
+ interface BackgroundFetchFetches {
+ readonly attribute Request request;
+ };
+
+ </script>
+
+ <!-- Tests -->
+ <script>
+ var idl_array = new IdlArray();
+ idl_array.add_untested_idls(
+ document.getElementById('untested_idl').textContent);
+ idl_array.add_idls(
+ document.getElementById('idl_for_testing').textContent);
+ idl_array.test();
+
+ </script>
+ </body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698