Status: Unconfirmed
Owner: ----
Labels: Type-Bug Pri-2 OS-All Area-Misc

New issue 25147 by domin...@google.com: MessageEvent.initMessageEvent's  
data property isn't consistent with Safari or Firefox when null or undefined
http://code.google.com/p/chromium/issues/detail?id=25147

Chrome Version       : 4.0.223.2 (Developer Build ) r29372
Other browsers tested:
WebKit nightly r49739: OK
Firefox 3.5.4: OK

Run LayoutTests/fast/events/init-events.html and look at this line:

testInitEvent('Message', '"a", false, false, null, "c", "d", window,  
null').data is
null


What is the expected result?

PASS. data is null.


What happens instead?

FAIL. data is the string "null".


Additional info:

Chrome's handling of this property used (4.0.222.5 (Official Build 28804))
to be consistent with Safari's. Now it's not consistent with either Safari  
or
Firefox. I suspect that the behavior changed with the integration of WebKit
r49219.

Here's how other browsers break down. null and undefined are handled
differently in different browsers.

WebKit nightly, null: data is null
WebKit nightly, undefined: 'data' in event, but data is undefined
FF 3.5.4, null: data is null
FF 3.5.4, undefined: data is string "undefined"
Chromium r29372, null: data is string "null"
Chromium r29372, undefined: data is string "undefined"

Note that the WebKit nightly r49739 and Firefox 3.5.4 handle undefined
differently--the WebKit MessageEvent's data property is undefined;
Firefox's is the string "undefined". (Chromium r29372 produces the string
"undefined" like Firefox.)

Note that init-events.html doesn't test the data argument being undefined.

Question 1: Does the test need to be changed (and Safari fixed) or should
Chrome's behavior around null revert?

Question 2: Should the behavior of undefined be tested? (Presumably
Chromium should line up with Safari? I can't make any sense of the worker
spec.)

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---

Reply via email to