Files
tubestation/testing/web-platform/tests/notifications/body-basic-manual.https.html
Dominick Ng d14854f8fe Bug 1739292 [wpt PR 31495] - Require Notifications be used in secure contexts, a=testonly
Automatic update from web-platform-tests
Restrict notifications to secure contexts.

This change migrates the notifications tests to use HTTPS. It also adds
new tests to ensure that permission cannot be requested from insecure
contexts.

--
Delete iframe test.

It's less clear that this is related to requiring a secure context
for notifications.

--
Simplify tests that match browsers today.

--
Add in rewritten constructor test

--

wpt-commits: b260fa988476799c97d3f3038ab7a18ae1e4a67c, 195cb6c52dc12c51d0d48dd17b978e1d6bf5afa0, f26159590c50a8dd8f5d0bf4c97dc9e3ec645673, daf2f7a44f2fddd832814b30626f338493cdd776
wpt-pr: 31495
2021-11-09 12:15:55 +00:00

29 lines
981 B
HTML

<!DOCTYPE html>
<meta charset="utf-8">
<title>Notification.body (basic)</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<link rel="author" title="Xin Liu" href="mailto:xinx.liu@intel.com">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="common.js"></script>
<div id=passfail></div>
<script>
setup({ explicit_timeout: true })
if (hasNotificationPermission()) {
async_test(function (t) {
t.step(function () {
var notification = null,
notifications = [],
text = "This is the body content: Room 101"
createPassFail("If a notification appears containing the text"
+ " \"" + text + "\"",
t, closeNotifications, notifications)
notification = new Notification("", {
body: text
})
notifications.push(notification)
})
})
}
</script>