[Webkit-unassigned] [Bug 123205] Adding mock class to test RTCDataChannelHandler

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 23 10:24:51 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=123205





--- Comment #3 from Thiago de Barros Lacerda <thiago.lacerda at openbossa.org>  2013-10-23 10:23:36 PST ---
(In reply to comment #2)
> (From update of attachment 214955 [details])
> 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?

Git thinks that I copied them, maybe because of its similarity check. But I didn't not copy. Should I remove them?
> 
> > 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.

Why? The class is final, so no class can use it as superclass and override its methods.

> 
> > 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.

OK

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list