Chromium Code Reviews| 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..5d8fe3673e691952354594469751b220129801f9 100644 |
| --- a/LayoutTests/http/tests/notifications/serviceworker-notificationclick-event-data-reflection.html |
| +++ b/LayoutTests/http/tests/notifications/serviceworker-notificationclick-event-data-reflection.html |
| @@ -64,10 +64,16 @@ |
| var pos = event.data.notification.tag; |
| - assert_object_equals(event.data.notification.data, notificationDataList[pos], 'The data field must be the same.'); |
| + if (Number.isNaN(notificationDataList[pos])) { |
| + // TODO(peter): NaN should round trip to NaN rather than null. |
|
Peter Beverloo
2015/08/27 14:17:11
Let's remove this clause and the NaN value test. W
johnme
2015/08/27 14:42:14
Done - filed https://crbug.com/525652.
|
| + assert_equals(event.data.notification.data, null); |
| + } else 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) |
|
Peter Beverloo
2015/08/27 14:17:11
Why this change? I find this less readable.
johnme
2015/08/27 14:42:14
Because it fixes pos going out of bounds! [which w
|
| + assertNotificationDataReflects(pos); |
| else |
| test.done(); |
| }); |