Bug 167429 - [WebRTC] Add a LibWebRTC mock for testing
Summary: [WebRTC] Add a LibWebRTC mock for testing
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-25 13:32 PST by youenn fablet
Modified: 2017-01-27 10:24 PST (History)
10 users (show)

See Also:


Attachments
Patch (30.39 KB, patch)
2017-01-25 14:05 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (34.59 KB, patch)
2017-01-25 15:01 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (39.99 KB, patch)
2017-01-25 16:10 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (54.76 KB, patch)
2017-01-26 16:57 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Fixing license (54.33 KB, patch)
2017-01-26 17:27 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews101 for mac-elcapitan (870.46 KB, application/zip)
2017-01-26 18:16 PST, Build Bot
no flags Details
Archive of layout-test-results from ews114 for mac-elcapitan (1.86 MB, application/zip)
2017-01-26 18:18 PST, Build Bot
no flags Details
Patch (54.99 KB, patch)
2017-01-26 18:19 PST, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2017-01-25 13:32:06 PST
This will allow test the webrtc abstract code on controlled scenarios.
Comment 1 youenn fablet 2017-01-25 14:05:59 PST
Created attachment 299742 [details]
Patch
Comment 2 WebKit Commit Bot 2017-01-25 14:31:19 PST
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.
Comment 3 youenn fablet 2017-01-25 15:01:09 PST
Created attachment 299752 [details]
Patch
Comment 4 WebKit Commit Bot 2017-01-25 15:03:31 PST
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.
Comment 5 youenn fablet 2017-01-25 16:10:22 PST
Created attachment 299761 [details]
Patch
Comment 6 youenn fablet 2017-01-25 16:10:34 PST
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?
Comment 7 WebKit Commit Bot 2017-01-25 16:12:01 PST
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 8 Alex Christensen 2017-01-25 18:56:25 PST
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)
Comment 9 youenn fablet 2017-01-26 16:57:22 PST
Created attachment 299882 [details]
Patch
Comment 10 WebKit Commit Bot 2017-01-26 17:00:27 PST
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.
Comment 11 youenn fablet 2017-01-26 17:27:11 PST
Created attachment 299887 [details]
Fixing license
Comment 12 WebKit Commit Bot 2017-01-26 17:30:07 PST
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 13 Build Bot 2017-01-26 18:16:15 PST
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
Comment 14 Build Bot 2017-01-26 18:16:19 PST
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 15 Build Bot 2017-01-26 18:18:51 PST
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
Comment 16 Build Bot 2017-01-26 18:18:55 PST
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
Comment 17 youenn fablet 2017-01-26 18:19:45 PST
Created attachment 299895 [details]
Patch
Comment 18 WebKit Commit Bot 2017-01-26 18:23:06 PST
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 19 Alex Christensen 2017-01-26 19:48:40 PST
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&
Comment 20 youenn fablet 2017-01-26 20:28:43 PST
(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 21 WebKit Commit Bot 2017-01-26 20:55:29 PST
Comment on attachment 299895 [details]
Patch

Clearing flags on attachment: 299895

Committed r211253: <http://trac.webkit.org/changeset/211253>
Comment 22 WebKit Commit Bot 2017-01-26 20:55:34 PST
All reviewed patches have been landed.  Closing bug.