Update web-platform-tests to revision 3678c44dfe811f93a796285e9531ee34d7d15682

This commit is contained in:
WPT Sync Bot 2018-02-27 20:17:24 -05:00
parent 6fbf2c1e3c
commit b3ccbe1a35
27 changed files with 808 additions and 100 deletions

View file

@ -17,10 +17,13 @@ callback EventHandlerNonNull = any (Event event);
typedef EventHandlerNonNull? EventHandler;
</script>
<script type=text/plain>
[Constructor(DOMString title, optional NotificationOptions options)]
[Constructor(DOMString title, optional NotificationOptions options),
Exposed=(Window,Worker)]
interface Notification : EventTarget {
static readonly attribute NotificationPermission permission;
static Promise<NotificationPermission> requestPermission(optional NotificationPermissionCallback callback);
[Exposed=Window] static Promise<NotificationPermission> requestPermission(optional NotificationPermissionCallback deprecatedCallback);
static readonly attribute unsigned long maxActions;
attribute EventHandler onclick;
attribute EventHandler onshow;
@ -32,7 +35,17 @@ interface Notification : EventTarget {
readonly attribute DOMString lang;
readonly attribute DOMString body;
readonly attribute DOMString tag;
readonly attribute DOMString icon;
readonly attribute USVString image;
readonly attribute USVString icon;
readonly attribute USVString badge;
readonly attribute USVString sound;
[SameObject] readonly attribute FrozenArray<unsigned long> vibrate;
readonly attribute DOMTimeStamp timestamp;
readonly attribute boolean renotify;
readonly attribute boolean silent;
readonly attribute boolean requireInteraction;
[SameObject] readonly attribute any data;
[SameObject] readonly attribute FrozenArray<NotificationAction> actions;
void close();
};
@ -40,13 +53,19 @@ interface Notification : EventTarget {
dictionary NotificationOptions {
NotificationDirection dir = "auto";
DOMString lang = "";
DOMString body;
DOMString tag;
DOMString icon;
};
dictionary GetNotificationsOptions {
DOMString tag;
DOMString body = "";
DOMString tag = "";
USVString image;
USVString icon;
USVString badge;
USVString sound;
VibratePattern vibrate;
DOMTimeStamp timestamp;
boolean renotify = false;
boolean silent = false;
boolean requireInteraction = false;
any data = null;
sequence<NotificationAction> actions = [];
};
enum NotificationPermission {
@ -55,13 +74,19 @@ enum NotificationPermission {
"granted"
};
callback NotificationPermissionCallback = void (NotificationPermission permission);
enum NotificationDirection {
"auto",
"ltr",
"rtl"
};
dictionary NotificationAction {
required DOMString action;
required DOMString title;
USVString icon;
};
callback NotificationPermissionCallback = void (NotificationPermission permission);
</script>
<script>
"use strict";