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

Unified Diff: LayoutTests/http/tests/notifications/serviceworker-notificationclick-event-data-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
Index: LayoutTests/http/tests/notifications/serviceworker-notificationclick-event-data-reflection.html
diff --git a/LayoutTests/http/tests/notifications/serviceworker-notificationclick-event-data-reflection.html b/LayoutTests/http/tests/notifications/serviceworker-notificationclick-event-data-reflection.html
index 62930642d99d97c36d95ad64a3cc1950f3d50c04..9957b5f06c5e1940aef643c9b95ab542d74a2428 100644
--- a/LayoutTests/http/tests/notifications/serviceworker-notificationclick-event-data-reflection.html
+++ b/LayoutTests/http/tests/notifications/serviceworker-notificationclick-event-data-reflection.html
@@ -21,7 +21,6 @@
var notificationDataList = new Array(
true, // Check Boolean type
1024, // Check Number type
- Number.NaN, // Check Number.NaN type
'any data', // Check String type
new Array('Saab', 'Volvo', 'BMW'), // Check Array type
{ first: 'first', second: 'second' } // Check object
@@ -64,10 +63,13 @@
var pos = event.data.notification.tag;
- assert_object_equals(event.data.notification.data, notificationDataList[pos], 'The data field must be the same.');
+ if (typeof notificationDataList[pos] === 'object')
+ assert_object_equals(event.data.notification.data, notificationDataList[pos], 'The data field must be the same.');
+ else
+ assert_equals(event.data.notification.data, notificationDataList[pos], 'The data field must be the same.');
- if (pos < notificationDataList.length)
- assertNotificationDataReflects(++pos);
+ if (++pos < notificationDataList.length)
+ assertNotificationDataReflects(pos);
else
test.done();
});

Powered by Google App Engine
This is Rietveld 408576698