This will allow test the webrtc abstract code on controlled scenarios.
Created attachment 299742 [details] Patch
Attachment 299742 [details] did not pass style-queue: ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.h:43: local_streams is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.h:44: remote_streams is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.h:50: local_description is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.h:51: remote_description is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.h:56: signaling_state is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.h:57: ice_connection_state is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.h:58: ice_gathering_state is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.cpp:48: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.cpp:77: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] Total errors found: 9 in 10 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 299752 [details] Patch
Attachment 299752 [details] did not pass style-queue: ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.h:43: local_streams is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.h:44: remote_streams is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.h:50: local_description is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.h:51: remote_description is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.h:56: signaling_state is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.h:57: ice_connection_state is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.h:58: ice_gathering_state is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.cpp:48: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.cpp:77: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] Total errors found: 9 in 11 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 299761 [details] Patch
This patch is introducing a somehow redundant API to emulateRTCPeerConnectionPlatformEvent. The goal is the same, control the behaviour of a mock webrtc backend. emulateRTCPeerConnectionPlatformEvent currently is sending messages to do some specific things through RTCPeerConnection that only mocks will react upon. useMockRTCPeerConnectionFactory is setting the scenario that should be played and it will create the necessary mocks peer connections behind the scenes. I did not go the emulateRTCPeerConnectionPlatformEvent for some reasons: - It is currently adding a mock-only API at RTCPeerConnection level. . - emulateRTCPeerConnectionPlatformEvent is making the implementation of the different scenarios within a single mock class. emulateRTCPeerConnectionPlatformEvent is typically done within the test code at specific times. useMockRTCPeerConnectionFactory is typically done first by the test. Both could also coexist. Any opinion?
Attachment 299761 [details] did not pass style-queue: ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.h:47: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.h:47: Extra space before ) [whitespace/parens] [2] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.h:47: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.h:50: local_streams is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.h:51: remote_streams is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.h:54: local_description is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.h:55: remote_description is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.h:58: signaling_state is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.h:59: ice_connection_state is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.h:60: ice_gathering_state is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.h:85: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.h:92: session_id is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.h:93: session_version is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.h:96: number_of_mediasections is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.h:109: sdp_mid is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.h:110: sdp_mline_index is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.h:137: set_enabled is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.h:159: set_enabled is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.h:183: buffered_amount is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.h:198: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.cpp:48: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.cpp:77: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] Total errors found: 22 in 11 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 299761 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=299761&action=review > Source/WebCore/ChangeLog:13 > + * platform/mediastream/libwebrtc/MockLibWebRTCPeerConnection.cpp: Added. Can this go in WebCoreTestSupport? This will be a lot of binary code that we don't need to ship to customers in WebCore.framework. > Source/WebCore/testing/Internals.cpp:1102 > + UNUSED_PARAM(testCase); #else UNUSED_PARAM(testCase)
Created attachment 299882 [details] Patch
Attachment 299882 [details] did not pass style-queue: ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.cpp:49: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.cpp:78: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCUtils.cpp:34: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:49: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:52: local_streams is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:53: remote_streams is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:56: local_description is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:57: remote_description is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:60: signaling_state is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:61: ice_connection_state is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:62: ice_gathering_state is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:87: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:94: session_id is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:95: session_version is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:98: number_of_mediasections is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:111: sdp_mid is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:112: sdp_mline_index is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:139: set_enabled is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:161: set_enabled is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:185: buffered_amount is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 20 in 18 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 299887 [details] Fixing license
Attachment 299887 [details] did not pass style-queue: ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.cpp:45: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.cpp:74: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCUtils.cpp:34: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:45: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:48: local_streams is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:49: remote_streams is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:52: local_description is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:53: remote_description is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:56: signaling_state is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:57: ice_connection_state is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:58: ice_gathering_state is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:83: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:90: session_id is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:91: session_version is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:94: number_of_mediasections is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:107: sdp_mid is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:108: sdp_mline_index is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:135: set_enabled is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:157: set_enabled is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:181: buffered_amount is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 20 in 18 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 299887 [details] Fixing license Attachment 299887 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/2955467 New failing tests: webrtc/video.html webrtc/datachannel/basic.html
Created attachment 299892 [details] Archive of layout-test-results from ews101 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Comment on attachment 299887 [details] Fixing license Attachment 299887 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/2955459 New failing tests: webrtc/video.html webrtc/datachannel/basic.html
Created attachment 299894 [details] Archive of layout-test-results from ews114 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews114 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Created attachment 299895 [details] Patch
Attachment 299895 [details] did not pass style-queue: ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.cpp:45: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.cpp:74: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCUtils.cpp:34: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:45: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:48: local_streams is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:49: remote_streams is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:52: local_description is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:53: remote_description is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:56: signaling_state is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:57: ice_connection_state is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:58: ice_gathering_state is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:83: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:90: session_id is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:91: session_version is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:94: number_of_mediasections is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:107: sdp_mid is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:108: sdp_mline_index is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:135: set_enabled is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:157: set_enabled is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/testing/MockLibWebRTCPeerConnection.h:181: buffered_amount is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 20 in 19 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 299895 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=299895&action=review > Source/WebCore/testing/Internals.cpp:1102 > + LibWebRTCProvider* provider = (document && document->page()) ? &document->page()->libWebRTCProvider() : nullptr; Let's just return early if we're not in a document with a page. Then we can pass around a LibWebRTCProvider&
(In reply to comment #19) > Comment on attachment 299895 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=299895&action=review > > > Source/WebCore/testing/Internals.cpp:1102 > > + LibWebRTCProvider* provider = (document && document->page()) ? &document->page()->libWebRTCProvider() : nullptr; > > Let's just return early if we're not in a document with a page. Then we can > pass around a LibWebRTCProvider& The mock factory is taking a pointer as it dot not always need one. It uses the pointer to create real peer connections and makes the pointer null when it has no more use of it.
Comment on attachment 299895 [details] Patch Clearing flags on attachment: 299895 Committed r211253: <http://trac.webkit.org/changeset/211253>
All reviewed patches have been landed. Closing bug.