mirror of
https://github.com/servo/servo.git
synced 2025-08-28 08:38:20 +01:00
Update web-platform-tests to revision 12d3e15e5ecae695e1216c358d613705fbff6b68
This commit is contained in:
parent
78455ec033
commit
5b2ca4d132
424 changed files with 4377 additions and 8656 deletions
|
@ -1,27 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>Web Notifications Test: notification - onerror (basic)</title>
|
||||
<title>Notification.onerror (permission=default)</title>
|
||||
<link rel="author" title="Apple Inc." href="http://www.apple.com/">
|
||||
<link rel="help" title="5 API" href="http://www.w3.org/TR/notifications/">
|
||||
<meta name="flags" content="">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
if (Notification.permission != "default") {
|
||||
document.getElementById("log").innerHTML = "Please clear your notification settings for web-platform.test and retry.";
|
||||
} else {
|
||||
t = async_test("the notification.onerror event can be invoked", {timeout: 50000});
|
||||
var notification = new Notification("New Email Received", {
|
||||
body: "Room 101"
|
||||
});
|
||||
notification.onerror = t.step_func(function(e) {
|
||||
assert_equals(Object.prototype.toString.call(e), "[object Event]", "the type of event");
|
||||
assert_equals(e.type, "error", "The event is the expected type.")
|
||||
t.done();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
<script>
|
||||
setup({ explicit_timeout: true })
|
||||
if (Notification.permission != "default") {
|
||||
alert("TEST NOT RUN. Change your browser settings so that the notification"
|
||||
+ " settings for this origin are completely cleared/removed, (so your"
|
||||
+ " browser default settings are used for this origin), and then reload"
|
||||
+ " this page.")
|
||||
} else {
|
||||
async_test(function (t) {
|
||||
t.step(function () {
|
||||
var notification = new Notification("New Email Received")
|
||||
notification.onerror = function(e) {
|
||||
assert_equals(Object.prototype.toString.call(e), "[object Event]")
|
||||
assert_equals(e.type, "error")
|
||||
Notification.requestPermission()
|
||||
t.done()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue