Bug 79096 - [GTK] fast/mediastream/peerconnection-argument-types.html fails
Summary: [GTK] fast/mediastream/peerconnection-argument-types.html fails
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-21 04:13 PST by Philippe Normand
Modified: 2012-02-22 01:02 PST (History)
3 users (show)

See Also:


Attachments
patch (3.11 KB, patch)
2012-02-21 22:29 PST, Yanbin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Normand 2012-02-21 04:13:57 PST
Since checkin in r108299. Consistently. Diff:

--- /home/slave/webkitgtk/gtk-linux-64-release/build/layout-test-results/fast/mediastream/peerconnection-argument-types-expected.txt 
+++ /home/slave/webkitgtk/gtk-linux-64-release/build/layout-test-results/fast/mediastream/peerconnection-argument-types-actual.txt 
@@ -3,7 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS typeof webkitPeerConnection== 'function' is true
+FAIL typeof webkitPeerConnection== 'function' should be true. Was false.
 PASS new webkitPeerConnection() threw exception TypeError: Not enough arguments.
 PASS new webkitPeerConnection("STUN 203.0.113.2:2478") threw exception TypeError: Not enough arguments.
 PASS new webkitPeerConnection("STUN relay.example.net:3478") threw exception TypeError: Not enough arguments.
@@ -23,8 +23,8 @@
 PASS new webkitPeerConnection("STUNS NONE") threw exception TypeError: Not enough arguments.
 PASS new webkitPeerConnection("undefined") threw exception TypeError: Not enough arguments.
 PASS new webkitPeerConnection("null") threw exception TypeError: Not enough arguments.
-PASS new webkitPeerConnection({})) threw exception SyntaxError: Unexpected token ).
-PASS new webkitPeerConnection(42)) threw exception SyntaxError: Unexpected token ).
+FAIL new webkitPeerConnection({})) should throw SyntaxError: Unexpected token ). Threw exception SyntaxError: Unexpected token ')'.
+FAIL new webkitPeerConnection(42)) should throw SyntaxError: Unexpected token ). Threw exception SyntaxError: Unexpected token ')'.
 PASS new webkitPeerConnection(Infinity) threw exception TypeError: Not enough arguments.
 PASS new webkitPeerConnection(-Infinity) threw exception TypeError: Not enough arguments.
 PASS new webkitPeerConnection(emptyFunction) threw exception TypeError: Not enough arguments.
@@ -45,7 +45,7 @@
 PASS new webkitPeerConnection("STUN NONE",emptyFunction) did not throw exception.
 PASS new webkitPeerConnection("STUNS NONE",emptyFunction) did not throw exception.
 PASS new webkitPeerConnection("TURN NONE",undefined) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
-PASS new webkitPeerConnection("TURNS NONE",{}) did not throw exception.
+FAIL new webkitPeerConnection("TURNS NONE",{}) should not throw exception. Threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17
 PASS new webkitPeerConnection("STUN NONE",42) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
 PASS new webkitPeerConnection("STUNS NONE",Infinity) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
 PASS new webkitPeerConnection("STUNS NONE",-Infinity) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
Comment 1 Philippe Normand 2012-02-21 04:16:39 PST
I haven't checked, but could the current test results be V8-specific?
Comment 2 Yanbin 2012-02-21 19:43:00 PST
Those test cases are defined according to  http://www.w3.org/TR/webrtc/
For failed test cases:   new webkitPeerConnection("TURNS NONE",{})
I looked into this failure and think it is a bug for V8. Test case should fail explicitly by throwing an exception, otherwise the  code should not run correctly in any case. According to the WebIDL spec for “Callback types” (http://dev.w3.org/2006/webapi/WebIDL/#es-callback): If V is not a Function object, then throw a TypeError.

Hi, Adam, Do we need to report a bug entry for this issue for V8 and modify test case?  

And, I am very sorry to make a slight mistake for following two test cases definition:
PASS new webkitPeerConnection({})) threw exception SyntaxError: Unexpected token ).
PASS new webkitPeerConnection(42)) threw exception SyntaxError: Unexpected token ) 
It should be 
PASS new webkitPeerConnection({}) threw exception TypeError: Not enough arguments.
PASS new  webkitPeerConnection(42) threw exception TypeError: Not enough arguments.
I will upload a new patch to fix them.
While, the test result should not failed for original definition. I am not sure why those test cases  were failed.
Philippe, I guess you should look into why test case 
typeof webkitPeerConnection== 'function' is failed.

Thanks
Yanbin
Comment 3 Yanbin 2012-02-21 22:29:45 PST
Created attachment 128131 [details]
patch
Comment 4 Adam Barth 2012-02-21 22:44:05 PST
Comment on attachment 128131 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=128131&action=review

> LayoutTests/ChangeLog:9
> +        [GTK] fast/mediastream/peerconnection-argument-types.html fails
> +        https://bugs.webkit.org/show_bug.cgi?id=79096
> +
> +        Reviewed by NOBODY (OOPS!).
> +
> +        * fast/mediastream/peerconnection-argument-types-expected.txt:
> +        * fast/mediastream/script-tests/argument-types.js:

Can you explain why you're making this change?
Comment 5 Yanbin 2012-02-21 23:05:00 PST
There is a mistake for following two test cases definition:
PASS new webkitPeerConnection({})) threw exception SyntaxError: Unexpected token ).
PASS new webkitPeerConnection(42)) threw exception SyntaxError: Unexpected token ) 
It should be 
PASS new webkitPeerConnection({}) threw exception TypeError: Not enough arguments.
PASS new  webkitPeerConnection(42) threw exception TypeError: Not enough arguments.
This patch is to fix them.
Comment 6 Adam Barth 2012-02-21 23:09:58 PST
Comment on attachment 128131 [details]
patch

Ok.  In general, it's a good idea to explain why you're making a change in the ChangeLog.
Comment 7 Philippe Normand 2012-02-22 00:15:26 PST
You didn't unskip the test either.
Comment 8 WebKit Review Bot 2012-02-22 01:02:47 PST
Comment on attachment 128131 [details]
patch

Clearing flags on attachment: 128131

Committed r108460: <http://trac.webkit.org/changeset/108460>
Comment 9 WebKit Review Bot 2012-02-22 01:02:52 PST
All reviewed patches have been landed.  Closing bug.