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

Unified Diff: LayoutTests/http/tests/notifications/serviceworker-notificationclick-event-reflection.html

Issue 1321643002: Fix notifications tests' use of assert_object_equals (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address review comments Created 5 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
« no previous file with comments | « LayoutTests/http/tests/notifications/serviceworker-notificationclick-event-data-reflection.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/notifications/serviceworker-notificationclick-event-reflection.html
diff --git a/LayoutTests/http/tests/notifications/serviceworker-notificationclick-event-reflection.html b/LayoutTests/http/tests/notifications/serviceworker-notificationclick-event-reflection.html
index 2775be75cbdb7223fee60552074ea8ea70375d27..f44a63809992b766294359e115c8668f954c0f52 100644
--- a/LayoutTests/http/tests/notifications/serviceworker-notificationclick-event-reflection.html
+++ b/LayoutTests/http/tests/notifications/serviceworker-notificationclick-event-reflection.html
@@ -68,11 +68,12 @@
// set on the Notification object are as expected.
assert_equals(event.data.command, 'click', 'The notification was expected to be clicked.');
+ options.actions = options.actions.slice(0, Notification.maxActions);
Object.keys(options).forEach(function(key) {
- if (key == 'actions')
- assert_object_equals(event.data.notification.actions, options.actions.slice(0, Notification.maxActions));
- else
+ if (typeof options[key] == 'object')
assert_object_equals(event.data.notification[key], options[key], 'The ' + key + ' field must be the same.');
+ else
+ assert_equals(event.data.notification[key], options[key], 'The ' + key + ' field must be the same.');
});
test.done();
« no previous file with comments | « LayoutTests/http/tests/notifications/serviceworker-notificationclick-event-data-reflection.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698