[webkit-reviews] review granted: [Bug 123205] Adding mock class to test RTCDataChannelHandler : [Attachment 214955] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 23 10:20:07 PDT 2013


Eric Carlson <eric.carlson at apple.com> has granted Thiago de Barros Lacerda
<thiago.lacerda at openbossa.org>'s request for review:
Bug 123205: Adding mock class to test RTCDataChannelHandler
https://bugs.webkit.org/show_bug.cgi?id=123205

Attachment 214955: Patch
https://bugs.webkit.org/attachment.cgi?id=214955&action=review

------- Additional Comments from Eric Carlson <eric.carlson at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=214955&action=review


> Source/WebCore/ChangeLog:11
> +	   No new tests needed.

I would say "Existing tests updated" instead.

> Source/WebCore/ChangeLog:16
> +	   * platform/mock/RTCDataChannelHandlerMock.cpp: Copied from
Source/WebCore/platform/mock/RTCNotifiersMock.cpp.
> +	   * platform/mock/RTCDataChannelHandlerMock.h: Copied from
Source/WebCore/platform/mock/RTCNotifiersMock.h.

Are these "Copied from" comments correct?

> Source/WebCore/platform/mock/RTCDataChannelHandlerMock.h:51
> +    String label() OVERRIDE { return m_label; }
> +    bool ordered() OVERRIDE { return m_ordered; }
> +    unsigned short maxRetransmitTime() OVERRIDE { return
m_maxRetransmitTime; }
> +    unsigned short maxRetransmits() OVERRIDE { return m_maxRetransmits; }
> +    String protocol() OVERRIDE { return m_protocol; }
> +    bool negotiated() OVERRIDE { return m_negotiated; }
> +    unsigned short id() OVERRIDE { return m_id; }
> +    unsigned long bufferedAmount() OVERRIDE { return 0; }

These should all be virtual.

> Source/WebCore/platform/mock/RTCDataChannelHandlerMock.h:66
> +    String m_label;
> +    bool m_ordered;
> +    unsigned short m_maxRetransmitTime;
> +    unsigned short m_maxRetransmits;
> +    String m_protocol;
> +    bool m_negotiated;
> +    unsigned short m_id;

Nit: it may be slightly more space efficient to have the "short" and "bool"
members last.


More information about the webkit-reviews mailing list