Update web-platform-tests to revision 12d3e15e5ecae695e1216c358d613705fbff6b68

This commit is contained in:
Ms2ger 2015-07-27 13:50:32 +02:00
parent 78455ec033
commit 5b2ca4d132
424 changed files with 4377 additions and 8656 deletions

View file

@ -1,28 +1,25 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Web Notifications Test: notification - onclick (basic)</title>
<title>Notification.onclick (basic)</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>
var t = async_test("the notification.onclick event can be invoked", {timeout: 50000});
Notification.requestPermission(t.step_func(function(permission) {
assert_equals(permission, "granted", "notification permission");
var notification = new Notification("Please click on the notification.", {
body: "Click me to test clicking on notifications."
});
notification.onclick = t.step_func(function(e) {
assert_equals(Object.prototype.toString.call(e), "[object Event]", "the type of event");
assert_equals(e.type, "click", "The event is the expected type.")
t.done();
});
}));
</script>
</body>
<script src="common.js"></script>
<script>
setup({ explicit_timeout: true })
if (hasNotificationPermission()) {
async_test(function (t) {
t.step(function () {
var notification =
new Notification("Please click on the notification.", {
body: "Click me to test clicking on notifications."
})
notification.onclick = function(e) {
assert_equals(Object.prototype.toString.call(e), "[object Event]")
assert_equals(e.type, "click")
t.done()
}
})
})
}
</script>