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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/notifications/serviceworkerregistration-get-replacement.html

Issue 2223943002: Eagerly delete replaced notifications from the database (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Eagerly delete replaced notifications from the database Created 4 years, 4 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
Index: third_party/WebKit/LayoutTests/http/tests/notifications/serviceworkerregistration-get-replacement.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/notifications/serviceworkerregistration-get-filter.html b/third_party/WebKit/LayoutTests/http/tests/notifications/serviceworkerregistration-get-replacement.html
similarity index 82%
copy from third_party/WebKit/LayoutTests/http/tests/notifications/serviceworkerregistration-get-filter.html
copy to third_party/WebKit/LayoutTests/http/tests/notifications/serviceworkerregistration-get-replacement.html
index 2f17912883b4d11f7698ceccf3d290f412d6fdc9..94ca913b252a134ef63dc00f51ca99654e86bc77 100644
--- a/third_party/WebKit/LayoutTests/http/tests/notifications/serviceworkerregistration-get-filter.html
+++ b/third_party/WebKit/LayoutTests/http/tests/notifications/serviceworkerregistration-get-replacement.html
@@ -1,7 +1,7 @@
<!doctype html>
<html>
<head>
- <title>Notifications: ServiceWorkerRegistration.getNotifications() with a filter.</title>
+ <title>Notifications: ServiceWorkerRegistration.getNotifications() with a notification replacement.</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script src="../serviceworker/resources/test-helpers.js"></script>
@@ -10,8 +10,8 @@
<body>
<script>
// Tests that the getNotifications() function when used in a document returns
- // an array of the notifications which were previously displayed using the
- // same Service Worker registration id, having the same filter.
+ // an array of the notifications which were previously displayed using a filter.
+ // Notifications replaced using the `tag` should not be included anymore.
async_test(function(test) {
var scope = 'resources/scope/' + location.pathname,
script = 'instrumentation-service-worker.js';
@@ -29,10 +29,10 @@
}).then(function() {
return registration.showNotification('Hello again, world!', {
body: 'Second notification',
- tag: 'strawberry',
+ tag: 'banana',
});
}).then(function() {
- return registration.getNotifications({ tag: 'strawberry' });
+ return registration.getNotifications({ tag: 'banana' });
}).then(function(notifications) {
assert_equals(notifications.length, 1);
@@ -42,7 +42,7 @@
test.done();
}).catch(unreached_rejection(test));
- }, 'ServiceWorkerRegistration.getNotifications() returns the opened notifications with the same filter.');
+ }, 'ServiceWorkerRegistration.getNotifications() does not return replaced notifications.');
</script>
</body>
</html>
« no previous file with comments | « content/browser/notifications/platform_notification_context_unittest.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698