Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

second-argument-null.html worker test is incorrect #491

Closed
AFBarstow opened this issue Jan 3, 2014 · 1 comment
Closed

second-argument-null.html worker test is incorrect #491

AFBarstow opened this issue Jan 3, 2014 · 1 comment
Assignees

Comments

@AFBarstow
Copy link
Contributor

This bug was filed as Bugzilla bug 24077. Here is comment #1 but note there are additional comments in the bug:

[[
https://www.w3.org/Bugs/Public/show_bug.cgi?id=24077

The test has:

try {
postMessage(1, null);
} catch(e) {
postMessage(''+e);
}

and asserts that 1 is posted.

But the spec for postMessage is:

void postMessage(any message, optional sequence transfer);

and passing null to the second argument of that should throw, per webidl.

I recommend we do three things:

  1. Add a copy of this test that replaces the first postMessage line with:
 postMessage(1);
  1. Add a copy of this test that replaces the first postMessage line with:
 postMessage(1, undefined);
  1. Modify this test to check that postMessage(1, null) in fact throws.
    Aryeh's submission #1 and Apple's submission #2 would test correct handling of the optional argument when it's not actually passed and Baidu's submission #3 would test correct handling of null here.

]]

@ghost ghost assigned zcorpan Jan 3, 2014
@jgraham
Copy link
Contributor

jgraham commented Jan 3, 2014

@bzbarsky

@zcorpan zcorpan closed this as completed in 5c1923e Nov 5, 2014
Ms2ger added a commit that referenced this issue Nov 5, 2014
worker postMessage(1, null) should throw, undefined should not. Fixes #491; r=Ms2ger
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

4 participants