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

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

Issue 1311413006: - Changed instrumentation-service-worker.js so the value NaN can be tested (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 9957b5f06c5e1940aef643c9b95ab542d74a2428..5b67070e889e68fde3b96d16b26d63f957349493 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,9 @@
var notificationDataList = new Array(
true, // Check Boolean type
1024, // Check Number type
+ Number.NaN, // Check Number.NaN type
'any data', // Check String type
+ null, // Check null
new Array('Saab', 'Volvo', 'BMW'), // Check Array type
{ first: 'first', second: 'second' } // Check object
);
@@ -63,7 +65,7 @@
var pos = event.data.notification.tag;
- if (typeof notificationDataList[pos] === 'object')
+ if (typeof notificationDataList[pos] === 'object' && notificationDataList[pos] !== null)
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.');

Powered by Google App Engine
This is Rietveld 408576698