Diff
Modified: trunk/LayoutTests/ChangeLog (164940 => 164941)
--- trunk/LayoutTests/ChangeLog 2014-03-02 14:59:47 UTC (rev 164940)
+++ trunk/LayoutTests/ChangeLog 2014-03-02 15:36:53 UTC (rev 164941)
@@ -1,3 +1,25 @@
+2014-03-02 Thiago de Barros Lacerda <[email protected]>
+
+ Updating some WebRTC and MediaStream LayoutTests
+ https://bugs.webkit.org/show_bug.cgi?id=129442
+
+ Reviewed by Eric Carlson.
+
+ Due to changes in _javascript_Core (in r163562), some LayoutTests in fast/mediastream needed to be updated:
+ - MediaStreamTrack.html: checking hasOwnProperty in __proto__ as well, until CustomGetter properties are
+ moved to the prototype chain.
+ - RTCIceCandidate.html and RTCSessionDescription.html: JSON.stringify are not considering properties in
+ __proto__, so remove this for now.
+
+ * fast/mediastream/MediaStreamTrack-expected.txt:
+ * fast/mediastream/MediaStreamTrack.html:
+ * fast/mediastream/RTCIceCandidate-expected.txt:
+ * fast/mediastream/RTCIceCandidate.html:
+ * fast/mediastream/RTCPeerConnection-have-local-answer.html: Removed. Other tests already test what this one was
+ testing
+ * fast/mediastream/RTCSessionDescription-expected.txt:
+ * fast/mediastream/RTCSessionDescription.html:
+
2014-03-01 Commit Queue <[email protected]>
Unreviewed, rolling out r164929 and r164934.
Modified: trunk/LayoutTests/fast/mediastream/MediaStreamTrack-expected.txt (164940 => 164941)
--- trunk/LayoutTests/fast/mediastream/MediaStreamTrack-expected.txt 2014-03-02 14:59:47 UTC (rev 164940)
+++ trunk/LayoutTests/fast/mediastream/MediaStreamTrack-expected.txt 2014-03-02 15:36:53 UTC (rev 164941)
@@ -37,12 +37,12 @@
PASS states.sourceType is "camera"
states.volume = undefined
states.width = 1920
- states.sourceId = 239c24b0-2b15-11e3-8224-0800200c9a66
+ states.aspectRatio = 1.78
states.height = 1080
- states.sourceType = camera
states.facingMode = user
states.frameRate = 30
- states.aspectRatio = 1.78
+ states.sourceType = camera
+ states.sourceId = 239c24b0-2b15-11e3-8224-0800200c9a66
audioTrack = mediaStream.getAudioTracks()[0]
PASS track.readyState is "live"
@@ -58,12 +58,12 @@
PASS states.sourceType is "microphone"
states.volume = 50
states.width = undefined
- states.sourceId = 239c24b1-2b15-11e3-8224-0800200c9a66
+ states.aspectRatio = undefined
states.height = undefined
- states.sourceType = microphone
states.facingMode = undefined
states.frameRate = undefined
- states.aspectRatio = undefined
+ states.sourceType = microphone
+ states.sourceId = 239c24b1-2b15-11e3-8224-0800200c9a66
videoTrack2 = videoTrack.clone()
PASS track.readyState is "live"
@@ -97,12 +97,12 @@
PASS states.sourceType is "camera"
states.volume = undefined
states.width = 1920
- states.sourceId = 239c24b0-2b15-11e3-8224-0800200c9a66
+ states.aspectRatio = 1.78
states.height = 1080
- states.sourceType = camera
states.facingMode = user
states.frameRate = 30
- states.aspectRatio = 1.78
+ states.sourceType = camera
+ states.sourceId = 239c24b0-2b15-11e3-8224-0800200c9a66
PASS videoTrack.id is not videoTrack2.id
PASS videoTrack.kind is videoTrack2.kind
PASS videoTrack.label is videoTrack2.label
Modified: trunk/LayoutTests/fast/mediastream/MediaStreamTrack.html (164940 => 164941)
--- trunk/LayoutTests/fast/mediastream/MediaStreamTrack.html 2014-03-02 14:59:47 UTC (rev 164940)
+++ trunk/LayoutTests/fast/mediastream/MediaStreamTrack.html 2014-03-02 15:36:53 UTC (rev 164941)
@@ -108,7 +108,10 @@
else
shouldBeEqualToString('states.sourceType', 'microphone');
for (var property in states) {
- if (states.hasOwnProperty(property))
+ // When https://webkit.org/b/129375 is fixed, we have to remove
+ // states.hasOwnProperty(property), because all the attributes
+ // will be in the prototype chain.
+ if (states.hasOwnProperty(property) || states.__proto__.hasOwnProperty(property))
debug(" states." + property + " = " + limitPrecision(states[property], 2));
}
}
Modified: trunk/LayoutTests/fast/mediastream/RTCIceCandidate-expected.txt (164940 => 164941)
--- trunk/LayoutTests/fast/mediastream/RTCIceCandidate-expected.txt 2014-03-02 14:59:47 UTC (rev 164940)
+++ trunk/LayoutTests/fast/mediastream/RTCIceCandidate-expected.txt 2014-03-02 15:36:53 UTC (rev 164941)
@@ -7,11 +7,6 @@
PASS candidate.candidate is "foo"
PASS candidate.sdpMid is "bar"
PASS candidate.sdpMLineIndex is 6
-PASS initializer = JSON.parse(JSON.stringify(candidate)); did not throw exception.
-PASS candidate = new RTCIceCandidate(initializer); did not throw exception.
-PASS candidate.candidate is "foo"
-PASS candidate.sdpMid is "bar"
-PASS candidate.sdpMLineIndex is 6
PASS new RTCIceCandidate({}); did not throw exception.
PASS new RTCIceCandidate({candidate:"foo"}); did not throw exception.
PASS new RTCIceCandidate({sdpMid:"bar"}); did not throw exception.
Modified: trunk/LayoutTests/fast/mediastream/RTCIceCandidate.html (164940 => 164941)
--- trunk/LayoutTests/fast/mediastream/RTCIceCandidate.html 2014-03-02 14:59:47 UTC (rev 164940)
+++ trunk/LayoutTests/fast/mediastream/RTCIceCandidate.html 2014-03-02 15:36:53 UTC (rev 164941)
@@ -16,13 +16,6 @@
shouldBe('candidate.sdpMid', '"bar"');
shouldBe('candidate.sdpMLineIndex', '6');
- shouldNotThrow('initializer = JSON.parse(JSON.stringify(candidate));');
-
- shouldNotThrow('candidate = new RTCIceCandidate(initializer);');
- shouldBe('candidate.candidate', '"foo"');
- shouldBe('candidate.sdpMid', '"bar"');
- shouldBe('candidate.sdpMLineIndex', '6');
-
shouldNotThrow('new RTCIceCandidate({});');
shouldNotThrow('new RTCIceCandidate({candidate:"foo"});');
shouldNotThrow('new RTCIceCandidate({sdpMid:"bar"});');
Deleted: trunk/LayoutTests/fast/mediastream/RTCPeerConnection-have-local-answer.html (164940 => 164941)
--- trunk/LayoutTests/fast/mediastream/RTCPeerConnection-have-local-answer.html 2014-03-02 14:59:47 UTC (rev 164940)
+++ trunk/LayoutTests/fast/mediastream/RTCPeerConnection-have-local-answer.html 2014-03-02 15:36:53 UTC (rev 164941)
@@ -1,102 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
- <head>
- <script src=""
- </head>
- <body>
- <script>
- description("Tests RTCPeerConnection remoteDescription.");
-
- var pc = null;
-
- function requestFailed4(reason)
- {
- errorReason = reason;
- testPassed('setRemoteDescription failed.');
- shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
- check("pranswer", "local", "offer", "remote", '"have-local-pranswer"');
- finishJSTest();
- }
-
- function requestFailed3(reason)
- {
- errorReason = reason;
- testPassed('setRemoteDescription failed.');
- shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
- check("pranswer", "local", "offer", "remote", '"have-local-pranswer"');
- sessionDescription = new RTCSessionDescription({type:"pranswer", sdp:"remote"});
- shouldNotThrow('pc.setRemoteDescription(sessionDescription, finishIfSucceeded, requestFailed4);');
- }
-
- function requestFailed2(reason)
- {
- errorReason = reason;
- testPassed('setRemoteDescription failed.');
- shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
- check("pranswer", "local", "offer", "remote", '"have-local-pranswer"');
- sessionDescription = new RTCSessionDescription({type:"answer", sdp:"remote"});
- shouldNotThrow('pc.setRemoteDescription(sessionDescription, finishIfSucceeded, requestFailed3);');
- }
-
- function requestFailed1(reason)
- {
- errorReason = reason;
- testPassed('setRemoteDescription failed.');
- shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
- check("pranswer", "local", "offer", "remote", '"have-local-pranswer"');
- sessionDescription = new RTCSessionDescription({type:"offer", sdp:"remote"});
- shouldNotThrow('pc.setRemoteDescription(sessionDescription, finishIfSucceeded, requestFailed2);');
- }
-
- function requestSucceeded2()
- {
- testPassed('setLocalDescription succeeded.');
- check("answer", "local", "offer", "remote", '"stable"');
- sessionDescription = new RTCSessionDescription({type:"offer", sdp:"local"});
- shouldNotThrow('pc.setLocalDescription(sessionDescription, finishIfSucceeded, requestFailed1);');
- }
-
- function requestSucceeded1()
- {
- testPassed('setRemoteDescription succeeded.');
- check("", "", "offer", "remote", '"have-remote-offer"');
- sessionDescription = new RTCSessionDescription({type:"answer", sdp:"local"});
- shouldNotThrow('pc.setLocalDescription(sessionDescription, requestSucceeded2, finishIfFailed);');
- }
-
- function finishIfSucceeded()
- {
- testFailed('setRemoteDescription succeeded.');
- finishJSTest();
- }
-
- function finishIfFailed()
- {
- testFailed('setRemoteDescription failed.');
- finishJSTest();
- }
-
- function check(localType, localSdp, remoteType, remoteSdp, signalingState)
- {
- if (localType !== "" && localSdp !== "") {
- shouldBeEqualToString('pc.localDescription.type', localType);
- shouldBeEqualToString('pc.localDescription.sdp', localSdp);
- }
- if (remoteType !== "" && remoteSdp !== "") {
- shouldBeEqualToString('pc.remoteDescription.type', remoteType);
- shouldBeEqualToString('pc.remoteDescription.sdp', remoteSdp);
- }
- shouldBe('pc.signalingState', signalingState);
- }
-
- pc = new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
- shouldBe('pc.signalingState', '"stable"');
- var sessionDescription = new RTCSessionDescription({type:"offer", sdp:"remote"});
- shouldNotThrow('pc.setRemoteDescription(sessionDescription, requestSucceeded1, finishIfFailed);');
-
- window.jsTestIsAsync = true;
- window.successfullyParsed = true;
- </script>
- <script src=""
- </body>
-</html>
Modified: trunk/LayoutTests/fast/mediastream/RTCSessionDescription-expected.txt (164940 => 164941)
--- trunk/LayoutTests/fast/mediastream/RTCSessionDescription-expected.txt 2014-03-02 14:59:47 UTC (rev 164940)
+++ trunk/LayoutTests/fast/mediastream/RTCSessionDescription-expected.txt 2014-03-02 15:36:53 UTC (rev 164941)
@@ -7,10 +7,6 @@
PASS sessionDescription = new RTCSessionDescription(initializer); did not throw exception.
PASS sessionDescription.type is "offer"
PASS sessionDescription.sdp is "foobar"
-PASS initializer = JSON.parse(JSON.stringify(sessionDescription)); did not throw exception.
-PASS sessionDescription = new RTCSessionDescription(initializer); did not throw exception.
-PASS sessionDescription.type is "offer"
-PASS sessionDescription.sdp is "foobar"
PASS new RTCSessionDescription(null); threw exception TypeError: Optional RTCSessionDescription constructor argument must be a valid Dictionary.
PASS new RTCSessionDescription(5); threw exception TypeError: Optional RTCSessionDescription constructor argument must be a valid Dictionary.
PASS new RTCSessionDescription('foobar'); threw exception TypeError: Optional RTCSessionDescription constructor argument must be a valid Dictionary.
Modified: trunk/LayoutTests/fast/mediastream/RTCSessionDescription.html (164940 => 164941)
--- trunk/LayoutTests/fast/mediastream/RTCSessionDescription.html 2014-03-02 14:59:47 UTC (rev 164940)
+++ trunk/LayoutTests/fast/mediastream/RTCSessionDescription.html 2014-03-02 15:36:53 UTC (rev 164941)
@@ -16,12 +16,6 @@
shouldBe('sessionDescription.type', '"offer"');
shouldBe('sessionDescription.sdp', '"foobar"');
- shouldNotThrow('initializer = JSON.parse(JSON.stringify(sessionDescription));');
-
- shouldNotThrow("sessionDescription = new RTCSessionDescription(initializer);");
- shouldBe('sessionDescription.type', '"offer"');
- shouldBe('sessionDescription.sdp', '"foobar"');
-
shouldThrow("new RTCSessionDescription(null);");
shouldThrow("new RTCSessionDescription(5);");
shouldThrow("new RTCSessionDescription('foobar');");