Changeset 134245 in webkit
- Timestamp:
- Nov 12, 2012 8:34:45 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r134243 r134245 1 2012-11-12 Tommy Widenflycht <tommyw@google.com> 2 3 MediaStream API: Make sure that MediaConstraints only has optional and mandatory at the top level 4 https://bugs.webkit.org/show_bug.cgi?id=101733 5 6 Reviewed by Jochen Eisinger. 7 8 This patch adds more tests for MediaConstraints. 9 10 * fast/mediastream/RTCPeerConnection-expected.txt: 11 * fast/mediastream/RTCPeerConnection.html: 12 1 13 2012-11-12 Allan Sandfeld Jensen <allan.jensen@digia.com> 2 14 -
trunk/LayoutTests/fast/mediastream/RTCPeerConnection-expected.txt
r128982 r134245 32 32 PASS new webkitRTCPeerConnection(null, {optional:[{valid_and_supported_1:0,valid_and_supported_2:0}]}); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17. 33 33 PASS new webkitRTCPeerConnection(null, {optional:[{invalid:0}]}); threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9. 34 PASS new webkitRTCPeerConnection(null, {valid_and_supported_1:1}); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17. 35 PASS new webkitRTCPeerConnection(null, {valid_but_unsupported_1:1}); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17. 36 PASS new webkitRTCPeerConnection(null, {valid_and_supported_2:1, mandatory:{valid_and_supported_1:1}}); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17. 34 37 PASS successfullyParsed is true 35 38 -
trunk/LayoutTests/fast/mediastream/RTCPeerConnection.html
r128982 r134245 38 38 shouldThrow("new webkitRTCPeerConnection(null, {optional:[{valid_and_supported_1:0,valid_and_supported_2:0}]});"); 39 39 shouldThrow("new webkitRTCPeerConnection(null, {optional:[{invalid:0}]});"); 40 shouldThrow("new webkitRTCPeerConnection(null, {valid_and_supported_1:1});"); 41 shouldThrow("new webkitRTCPeerConnection(null, {valid_but_unsupported_1:1});"); 42 shouldThrow("new webkitRTCPeerConnection(null, {valid_and_supported_2:1, mandatory:{valid_and_supported_1:1}});"); 40 43 </script> 41 44 <script src="../js/resources/js-test-post.js"></script> -
trunk/Source/WebCore/ChangeLog
r134244 r134245 1 2012-11-12 Tommy Widenflycht <tommyw@google.com> 2 3 MediaStream API: Make sure that MediaConstraints only has optional and mandatory at the top level 4 https://bugs.webkit.org/show_bug.cgi?id=101733 5 6 Reviewed by Jochen Eisinger. 7 8 This patch adds better verification to MediaConstraintsImpl. 9 10 Existing tests expanded to cover this change. 11 12 * Modules/mediastream/MediaConstraintsImpl.cpp: 13 (WebCore::MediaConstraintsImpl::initialize): 14 1 15 2012-11-12 Sheriff Bot <webkit.review.bot@gmail.com> 2 16 -
trunk/Source/WebCore/Modules/mediastream/MediaConstraintsImpl.cpp
r130612 r134245 66 66 67 67 String mandatory = ASCIILiteral("mandatory"); 68 String optional = ASCIILiteral("optional"); 69 70 for (Vector<String>::iterator it = names.begin(); it != names.end(); ++it) { 71 if (*it != mandatory && *it != optional) 72 return false; 73 } 74 68 75 if (names.contains(mandatory)) { 69 76 Dictionary mandatoryConstraints; … … 77 84 } 78 85 79 String optional = ASCIILiteral("optional");80 86 if (names.contains(optional)) { 81 87 ArrayValue optionalConstraints;
Note: See TracChangeset
for help on using the changeset viewer.