Backed out 2 changesets (bug 1173851) for Mochitest failures on dom/tests/mochitest/general/test_interfaces.html. CLOSED TREE

Backed out changeset aba40941f027 (bug 1173851)
Backed out changeset 36e6f0595461 (bug 1173851)

--HG--
rename : dom/webidl/RTCDataChannel.webidl => dom/webidl/DataChannel.webidl
This commit is contained in:
Dorel Luca 2018-02-15 01:10:06 +02:00
parent dabf7b41ee
commit 977a4712b6
14 changed files with 168 additions and 18 deletions

View File

@ -52,7 +52,7 @@ nsDOMDataChannel::~nsDOMDataChannel()
/* virtual */ JSObject*
nsDOMDataChannel::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return RTCDataChannelBinding::Wrap(aCx, this, aGivenProto);
return DataChannelBinding::Wrap(aCx, this, aGivenProto);
}
NS_IMPL_CYCLE_COLLECTION_CLASS(nsDOMDataChannel)

View File

@ -9,7 +9,7 @@
#include "mozilla/Attributes.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/dom/RTCDataChannelBinding.h"
#include "mozilla/dom/DataChannelBinding.h"
#include "mozilla/dom/TypedArray.h"
#include "mozilla/net/DataChannelListener.h"
#include "nsIDOMDataChannel.h"

View File

@ -227,6 +227,10 @@ DOMInterfaces = {
'nativeType': 'nsDOMCSSValueList'
},
'DataChannel': {
'nativeType': 'nsDOMDataChannel',
},
'DedicatedWorkerGlobalScope': {
'headerFile': 'mozilla/dom/WorkerScope.h',
'implicitJSContext': [ 'close' ],
@ -739,10 +743,6 @@ DOMInterfaces = {
'nativeType': 'nsDOMCSSRGBColor',
},
'RTCDataChannel': {
'nativeType': 'nsDOMDataChannel',
},
'Screen': {
'nativeType': 'nsScreen',
},
@ -1693,6 +1693,7 @@ def addExternalIface(iface, nativeType=None, headerFile=None,
addExternalIface('ApplicationCache', nativeType='nsIDOMOfflineResourceList')
addExternalIface('Cookie', nativeType='nsICookie2',
headerFile='nsICookie2.h', notflattened=True)
addExternalIface('RTCDataChannel', nativeType='nsIDOMDataChannel')
addExternalIface('HitRegionOptions', nativeType='nsISupports')
addExternalIface('imgINotificationObserver', nativeType='imgINotificationObserver')
addExternalIface('imgIRequest', nativeType='imgIRequest', notflattened=True)

View File

@ -14,7 +14,8 @@ enum RTCDataChannelType {
"blob"
};
interface RTCDataChannel : EventTarget
// XXX This interface is called RTCDataChannel in the spec.
interface DataChannel : EventTarget
{
readonly attribute DOMString label;
readonly attribute boolean reliable;
@ -39,7 +40,7 @@ interface RTCDataChannel : EventTarget
};
// Mozilla extensions.
partial interface RTCDataChannel
partial interface DataChannel
{
readonly attribute DOMString protocol;
readonly attribute boolean ordered;

View File

@ -126,7 +126,7 @@ interface PeerConnectionImpl {
/* Data channels */
[Throws]
RTCDataChannel createDataChannel(DOMString label, DOMString protocol,
DataChannel createDataChannel(DOMString label, DOMString protocol,
unsigned short type, boolean ordered,
unsigned short maxTime, unsigned short maxNum,
boolean externalNegotiated, unsigned short stream);

View File

@ -29,7 +29,7 @@ interface PeerConnectionObserver
void onGetStatsError(unsigned long name, DOMString message);
/* Data channel callbacks */
void notifyDataChannel(RTCDataChannel channel);
void notifyDataChannel(DataChannel channel);
/* Notification of one of several types of state changed */
void onStateChange(PCObserverStateType state);

View File

@ -7,6 +7,8 @@
* http://dev.w3.org/2011/webrtc/editor/webrtc.html#idl-def-RTCDataChannelEvent
*/
interface RTCDataChannel;
dictionary RTCDataChannelEventInit : EventInit {
RTCDataChannel? channel = null;
};

View File

@ -73,6 +73,8 @@ dictionary RTCOfferOptions : RTCOfferAnswerOptions {
boolean iceRestart = false;
};
interface RTCDataChannel;
[Pref="media.peerconnection.enabled",
JSImplementation="@mozilla.org/dom/peerconnection;1",
Constructor (optional RTCConfiguration configuration,

View File

@ -967,13 +967,13 @@ WEBIDL_FILES = [
if CONFIG['MOZ_WEBRTC']:
WEBIDL_FILES += [
'DataChannel.webidl',
'PeerConnectionImpl.webidl',
'PeerConnectionImplEnums.webidl',
'PeerConnectionObserver.webidl',
'PeerConnectionObserverEnums.webidl',
'RTCCertificate.webidl',
'RTCConfiguration.webidl',
'RTCDataChannel.webidl',
'RTCDTMFSender.webidl',
'RTCIceCandidate.webidl',
'RTCIdentityAssertion.webidl',

View File

@ -90,7 +90,7 @@
#include "mozilla/dom/RTCStatsReportBinding.h"
#include "mozilla/dom/RTCPeerConnectionBinding.h"
#include "mozilla/dom/PeerConnectionImplBinding.h"
#include "mozilla/dom/RTCDataChannelBinding.h"
#include "mozilla/dom/DataChannelBinding.h"
#include "mozilla/dom/PerformanceTiming.h"
#include "mozilla/dom/PluginCrashedEvent.h"
#include "MediaStreamTrack.h"

View File

@ -1,4 +1,7 @@
[RTCPeerConnection-ondatachannel.html]
[datachannel event should fire when new data channel is announced to the remote peer]
expected: FAIL
[Data channel created on remote peer should match the same configuration as local peer]
expected: FAIL

View File

@ -26,3 +26,6 @@
[mozRTCSessionDescription interface should not exist]
expected: FAIL
[DataChannel interface should not exist]
expected: FAIL

View File

@ -427,21 +427,87 @@
[RTCDataChannel interface: existence and properties of interface object]
expected: FAIL
[RTCDataChannel interface object length]
expected: FAIL
[RTCDataChannel interface object name]
expected: FAIL
[RTCDataChannel interface: existence and properties of interface prototype object]
expected: FAIL
[RTCDataChannel interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[RTCDataChannel interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL
[RTCDataChannel interface: attribute label]
expected: FAIL
[RTCDataChannel interface: attribute ordered]
expected: FAIL
[RTCDataChannel interface: attribute maxPacketLifeTime]
expected: FAIL
[RTCDataChannel interface: attribute maxRetransmits]
expected: FAIL
[RTCDataChannel interface: attribute protocol]
expected: FAIL
[RTCDataChannel interface: attribute negotiated]
expected: FAIL
[RTCDataChannel interface: attribute id]
expected: FAIL
[RTCDataChannel interface: attribute priority]
expected: FAIL
[RTCDataChannel interface: attribute readyState]
expected: FAIL
[RTCDataChannel interface: attribute bufferedAmount]
expected: FAIL
[RTCDataChannel interface: attribute bufferedAmountLowThreshold]
expected: FAIL
[RTCDataChannel interface: attribute onopen]
expected: FAIL
[RTCDataChannel interface: attribute onbufferedamountlow]
expected: FAIL
[RTCDataChannel interface: attribute onerror]
expected: FAIL
[RTCDataChannel interface: attribute onclose]
expected: FAIL
[RTCDataChannel interface: operation close()]
expected: FAIL
[RTCDataChannel interface: attribute onmessage]
expected: FAIL
[RTCDataChannel interface: attribute binaryType]
expected: FAIL
[RTCDataChannel interface: operation send(USVString)]
expected: FAIL
[RTCDataChannel interface: operation send(Blob)]
expected: FAIL
[RTCDataChannel interface: operation send(ArrayBuffer)]
expected: FAIL
[RTCDataChannel interface: operation send(ArrayBufferView)]
expected: FAIL
[RTCDataChannelEvent interface: existence and properties of interface object]
expected: FAIL
@ -827,6 +893,9 @@
[RTCSctpTransport interface: idlTestObjects.sctpTransport must inherit property "maxMessageSize" with the proper type (1)]
expected: FAIL
[RTCDataChannel must be primary interface of new RTCPeerConnection().createDataChannel('')]
expected: FAIL
[Stringification of new RTCPeerConnection().createDataChannel('')]
expected: FAIL
@ -1682,21 +1751,90 @@
[RTCDataChannel interface: existence and properties of interface object]
expected: FAIL
[RTCDataChannel interface object length]
expected: FAIL
[RTCDataChannel interface object name]
expected: FAIL
[RTCDataChannel interface: existence and properties of interface prototype object]
expected: FAIL
[RTCDataChannel interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[RTCDataChannel interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL
[RTCDataChannel interface: attribute label]
expected: FAIL
[RTCDataChannel interface: attribute ordered]
expected: FAIL
[RTCDataChannel interface: attribute maxPacketLifeTime]
expected: FAIL
[RTCDataChannel interface: attribute maxRetransmits]
expected: FAIL
[RTCDataChannel interface: attribute protocol]
expected: FAIL
[RTCDataChannel interface: attribute negotiated]
expected: FAIL
[RTCDataChannel interface: attribute id]
expected: FAIL
[RTCDataChannel interface: attribute priority]
expected: FAIL
[RTCDataChannel interface: attribute readyState]
expected: FAIL
[RTCDataChannel interface: attribute bufferedAmount]
expected: FAIL
[RTCDataChannel interface: attribute bufferedAmountLowThreshold]
expected: FAIL
[RTCDataChannel interface: attribute onopen]
expected: FAIL
[RTCDataChannel interface: attribute onbufferedamountlow]
expected: FAIL
[RTCDataChannel interface: attribute onerror]
expected: FAIL
[RTCDataChannel interface: attribute onclose]
expected: FAIL
[RTCDataChannel interface: operation close()]
expected: FAIL
[RTCDataChannel interface: attribute onmessage]
expected: FAIL
[RTCDataChannel interface: attribute binaryType]
expected: FAIL
[RTCDataChannel interface: operation send(USVString)]
expected: FAIL
[RTCDataChannel interface: operation send(Blob)]
expected: FAIL
[RTCDataChannel interface: operation send(ArrayBuffer)]
expected: FAIL
[RTCDataChannel interface: operation send(ArrayBufferView)]
expected: FAIL
[RTCDataChannel must be primary interface of new RTCPeerConnection().createDataChannel('')]
expected: FAIL
[Stringification of new RTCPeerConnection().createDataChannel('')]
expected: FAIL

View File

@ -74,6 +74,9 @@
#include "mozilla/dom/CSSValueBinding.h"
#include "mozilla/dom/CSSValueListBinding.h"
#include "mozilla/dom/CustomEventBinding.h"
#ifdef MOZ_WEBRTC
#include "mozilla/dom/DataChannelBinding.h"
#endif
#include "mozilla/dom/DataTransferBinding.h"
#include "mozilla/dom/DOMCursorBinding.h"
#include "mozilla/dom/DOMExceptionBinding.h"
@ -112,9 +115,6 @@
#include "mozilla/dom/ProcessingInstructionBinding.h"
#include "mozilla/dom/RangeBinding.h"
#include "mozilla/dom/RectBinding.h"
#ifdef MOZ_WEBRTC
#include "mozilla/dom/RTCDataChannelBinding.h"
#endif
#include "mozilla/dom/ScreenBinding.h"
#include "mozilla/dom/SelectionBinding.h"
#include "mozilla/dom/ScrollAreaEventBinding.h"
@ -198,6 +198,9 @@ const ComponentsInterfaceShimEntry kComponentsInterfaceShimMap[] =
DEFINE_SHIM(ClipboardEvent),
DEFINE_SHIM(Comment),
DEFINE_SHIM(CustomEvent),
#ifdef MOZ_WEBRTC
DEFINE_SHIM(DataChannel),
#endif
DEFINE_SHIM(DataTransfer),
DEFINE_SHIM(DOMCursor),
DEFINE_SHIM(DOMException),
@ -228,9 +231,6 @@ const ComponentsInterfaceShimEntry kComponentsInterfaceShimMap[] =
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIDOMParser, DOMParser),
DEFINE_SHIM(ProcessingInstruction),
DEFINE_SHIM(Range),
#ifdef MOZ_WEBRTC
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIDOMDataChannel, RTCDataChannel),
#endif
DEFINE_SHIM(Screen),
DEFINE_SHIM(ScrollAreaEvent),
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIDOMSerializer, XMLSerializer),