| Differences between
and this patch
- a/Source/WebCore/ChangeLog +58 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2018-08-27  Youenn Fablet  <youenn@apple.com>
2
3
        Remove WebRTC legacy API implementation
4
        https://bugs.webkit.org/show_bug.cgi?id=189040
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        This API is no longer needed as the runtime flag is off by default.
9
        Removing this option allows removing some code and will ease future WebRTC improvements.
10
        Covered by existing tests.
11
12
        * CMakeLists.txt:
13
        * DerivedSources.make:
14
        * Modules/mediastream/MediaStreamEvent.cpp: Removed.
15
        * Modules/mediastream/MediaStreamEvent.h: Removed.
16
        * Modules/mediastream/MediaStreamEvent.idl: Removed.
17
        * Modules/mediastream/NavigatorUserMedia.idl: Removed.
18
        * Modules/mediastream/NavigatorUserMedia.js: Removed.
19
        * Modules/mediastream/PeerConnectionBackend.cpp:
20
        * Modules/mediastream/PeerConnectionBackend.h:
21
        * Modules/mediastream/RTCPeerConnection.h:
22
        * Modules/mediastream/RTCPeerConnection.idl:
23
        * Modules/mediastream/RTCPeerConnection.js:
24
        (initializeRTCPeerConnection):
25
        (createOffer):
26
        (createAnswer):
27
        (setLocalDescription):
28
        (setRemoteDescription):
29
        (addIceCandidate):
30
        (getLocalStreams): Deleted.
31
        (getStreamById): Deleted.
32
        (addStream): Deleted.
33
        (): Deleted.
34
        * Modules/mediastream/RTCPeerConnectionInternals.js:
35
        (callbacksAndDictionaryOverload):
36
        (if): Deleted.
37
        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
38
        (WebCore::LibWebRTCMediaEndpoint::mediaStreamFromRTCStream):
39
        (WebCore::LibWebRTCMediaEndpoint::addRemoteStream):
40
        (WebCore::LibWebRTCMediaEndpoint::removeRemoteStream):
41
        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
42
        * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
43
        (WebCore::LibWebRTCPeerConnectionBackend::doStop):
44
        (WebCore::LibWebRTCPeerConnectionBackend::removeRemoteStream): Deleted.
45
        (WebCore::LibWebRTCPeerConnectionBackend::addRemoteStream): Deleted.
46
        * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
47
        * Sources.txt:
48
        * WebCore.xcodeproj/project.pbxproj:
49
        * bindings/js/JSDOMGlobalObject.cpp:
50
        (WebCore::JSDOMGlobalObject::addBuiltinGlobals):
51
        (WebCore::isWebRTCLegacyAPIEnabled): Deleted.
52
        * bindings/js/WebCoreBuiltinNames.h:
53
        * dom/EventNames.in:
54
        * page/RuntimeEnabledFeatures.h:
55
        (WebCore::RuntimeEnabledFeatures::setPeerConnectionEnabled):
56
        (WebCore::RuntimeEnabledFeatures::webRTCLegacyAPIEnabled const): Deleted.
57
        (WebCore::RuntimeEnabledFeatures::setWebRTCLegacyAPIEnabled): Deleted.
58
1
2018-08-28  Wenson Hsieh  <wenson_hsieh@apple.com>
59
2018-08-28  Wenson Hsieh  <wenson_hsieh@apple.com>
2
60
3
        Work towards: [iOS] Consolidate the implementations of readString, stringForType, and readURL in PlatformPasteboardIOS.mm
61
        Work towards: [iOS] Consolidate the implementations of readString, stringForType, and readURL in PlatformPasteboardIOS.mm
- a/Source/WebKit/ChangeLog +19 lines
Lines 1-3 a/Source/WebKit/ChangeLog_sec1
1
2018-08-27  Youenn Fablet  <youenn@apple.com>
2
3
        Remove WebRTC legacy API implementation
4
        https://bugs.webkit.org/show_bug.cgi?id=189040
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        * Shared/WebPreferences.yaml:
9
        * UIProcess/API/C/WKPreferences.cpp:
10
        (WKPreferencesSetWebRTCLegacyAPIEnabled): Deleted.
11
        (WKPreferencesGetWebRTCLegacyAPIEnabled): Deleted.
12
        * UIProcess/API/C/WKPreferencesRef.h:
13
        * UIProcess/API/Cocoa/WKPreferences.mm:
14
        (-[WKPreferences _webRTCLegacyAPIEnabled]): Deleted.
15
        (-[WKPreferences _setWebRTCLegacyAPIEnabled:]): Deleted.
16
        * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
17
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
18
        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
19
1
2018-08-28  Wenson Hsieh  <wenson_hsieh@apple.com>
20
2018-08-28  Wenson Hsieh  <wenson_hsieh@apple.com>
2
21
3
        Work towards: [iOS] Consolidate the implementations of readString, stringForType, and readURL in PlatformPasteboardIOS.mm
22
        Work towards: [iOS] Consolidate the implementations of readString, stringForType, and readURL in PlatformPasteboardIOS.mm
- a/Source/WebKitLegacy/mac/ChangeLog +16 lines
Lines 1-3 a/Source/WebKitLegacy/mac/ChangeLog_sec1
1
2018-08-27  Youenn Fablet  <youenn@apple.com>
2
3
        Remove WebRTC legacy API implementation
4
        https://bugs.webkit.org/show_bug.cgi?id=189040
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        * WebView/WebPreferenceKeysPrivate.h:
9
        * WebView/WebPreferences.mm:
10
        (+[WebPreferences initialize]):
11
        (-[WebPreferences webRTCLegacyAPIEnabled]): Deleted.
12
        (-[WebPreferences setWebRTCLegacyAPIEnabled:]): Deleted.
13
        * WebView/WebPreferencesPrivate.h:
14
        * WebView/WebView.mm:
15
        (-[WebView _preferencesChanged:]):
16
1
2018-08-28  Wenson Hsieh  <wenson_hsieh@apple.com>
17
2018-08-28  Wenson Hsieh  <wenson_hsieh@apple.com>
2
18
3
        Work towards: [iOS] Consolidate the implementations of readString, stringForType, and readURL in PlatformPasteboardIOS.mm
19
        Work towards: [iOS] Consolidate the implementations of readString, stringForType, and readURL in PlatformPasteboardIOS.mm
- a/Source/WebCore/CMakeLists.txt -3 lines
Lines 293-305 set(WebCore_NON_SVG_IDL_FILES a/Source/WebCore/CMakeLists.txt_sec1
293
    Modules/mediastream/MediaDeviceInfo.idl
293
    Modules/mediastream/MediaDeviceInfo.idl
294
    Modules/mediastream/MediaDevices.idl
294
    Modules/mediastream/MediaDevices.idl
295
    Modules/mediastream/MediaStream.idl
295
    Modules/mediastream/MediaStream.idl
296
    Modules/mediastream/MediaStreamEvent.idl
297
    Modules/mediastream/MediaStreamTrack.idl
296
    Modules/mediastream/MediaStreamTrack.idl
298
    Modules/mediastream/MediaStreamTrackEvent.idl
297
    Modules/mediastream/MediaStreamTrackEvent.idl
299
    Modules/mediastream/MediaTrackConstraints.idl
298
    Modules/mediastream/MediaTrackConstraints.idl
300
    Modules/mediastream/MediaTrackSupportedConstraints.idl
299
    Modules/mediastream/MediaTrackSupportedConstraints.idl
301
    Modules/mediastream/NavigatorMediaDevices.idl
300
    Modules/mediastream/NavigatorMediaDevices.idl
302
    Modules/mediastream/NavigatorUserMedia.idl
303
    Modules/mediastream/OverconstrainedError.idl
301
    Modules/mediastream/OverconstrainedError.idl
304
    Modules/mediastream/OverconstrainedErrorEvent.idl
302
    Modules/mediastream/OverconstrainedErrorEvent.idl
305
    Modules/mediastream/RTCAnswerOptions.idl
303
    Modules/mediastream/RTCAnswerOptions.idl
Lines 1830-1836 add_dependencies(WebCoreTestSupportBindings WebCore) a/Source/WebCore/CMakeLists.txt_sec2
1830
# WebCore JS Builtins
1828
# WebCore JS Builtins
1831
1829
1832
set(WebCore_BUILTINS_SOURCES
1830
set(WebCore_BUILTINS_SOURCES
1833
    ${WEBCORE_DIR}/Modules/mediastream/NavigatorUserMedia.js
1834
    ${WEBCORE_DIR}/Modules/mediastream/RTCPeerConnection.js
1831
    ${WEBCORE_DIR}/Modules/mediastream/RTCPeerConnection.js
1835
    ${WEBCORE_DIR}/Modules/mediastream/RTCPeerConnectionInternals.js
1832
    ${WEBCORE_DIR}/Modules/mediastream/RTCPeerConnectionInternals.js
1836
    ${WEBCORE_DIR}/Modules/streams/ByteLengthQueuingStrategy.js
1833
    ${WEBCORE_DIR}/Modules/streams/ByteLengthQueuingStrategy.js
- a/Source/WebCore/DerivedSources.make -3 lines
Lines 217-229 JS_BINDING_IDLS = \ a/Source/WebCore/DerivedSources.make_sec1
217
    $(WebCore)/Modules/mediastream/MediaDeviceInfo.idl \
217
    $(WebCore)/Modules/mediastream/MediaDeviceInfo.idl \
218
    $(WebCore)/Modules/mediastream/MediaDevices.idl \
218
    $(WebCore)/Modules/mediastream/MediaDevices.idl \
219
    $(WebCore)/Modules/mediastream/MediaStream.idl \
219
    $(WebCore)/Modules/mediastream/MediaStream.idl \
220
    $(WebCore)/Modules/mediastream/MediaStreamEvent.idl \
221
    $(WebCore)/Modules/mediastream/MediaStreamTrack.idl \
220
    $(WebCore)/Modules/mediastream/MediaStreamTrack.idl \
222
    $(WebCore)/Modules/mediastream/MediaStreamTrackEvent.idl \
221
    $(WebCore)/Modules/mediastream/MediaStreamTrackEvent.idl \
223
    $(WebCore)/Modules/mediastream/MediaTrackConstraints.idl \
222
    $(WebCore)/Modules/mediastream/MediaTrackConstraints.idl \
224
    $(WebCore)/Modules/mediastream/MediaTrackSupportedConstraints.idl \
223
    $(WebCore)/Modules/mediastream/MediaTrackSupportedConstraints.idl \
225
    $(WebCore)/Modules/mediastream/NavigatorMediaDevices.idl \
224
    $(WebCore)/Modules/mediastream/NavigatorMediaDevices.idl \
226
    $(WebCore)/Modules/mediastream/NavigatorUserMedia.idl \
227
    $(WebCore)/Modules/mediastream/OverconstrainedError.idl \
225
    $(WebCore)/Modules/mediastream/OverconstrainedError.idl \
228
    $(WebCore)/Modules/mediastream/OverconstrainedErrorEvent.idl \
226
    $(WebCore)/Modules/mediastream/OverconstrainedErrorEvent.idl \
229
    $(WebCore)/Modules/mediastream/RTCAnswerOptions.idl \
227
    $(WebCore)/Modules/mediastream/RTCAnswerOptions.idl \
Lines 1515-1521 CommandLineAPIModuleSource.h : CommandLineAPIModuleSource.js a/Source/WebCore/DerivedSources.make_sec2
1515
# WebCore JS Builtins
1513
# WebCore JS Builtins
1516
1514
1517
WebCore_BUILTINS_SOURCES = \
1515
WebCore_BUILTINS_SOURCES = \
1518
    $(WebCore)/Modules/mediastream/NavigatorUserMedia.js \
1519
    $(WebCore)/Modules/mediastream/RTCPeerConnection.js \
1516
    $(WebCore)/Modules/mediastream/RTCPeerConnection.js \
1520
    $(WebCore)/Modules/mediastream/RTCPeerConnectionInternals.js \
1517
    $(WebCore)/Modules/mediastream/RTCPeerConnectionInternals.js \
1521
    $(WebCore)/Modules/streams/ByteLengthQueuingStrategy.js \
1518
    $(WebCore)/Modules/streams/ByteLengthQueuingStrategy.js \
- a/Source/WebCore/Modules/mediastream/MediaStreamEvent.cpp -71 lines
Lines 1-71 a/Source/WebCore/Modules/mediastream/MediaStreamEvent.cpp_sec1
1
/*
2
 * Copyright (C) 2011 Google Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1.  Redistributions of source code must retain the above copyright
8
 *     notice, this list of conditions and the following disclaimer.
9
 * 2.  Redistributions in binary form must reproduce the above copyright
10
 *     notice, this list of conditions and the following disclaimer in the
11
 *     documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
14
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16
 * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
17
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20
 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
22
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
 */
24
25
#include "config.h"
26
#include "MediaStreamEvent.h"
27
28
#if ENABLE(WEB_RTC)
29
30
#include "MediaStream.h"
31
32
namespace WebCore {
33
34
Ref<MediaStreamEvent> MediaStreamEvent::create(const AtomicString& type, CanBubble canBubble, IsCancelable cancelable, RefPtr<MediaStream>&& stream)
35
{
36
    return adoptRef(*new MediaStreamEvent(type, canBubble, cancelable, WTFMove(stream)));
37
}
38
39
Ref<MediaStreamEvent> MediaStreamEvent::create(const AtomicString& type, const Init& initializer, IsTrusted isTrusted)
40
{
41
    return adoptRef(*new MediaStreamEvent(type, initializer, isTrusted));
42
}
43
44
MediaStreamEvent::MediaStreamEvent(const AtomicString& type, CanBubble canBubble, IsCancelable cancelable, RefPtr<MediaStream>&& stream)
45
    : Event(type, canBubble, cancelable)
46
    , m_stream(WTFMove(stream))
47
{
48
}
49
50
MediaStreamEvent::MediaStreamEvent(const AtomicString& type, const Init& initializer, IsTrusted isTrusted)
51
    : Event(type, initializer, isTrusted)
52
    , m_stream(initializer.stream)
53
{
54
}
55
56
MediaStreamEvent::~MediaStreamEvent() = default;
57
58
MediaStream* MediaStreamEvent::stream() const
59
{
60
    return m_stream.get();
61
}
62
63
EventInterface MediaStreamEvent::eventInterface() const
64
{
65
    return MediaStreamEventInterfaceType;
66
}
67
68
} // namespace WebCore
69
70
#endif // ENABLE(WEB_RTC)
71
- a/Source/WebCore/Modules/mediastream/MediaStreamEvent.h -59 lines
Lines 1-59 a/Source/WebCore/Modules/mediastream/MediaStreamEvent.h_sec1
1
/*
2
 * Copyright (C) 2011 Google Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1.  Redistributions of source code must retain the above copyright
8
 *     notice, this list of conditions and the following disclaimer.
9
 * 2.  Redistributions in binary form must reproduce the above copyright
10
 *     notice, this list of conditions and the following disclaimer in the
11
 *     documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
14
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16
 * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
17
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20
 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
22
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
 */
24
25
#pragma once
26
27
#if ENABLE(WEB_RTC)
28
29
#include "Event.h"
30
#include "MediaStream.h"
31
#include <wtf/text/AtomicString.h>
32
33
namespace WebCore {
34
35
class MediaStreamEvent : public Event {
36
public:
37
    virtual ~MediaStreamEvent();
38
39
    static Ref<MediaStreamEvent> create(const AtomicString& type, CanBubble, IsCancelable, RefPtr<MediaStream>&&);
40
41
    struct Init : EventInit {
42
        RefPtr<MediaStream> stream;
43
    };
44
    static Ref<MediaStreamEvent> create(const AtomicString& type, const Init& initializer, IsTrusted = IsTrusted::No);
45
46
    MediaStream* stream() const;
47
48
    virtual EventInterface eventInterface() const;
49
50
private:
51
    MediaStreamEvent(const AtomicString& type, CanBubble, IsCancelable, RefPtr<MediaStream>&&);
52
    MediaStreamEvent(const AtomicString& type, const Init&, IsTrusted);
53
54
    RefPtr<MediaStream> m_stream;
55
};
56
57
} // namespace WebCore
58
59
#endif // ENABLE(WEB_RTC)
- a/Source/WebCore/Modules/mediastream/MediaStreamEvent.idl -35 lines
Lines 1-35 a/Source/WebCore/Modules/mediastream/MediaStreamEvent.idl_sec1
1
/*
2
 * Copyright (C) 2011 Google Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1.  Redistributions of source code must retain the above copyright
8
 *     notice, this list of conditions and the following disclaimer.
9
 * 2.  Redistributions in binary form must reproduce the above copyright
10
 *     notice, this list of conditions and the following disclaimer in the
11
 *     documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
14
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16
 * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
17
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20
 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
22
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
 */
24
25
[
26
    Conditional=WEB_RTC,
27
    Constructor(DOMString type, optional MediaStreamEventInit eventInitDict),
28
    EnabledAtRuntime=WebRTCLegacyAPI&MediaStream,
29
] interface MediaStreamEvent : Event {
30
    readonly attribute MediaStream? stream;
31
};
32
33
dictionary MediaStreamEventInit : EventInit {
34
    MediaStream? stream = null;
35
};
- a/Source/WebCore/Modules/mediastream/NavigatorUserMedia.idl -36 lines
Lines 1-36 a/Source/WebCore/Modules/mediastream/NavigatorUserMedia.idl_sec1
1
/*
2
* Copyright (C) 2017 Apple Inc. All rights reserved.
3
*
4
* Redistribution and use in source and binary forms, with or without
5
* modification, are permitted provided that the following conditions
6
* are met:
7
*
8
* 1. Redistributions of source code must retain the above copyright
9
*    notice, this list of conditions and the following disclaimer.
10
* 2. Redistributions in binary form must reproduce the above copyright
11
*    notice, this list of conditions and the following disclaimer
12
*    in the documentation and/or other materials provided with the
13
*    distribution.
14
* 3. Neither the name of Ericsson nor the names of its contributors
15
*    may be used to endorse or promote products derived from this
16
*    software without specific prior written permission.
17
*
18
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
*/
30
31
[
32
    Conditional=MEDIA_STREAM&WEB_RTC,
33
    EnabledAtRuntime=WebRTCLegacyAPI&MediaDevices,
34
] partial interface Navigator {
35
    [JSBuiltin] void getUserMedia(MediaStreamConstraints constraints, NavigatorUserMediaSuccessCallback successCallback, NavigatorUserMediaErrorCallback errorCallback);
36
};
- a/Source/WebCore/Modules/mediastream/NavigatorUserMedia.js -49 lines
Lines 1-49 a/Source/WebCore/Modules/mediastream/NavigatorUserMedia.js_sec1
1
/*
2
 * Copyright (C) 2015 Canon Inc.
3
 * Copyright (C) 2017 Apple Inc. All rights reserved.
4
 *
5
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions
7
 * are met:
8
 * 1. Redistributions of source code must retain the above copyright
9
 *    notice, this list of conditions and the following disclaimer.
10
 * 2. Redistributions in binary form must reproduce the above copyright
11
 *    notice, this list of conditions and the following disclaimer in the
12
 *    documentation and/or other materials provided with the distribution.
13
 *
14
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
15
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
18
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
21
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
22
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25
 */
26
27
// @conditional=ENABLE(MEDIA_STREAM)
28
29
function getUserMedia(options, successCallback, errorCallback)
30
{
31
    "use strict";
32
33
    // FIXME: We should raise a DOM unsupported exception if there is no navigator and properly detect whether method is not called on a Navigator object.
34
    if (!(this.mediaDevices && this.mediaDevices.@getUserMedia))
35
        throw @makeThisTypeError("Navigator", "getUserMedia");
36
37
    if (arguments.length < 3)
38
        @throwTypeError("Not enough arguments");
39
40
    if (!@isObject(options))
41
        @throwTypeError("Argument 1 (options) to Navigator.getUserMedia must be an object");
42
43
    if (typeof successCallback !== "function")
44
        @throwTypeError("Argument 2 ('successCallback') to Navigator.getUserMedia must be a function");
45
    if (typeof errorCallback !== "function")
46
        @throwTypeError("Argument 3 ('errorCallback') to Navigator.getUserMedia must be a function");
47
48
    this.mediaDevices.@getUserMedia(options).@then(successCallback, errorCallback);
49
}
- a/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp +1 lines
Lines 37-42 a/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp_sec1
37
#include "EventNames.h"
37
#include "EventNames.h"
38
#include "JSRTCSessionDescription.h"
38
#include "JSRTCSessionDescription.h"
39
#include "Logging.h"
39
#include "Logging.h"
40
#include "Page.h"
40
#include "RTCIceCandidate.h"
41
#include "RTCIceCandidate.h"
41
#include "RTCPeerConnection.h"
42
#include "RTCPeerConnection.h"
42
#include "RTCPeerConnectionIceEvent.h"
43
#include "RTCPeerConnectionIceEvent.h"
- a/Source/WebCore/Modules/mediastream/PeerConnectionBackend.h -2 lines
Lines 98-105 public: a/Source/WebCore/Modules/mediastream/PeerConnectionBackend.h_sec1
98
98
99
    virtual void getStats(MediaStreamTrack*, Ref<DeferredPromise>&&) = 0;
99
    virtual void getStats(MediaStreamTrack*, Ref<DeferredPromise>&&) = 0;
100
100
101
    virtual Vector<RefPtr<MediaStream>> getRemoteStreams() const = 0;
102
103
    virtual Ref<RTCRtpReceiver> createReceiver(const String& transceiverMid, const String& trackKind, const String& trackId) = 0;
101
    virtual Ref<RTCRtpReceiver> createReceiver(const String& transceiverMid, const String& trackKind, const String& trackId) = 0;
104
    virtual void replaceTrack(RTCRtpSender&, RefPtr<MediaStreamTrack>&&, DOMPromiseDeferred<void>&&) = 0;
102
    virtual void replaceTrack(RTCRtpSender&, RefPtr<MediaStreamTrack>&&, DOMPromiseDeferred<void>&&) = 0;
105
    virtual bool notifyAddedTrack(RTCRtpSender&) { return false; }
103
    virtual bool notifyAddedTrack(RTCRtpSender&) { return false; }
- a/Source/WebCore/Modules/mediastream/RTCPeerConnection.h -3 lines
Lines 126-134 public: a/Source/WebCore/Modules/mediastream/RTCPeerConnection.h_sec1
126
    // 8.2 Statistics API
126
    // 8.2 Statistics API
127
    void getStats(MediaStreamTrack*, Ref<DeferredPromise>&&);
127
    void getStats(MediaStreamTrack*, Ref<DeferredPromise>&&);
128
128
129
    // Legacy MediaStream-based API, mostly implemented as JS built-ins
130
    Vector<RefPtr<MediaStream>> getRemoteStreams() const { return m_backend->getRemoteStreams(); }
131
132
    // EventTarget
129
    // EventTarget
133
    EventTargetInterface eventTargetInterface() const final { return RTCPeerConnectionEventTargetInterfaceType; }
130
    EventTargetInterface eventTargetInterface() const final { return RTCPeerConnectionEventTargetInterfaceType; }
134
    ScriptExecutionContext* scriptExecutionContext() const final { return ActiveDOMObject::scriptExecutionContext(); }
131
    ScriptExecutionContext* scriptExecutionContext() const final { return ActiveDOMObject::scriptExecutionContext(); }
- a/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl -15 / +3 lines
Lines 119-136 typedef RTCRtpTransceiverDirection RtpTransceiverDirection; a/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl_sec1
119
119
120
    // 5.1 RTCPeerConnection extensions
120
    // 5.1 RTCPeerConnection extensions
121
    // RTP Media API extensions
121
    // RTP Media API extensions
122
    [PrivateIdentifier, PublicIdentifier] sequence<RTCRtpSender> getSenders();
122
    sequence<RTCRtpSender> getSenders();
123
    sequence<RTCRtpReceiver> getReceivers();
123
    sequence<RTCRtpReceiver> getReceivers();
124
    sequence<RTCRtpTransceiver> getTransceivers();
124
    sequence<RTCRtpTransceiver> getTransceivers();
125
125
126
    [PrivateIdentifier, PublicIdentifier, MayThrowException] RTCRtpSender addTrack(MediaStreamTrack track, MediaStream... streams);
126
    [MayThrowException] RTCRtpSender addTrack(MediaStreamTrack track, MediaStream... streams);
127
    [PrivateIdentifier, PublicIdentifier, MayThrowException] void removeTrack(RTCRtpSender sender);
127
    [MayThrowException] void removeTrack(RTCRtpSender sender);
128
128
129
    [MayThrowException] RTCRtpTransceiver addTransceiver((MediaStreamTrack or DOMString) track, optional RTCRtpTransceiverInit init);
129
    [MayThrowException] RTCRtpTransceiver addTransceiver((MediaStreamTrack or DOMString) track, optional RTCRtpTransceiverInit init);
130
130
131
    attribute EventHandler ontrack;
131
    attribute EventHandler ontrack;
132
132
133
134
    // 6.1 Peer-to-peer data API
133
    // 6.1 Peer-to-peer data API
135
    // FIXME 169644: missing sctp
134
    // FIXME 169644: missing sctp
136
135
Lines 145-159 typedef RTCRtpTransceiverDirection RtpTransceiverDirection; a/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl_sec2
145
144
146
    // 9.6 Identity Provider API
145
    // 9.6 Identity Provider API
147
    // FIXME 169644: missing IdP
146
    // FIXME 169644: missing IdP
148
149
    // Legacy MediaStream API
150
    [JSBuiltin, EnabledAtRuntime=WebRTCLegacyAPI] sequence<MediaStream> getLocalStreams();
151
    [PrivateIdentifier, PublicIdentifier, EnabledAtRuntime=WebRTCLegacyAPI] sequence<MediaStream> getRemoteStreams();
152
    [JSBuiltin, EnabledAtRuntime=WebRTCLegacyAPI] MediaStream getStreamById(DOMString streamId);
153
154
    [JSBuiltin, EnabledAtRuntime=WebRTCLegacyAPI] void addStream(MediaStream stream);
155
    [JSBuiltin, EnabledAtRuntime=WebRTCLegacyAPI] void removeStream(MediaStream stream);
156
157
    // Legacy event handler (MediaStream-based API)
158
    [EnabledAtRuntime=WebRTCLegacyAPI] attribute EventHandler onaddstream;
159
};
147
};
- a/Source/WebCore/Modules/mediastream/RTCPeerConnection.js -115 lines
Lines 41-125 function initializeRTCPeerConnection(configuration) a/Source/WebCore/Modules/mediastream/RTCPeerConnection.js_sec1
41
41
42
    this.@initializeWith(configuration);
42
    this.@initializeWith(configuration);
43
    @putByIdDirectPrivate(this, "operations", []);
43
    @putByIdDirectPrivate(this, "operations", []);
44
    @putByIdDirectPrivate(this, "localStreams", []);
45
44
46
    return this;
45
    return this;
47
}
46
}
48
47
49
function getLocalStreams()
50
{
51
    "use strict";
52
53
    if (!@isRTCPeerConnection(this))
54
        throw @makeThisTypeError("RTCPeerConnection", "getLocalStreams");
55
56
    return @getByIdDirectPrivate(this, "localStreams").slice();
57
}
58
59
function getStreamById(streamIdArg)
60
{
61
    "use strict";
62
63
    if (!@isRTCPeerConnection(this))
64
        throw @makeThisTypeError("RTCPeerConnection", "getStreamById");
65
66
    if (arguments.length < 1)
67
        @throwTypeError("Not enough arguments");
68
69
    const streamId = @toString(streamIdArg);
70
71
    return @getByIdDirectPrivate(this, "localStreams").find(stream => stream.id === streamId)
72
        || this.@getRemoteStreams().find(stream => stream.id === streamId)
73
        || null;
74
}
75
76
function addStream(stream)
77
{
78
    "use strict";
79
80
    if (!@isRTCPeerConnection(this))
81
        throw @makeThisTypeError("RTCPeerConnection", "addStream");
82
83
    if (arguments.length < 1)
84
        @throwTypeError("Not enough arguments");
85
86
    if (!(stream instanceof @MediaStream))
87
        @throwTypeError("Argument 1 ('stream') to RTCPeerConnection.addStream must be an instance of MediaStream");
88
89
    if (@getByIdDirectPrivate(this, "localStreams").find(localStream => localStream.id === stream.id))
90
        return;
91
92
    @getByIdDirectPrivate(this, "localStreams").@push(stream);
93
    stream.@getTracks().forEach(track => this.@addTrack(track, stream));
94
}
95
96
function removeStream(stream)
97
{
98
    "use strict";
99
100
    if (!@isRTCPeerConnection(this))
101
        throw @makeThisTypeError("RTCPeerConnection", "removeStream");
102
103
    if (arguments.length < 1)
104
        @throwTypeError("Not enough arguments");
105
106
    if (!(stream instanceof @MediaStream))
107
        @throwTypeError("Argument 1 ('stream') to RTCPeerConnection.removeStream must be an instance of MediaStream");
108
109
    const indexOfStreamToRemove = @getByIdDirectPrivate(this, "localStreams").findIndex(localStream => localStream.id === stream.id);
110
    if (indexOfStreamToRemove === -1)
111
        return;
112
113
    const senders = this.@getSenders();
114
    @getByIdDirectPrivate(this, "localStreams")[indexOfStreamToRemove].@getTracks().forEach(track => {
115
        const senderForTrack = senders.find(sender => sender.track && sender.track.id === track.id);
116
        if (senderForTrack)
117
            this.@removeTrack(senderForTrack);
118
    });
119
120
    @getByIdDirectPrivate(this, "localStreams").splice(indexOfStreamToRemove, 1);
121
}
122
123
function createOffer()
48
function createOffer()
124
{
49
{
125
    "use strict";
50
    "use strict";
Lines 130-146 function createOffer() a/Source/WebCore/Modules/mediastream/RTCPeerConnection.js_sec2
130
    const peerConnection = this;
55
    const peerConnection = this;
131
56
132
    return @callbacksAndDictionaryOverload(arguments, "createOffer", function (options) {
57
    return @callbacksAndDictionaryOverload(arguments, "createOffer", function (options) {
133
        // Promise mode
134
        return @enqueueOperation(peerConnection, function () {
58
        return @enqueueOperation(peerConnection, function () {
135
            return peerConnection.@queuedCreateOffer(options);
59
            return peerConnection.@queuedCreateOffer(options);
136
        });
60
        });
137
    }, function (successCallback, errorCallback, options) {
138
        // Legacy callbacks mode
139
        @enqueueOperation(peerConnection, function () {
140
            return peerConnection.@queuedCreateOffer(options).@then(successCallback, errorCallback);
141
        });
142
143
        return @Promise.@resolve(@undefined);
144
    });
61
    });
145
}
62
}
146
63
Lines 154-170 function createAnswer() a/Source/WebCore/Modules/mediastream/RTCPeerConnection.js_sec3
154
    const peerConnection = this;
71
    const peerConnection = this;
155
72
156
    return @callbacksAndDictionaryOverload(arguments, "createAnswer", function (options) {
73
    return @callbacksAndDictionaryOverload(arguments, "createAnswer", function (options) {
157
        // Promise mode
158
        return @enqueueOperation(peerConnection, function () {
74
        return @enqueueOperation(peerConnection, function () {
159
            return peerConnection.@queuedCreateAnswer(options);
75
            return peerConnection.@queuedCreateAnswer(options);
160
        });
76
        });
161
    }, function (successCallback, errorCallback, options) {
162
        // Legacy callbacks mode
163
        @enqueueOperation(peerConnection, function () {
164
            return peerConnection.@queuedCreateAnswer(options).@then(successCallback, errorCallback);
165
        });
166
167
        return @Promise.@resolve(@undefined);
168
    });
77
    });
169
}
78
}
170
79
Lines 185-201 function setLocalDescription() a/Source/WebCore/Modules/mediastream/RTCPeerConnection.js_sec4
185
        "maybeDictionary": "true"
94
        "maybeDictionary": "true"
186
    };
95
    };
187
    return @objectAndCallbacksOverload(arguments, "setLocalDescription", objectInfo, function (description) {
96
    return @objectAndCallbacksOverload(arguments, "setLocalDescription", objectInfo, function (description) {
188
        // Promise mode
189
        return @enqueueOperation(peerConnection, function () {
97
        return @enqueueOperation(peerConnection, function () {
190
            return peerConnection.@queuedSetLocalDescription(description);
98
            return peerConnection.@queuedSetLocalDescription(description);
191
        });
99
        });
192
    }, function (description, successCallback, errorCallback) {
193
        // Legacy callbacks mode
194
        @enqueueOperation(peerConnection, function () {
195
            return peerConnection.@queuedSetLocalDescription(description).@then(successCallback, errorCallback);
196
        });
197
198
        return @Promise.@resolve(@undefined);
199
    });
100
    });
200
}
101
}
201
102
Lines 216-232 function setRemoteDescription() a/Source/WebCore/Modules/mediastream/RTCPeerConnection.js_sec5
216
        "maybeDictionary": "true"
117
        "maybeDictionary": "true"
217
    };
118
    };
218
    return @objectAndCallbacksOverload(arguments, "setRemoteDescription", objectInfo, function (description) {
119
    return @objectAndCallbacksOverload(arguments, "setRemoteDescription", objectInfo, function (description) {
219
        // Promise mode
220
        return @enqueueOperation(peerConnection, function () {
120
        return @enqueueOperation(peerConnection, function () {
221
            return peerConnection.@queuedSetRemoteDescription(description);
121
            return peerConnection.@queuedSetRemoteDescription(description);
222
        });
122
        });
223
    }, function (description, successCallback, errorCallback) {
224
        // Legacy callbacks mode
225
        @enqueueOperation(peerConnection, function () {
226
            return peerConnection.@queuedSetRemoteDescription(description).@then(successCallback, errorCallback);
227
        });
228
229
        return @Promise.@resolve(@undefined);
230
    });
123
    });
231
}
124
}
232
125
Lines 250-265 function addIceCandidate(candidate) a/Source/WebCore/Modules/mediastream/RTCPeerConnection.js_sec6
250
        "defaultsToNull" : "true"
143
        "defaultsToNull" : "true"
251
    };
144
    };
252
    return @objectAndCallbacksOverload(arguments, "addIceCandidate", objectInfo, function (candidate) {
145
    return @objectAndCallbacksOverload(arguments, "addIceCandidate", objectInfo, function (candidate) {
253
        // Promise mode
254
        return @enqueueOperation(peerConnection, function () {
146
        return @enqueueOperation(peerConnection, function () {
255
            return peerConnection.@queuedAddIceCandidate(candidate);
147
            return peerConnection.@queuedAddIceCandidate(candidate);
256
        });
148
        });
257
    }, function (candidate, successCallback, errorCallback) {
258
        // Legacy callbacks mode
259
        @enqueueOperation(peerConnection, function () {
260
            return peerConnection.@queuedAddIceCandidate(candidate).@then(successCallback, errorCallback);
261
        });
262
263
        return @Promise.@resolve(@undefined);
264
    });
149
    });
265
}
150
}
- a/Source/WebCore/Modules/mediastream/RTCPeerConnectionInternals.js -42 / +7 lines
Lines 54-60 function enqueueOperation(peerConnection, operation) a/Source/WebCore/Modules/mediastream/RTCPeerConnectionInternals.js_sec1
54
    });
54
    });
55
}
55
}
56
56
57
function objectAndCallbacksOverload(args, functionName, objectInfo, promiseMode, legacyMode)
57
function objectAndCallbacksOverload(args, functionName, objectInfo, promiseMode)
58
{
58
{
59
    "use strict";
59
    "use strict";
60
60
Lines 80-132 function objectAndCallbacksOverload(args, functionName, objectInfo, promiseMode, a/Source/WebCore/Modules/mediastream/RTCPeerConnectionInternals.js_sec2
80
    if (!objectArgOk)
80
    if (!objectArgOk)
81
        return @Promise.@reject(new @TypeError(`Argument 1 ('${objectInfo.argName}') to RTCPeerConnection.${functionName} must be an instance of ${objectInfo.argType}`));
81
        return @Promise.@reject(new @TypeError(`Argument 1 ('${objectInfo.argName}') to RTCPeerConnection.${functionName} must be an instance of ${objectInfo.argType}`));
82
82
83
    if (!@webRTCLegacyAPIEnabled() || argsCount === 1)
83
    return promiseMode(objectArg);
84
        return promiseMode(objectArg);
85
86
    // More than one argument: Legacy mode
87
    if (argsCount < 3)
88
        return @Promise.@reject(new @TypeError("Not enough arguments"));
89
90
    const successCallback = args[1];
91
    const errorCallback = args[2];
92
93
    if (typeof successCallback !== "function")
94
        return @Promise.@reject(new @TypeError(`Argument 2 ('successCallback') to RTCPeerConnection.${functionName} must be a function`));
95
96
    if (typeof errorCallback !== "function")
97
        return @Promise.@reject(new @TypeError(`Argument 3 ('errorCallback') to RTCPeerConnection.${functionName} must be a function`));
98
99
    return legacyMode(objectArg, successCallback, errorCallback);
100
}
84
}
101
85
102
function callbacksAndDictionaryOverload(args, functionName, promiseMode, legacyMode)
86
function callbacksAndDictionaryOverload(args, functionName, promiseMode)
103
{
87
{
104
    "use strict";
88
    "use strict";
105
89
106
    if (!@webRTCLegacyAPIEnabled() || args.length <= 1) {
90
    const options = args[0];
107
        // Zero or one arguments: Promise mode
91
    if (args.length && !@isDictionary(options))
108
        const options = args[0];
92
        return @Promise.@reject(new @TypeError(`Argument 1 ('options') to RTCPeerConnection.${functionName} must be a dictionary`));
109
        if (args.length && !@isDictionary(options))
110
            return @Promise.@reject(new @TypeError(`Argument 1 ('options') to RTCPeerConnection.${functionName} must be a dictionary`));
111
112
        return promiseMode(options);
113
    }
114
115
    // More than one argument: Legacy mode
116
    const successCallback = args[0];
117
    const errorCallback = args[1];
118
    const options = args[2];
119
120
    if (typeof successCallback !== "function")
121
        return @Promise.@reject(new @TypeError(`Argument 1 ('successCallback') to RTCPeerConnection.${functionName} must be a function`));
122
123
    if (typeof errorCallback !== "function")
124
        return @Promise.@reject(new @TypeError(`Argument 2 ('errorCallback') to RTCPeerConnection.${functionName} must be a function`));
125
126
    if (args.length > 2 && !@isDictionary(options))
127
        return @Promise.@reject(new @TypeError(`Argument 3 ('options') to RTCPeerConnection.${functionName} must be a dictionary`));
128
93
129
    return legacyMode(successCallback, errorCallback, args[2]);
94
    return promiseMode(options);
130
}
95
}
131
96
132
function isRTCPeerConnection(connection)
97
function isRTCPeerConnection(connection)
- a/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp -15 / +4 lines
Lines 33-39 a/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp_sec1
33
#include "LibWebRTCPeerConnectionBackend.h"
33
#include "LibWebRTCPeerConnectionBackend.h"
34
#include "LibWebRTCProvider.h"
34
#include "LibWebRTCProvider.h"
35
#include "Logging.h"
35
#include "Logging.h"
36
#include "MediaStreamEvent.h"
37
#include "NotImplemented.h"
36
#include "NotImplemented.h"
38
#include "Performance.h"
37
#include "Performance.h"
39
#include "PlatformStrategies.h"
38
#include "PlatformStrategies.h"
Lines 629-650 MediaStream& LibWebRTCMediaEndpoint::mediaStreamFromRTCStream(webrtc::MediaStrea a/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp_sec2
629
{
628
{
630
    auto mediaStream = m_streams.ensure(&rtcStream, [&rtcStream, this] {
629
    auto mediaStream = m_streams.ensure(&rtcStream, [&rtcStream, this] {
631
        auto label = rtcStream.id();
630
        auto label = rtcStream.id();
632
        auto stream = MediaStream::create(*m_peerConnectionBackend.connection().scriptExecutionContext(), MediaStreamPrivate::create({ }, fromStdString(label)));
631
        return MediaStream::create(*m_peerConnectionBackend.connection().scriptExecutionContext(), MediaStreamPrivate::create({ }, fromStdString(label)));
633
        auto streamPointer = stream.ptr();
634
        m_peerConnectionBackend.addRemoteStream(WTFMove(stream));
635
        return streamPointer;
636
    });
632
    });
637
    return *mediaStream.iterator->value;
633
    return *mediaStream.iterator->value;
638
}
634
}
639
635
640
void LibWebRTCMediaEndpoint::addRemoteStream(webrtc::MediaStreamInterface& rtcStream)
636
void LibWebRTCMediaEndpoint::addRemoteStream(webrtc::MediaStreamInterface&)
641
{
637
{
642
    if (!RuntimeEnabledFeatures::sharedFeatures().webRTCLegacyAPIEnabled())
643
        return;
644
645
    auto& mediaStream = mediaStreamFromRTCStream(rtcStream);
646
    m_peerConnectionBackend.connection().fireEvent(MediaStreamEvent::create(eventNames().addstreamEvent,
647
        Event::CanBubble::No, Event::IsCancelable::No, &mediaStream));
648
}
638
}
649
639
650
class RTCRtpReceiverBackend final : public RTCRtpReceiver::Backend {
640
class RTCRtpReceiverBackend final : public RTCRtpReceiver::Backend {
Lines 703-711 void LibWebRTCMediaEndpoint::addRemoteTrack(rtc::scoped_refptr<webrtc::RtpReceiv a/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp_sec3
703
693
704
void LibWebRTCMediaEndpoint::removeRemoteStream(webrtc::MediaStreamInterface& rtcStream)
694
void LibWebRTCMediaEndpoint::removeRemoteStream(webrtc::MediaStreamInterface& rtcStream)
705
{
695
{
706
    auto* mediaStream = m_streams.take(&rtcStream);
696
    bool removed = m_streams.remove(&rtcStream);
707
    if (mediaStream)
697
    ASSERT_UNUSED(removed, removed);
708
        m_peerConnectionBackend.removeRemoteStream(mediaStream);
709
}
698
}
710
699
711
void LibWebRTCMediaEndpoint::OnAddStream(rtc::scoped_refptr<webrtc::MediaStreamInterface> stream)
700
void LibWebRTCMediaEndpoint::OnAddStream(rtc::scoped_refptr<webrtc::MediaStreamInterface> stream)
- a/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h -1 / +1 lines
Lines 217-223 private: a/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h_sec1
217
    CreateSessionDescriptionObserver m_createSessionDescriptionObserver;
217
    CreateSessionDescriptionObserver m_createSessionDescriptionObserver;
218
    SetLocalSessionDescriptionObserver m_setLocalSessionDescriptionObserver;
218
    SetLocalSessionDescriptionObserver m_setLocalSessionDescriptionObserver;
219
    SetRemoteSessionDescriptionObserver m_setRemoteSessionDescriptionObserver;
219
    SetRemoteSessionDescriptionObserver m_setRemoteSessionDescriptionObserver;
220
    HashMap<webrtc::MediaStreamInterface*, MediaStream*> m_streams;
220
    HashMap<webrtc::MediaStreamInterface*, RefPtr<MediaStream>> m_streams;
221
    HashMap<RTCRtpSender*, rtc::scoped_refptr<webrtc::RtpSenderInterface>> m_senders;
221
    HashMap<RTCRtpSender*, rtc::scoped_refptr<webrtc::RtpSenderInterface>> m_senders;
222
222
223
    bool m_isInitiator { false };
223
    bool m_isInitiator { false };
- a/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp -13 lines
Lines 201-207 void LibWebRTCPeerConnectionBackend::doStop() a/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp_sec1
201
    m_audioSources.clear();
201
    m_audioSources.clear();
202
    m_videoSources.clear();
202
    m_videoSources.clear();
203
    m_statsPromises.clear();
203
    m_statsPromises.clear();
204
    m_remoteStreams.clear();
205
    m_pendingReceivers.clear();
204
    m_pendingReceivers.clear();
206
}
205
}
207
206
Lines 360-377 void LibWebRTCPeerConnectionBackend::notifyRemovedTrack(RTCRtpSender& sender) a/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp_sec2
360
    m_endpoint->removeTrack(sender);
359
    m_endpoint->removeTrack(sender);
361
}
360
}
362
361
363
void LibWebRTCPeerConnectionBackend::removeRemoteStream(MediaStream* mediaStream)
364
{
365
    m_remoteStreams.removeFirstMatching([mediaStream](const auto& item) {
366
        return item.get() == mediaStream;
367
    });
368
}
369
370
void LibWebRTCPeerConnectionBackend::addRemoteStream(Ref<MediaStream>&& mediaStream)
371
{
372
    m_remoteStreams.append(WTFMove(mediaStream));
373
}
374
375
template<typename Source>
362
template<typename Source>
376
static inline bool updateTrackSource(Source& source, MediaStreamTrack* track)
363
static inline bool updateTrackSource(Source& source, MediaStreamTrack* track)
377
{
364
{
- a/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h -6 lines
Lines 88-97 private: a/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h_sec1
88
    void getStatsSucceeded(const DeferredPromise&, Ref<RTCStatsReport>&&);
88
    void getStatsSucceeded(const DeferredPromise&, Ref<RTCStatsReport>&&);
89
    void getStatsFailed(const DeferredPromise&, Exception&&);
89
    void getStatsFailed(const DeferredPromise&, Exception&&);
90
90
91
    Vector<RefPtr<MediaStream>> getRemoteStreams() const final { return m_remoteStreams; }
92
    void removeRemoteStream(MediaStream*);
93
    void addRemoteStream(Ref<MediaStream>&&);
94
95
    bool notifyAddedTrack(RTCRtpSender&) final;
91
    bool notifyAddedTrack(RTCRtpSender&) final;
96
    void notifyRemovedTrack(RTCRtpSender&) final;
92
    void notifyRemovedTrack(RTCRtpSender&) final;
97
93
Lines 113-120 private: a/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h_sec2
113
    bool m_isLocalDescriptionSet { false };
109
    bool m_isLocalDescriptionSet { false };
114
    bool m_isRemoteDescriptionSet { false };
110
    bool m_isRemoteDescriptionSet { false };
115
111
116
    // FIXME: Make m_remoteStreams a Vector of Ref.
117
    Vector<RefPtr<MediaStream>> m_remoteStreams;
118
    Vector<std::unique_ptr<webrtc::IceCandidateInterface>> m_pendingCandidates;
112
    Vector<std::unique_ptr<webrtc::IceCandidateInterface>> m_pendingCandidates;
119
    Vector<Ref<RealtimeOutgoingAudioSource>> m_audioSources;
113
    Vector<Ref<RealtimeOutgoingAudioSource>> m_audioSources;
120
    Vector<Ref<RealtimeOutgoingVideoSource>> m_videoSources;
114
    Vector<Ref<RealtimeOutgoingVideoSource>> m_videoSources;
- a/Source/WebCore/Sources.txt -3 lines
Lines 159-165 Modules/mediastream/MediaDevices.cpp a/Source/WebCore/Sources.txt_sec1
159
Modules/mediastream/MediaDevicesEnumerationRequest.cpp
159
Modules/mediastream/MediaDevicesEnumerationRequest.cpp
160
Modules/mediastream/MediaDevicesRequest.cpp
160
Modules/mediastream/MediaDevicesRequest.cpp
161
Modules/mediastream/MediaStream.cpp
161
Modules/mediastream/MediaStream.cpp
162
Modules/mediastream/MediaStreamEvent.cpp
163
Modules/mediastream/MediaStreamRegistry.cpp
162
Modules/mediastream/MediaStreamRegistry.cpp
164
Modules/mediastream/MediaStreamTrack.cpp
163
Modules/mediastream/MediaStreamTrack.cpp
165
Modules/mediastream/MediaStreamTrackEvent.cpp
164
Modules/mediastream/MediaStreamTrackEvent.cpp
Lines 2757-2763 JSMediaSource.cpp a/Source/WebCore/Sources.txt_sec2
2757
JSMediaStream.cpp
2756
JSMediaStream.cpp
2758
JSMediaStreamAudioDestinationNode.cpp
2757
JSMediaStreamAudioDestinationNode.cpp
2759
JSMediaStreamAudioSourceNode.cpp
2758
JSMediaStreamAudioSourceNode.cpp
2760
JSMediaStreamEvent.cpp
2761
JSMediaStreamTrack.cpp
2759
JSMediaStreamTrack.cpp
2762
JSMediaStreamTrackEvent.cpp
2760
JSMediaStreamTrackEvent.cpp
2763
JSMediaTrackConstraints.cpp
2761
JSMediaTrackConstraints.cpp
Lines 2784-2790 JSNavigatorMediaCapabilities.cpp a/Source/WebCore/Sources.txt_sec3
2784
JSNavigatorMediaDevices.cpp
2782
JSNavigatorMediaDevices.cpp
2785
JSNavigatorOnLine.cpp
2783
JSNavigatorOnLine.cpp
2786
JSNavigatorServiceWorker.cpp
2784
JSNavigatorServiceWorker.cpp
2787
JSNavigatorUserMedia.cpp
2788
JSNavigatorWebDriver.cpp
2785
JSNavigatorWebDriver.cpp
2789
JSNavigatorWebVR.cpp
2786
JSNavigatorWebVR.cpp
2790
JSNode.cpp
2787
JSNode.cpp
- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj -24 lines
Lines 101-107 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec1
101
		07277E4D17D018CC0015534D /* JSMediaStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 07277E4117D018CC0015534D /* JSMediaStream.h */; };
101
		07277E4D17D018CC0015534D /* JSMediaStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 07277E4117D018CC0015534D /* JSMediaStream.h */; };
102
		07277E4D17D018CC0015534E /* JSCanvasCaptureMediaStreamTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = 07277E4117D018CC0015534E /* JSCanvasCaptureMediaStreamTrack.h */; };
102
		07277E4D17D018CC0015534E /* JSCanvasCaptureMediaStreamTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = 07277E4117D018CC0015534E /* JSCanvasCaptureMediaStreamTrack.h */; };
103
		07277E4F17D018CC0015534D /* JSMediaStreamAudioDestinationNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 07277E4317D018CC0015534D /* JSMediaStreamAudioDestinationNode.h */; };
103
		07277E4F17D018CC0015534D /* JSMediaStreamAudioDestinationNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 07277E4317D018CC0015534D /* JSMediaStreamAudioDestinationNode.h */; };
104
		07277E5117D018CC0015534D /* JSMediaStreamEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 07277E4517D018CC0015534D /* JSMediaStreamEvent.h */; };
105
		07277E5317D018CC0015534D /* JSMediaStreamTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = 07277E4717D018CC0015534D /* JSMediaStreamTrack.h */; };
104
		07277E5317D018CC0015534D /* JSMediaStreamTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = 07277E4717D018CC0015534D /* JSMediaStreamTrack.h */; };
106
		07277E5517D018CC0015534D /* JSMediaStreamTrackEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 07277E4917D018CC0015534D /* JSMediaStreamTrackEvent.h */; };
105
		07277E5517D018CC0015534D /* JSMediaStreamTrackEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 07277E4917D018CC0015534D /* JSMediaStreamTrackEvent.h */; };
107
		072A70401D6E8F6200DF0AFC /* OverconstrainedErrorEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 072A703E1D6E8F6200DF0AFC /* OverconstrainedErrorEvent.h */; };
106
		072A70401D6E8F6200DF0AFC /* OverconstrainedErrorEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 072A703E1D6E8F6200DF0AFC /* OverconstrainedErrorEvent.h */; };
Lines 119-125 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec2
119
		073B87671E4385AC0071C0EC /* AudioSampleBufferList.h in Headers */ = {isa = PBXBuildFile; fileRef = 073B87631E43859D0071C0EC /* AudioSampleBufferList.h */; };
118
		073B87671E4385AC0071C0EC /* AudioSampleBufferList.h in Headers */ = {isa = PBXBuildFile; fileRef = 073B87631E43859D0071C0EC /* AudioSampleBufferList.h */; };
120
		073B87691E4385AC0071C0EC /* AudioSampleDataSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 073B87651E43859D0071C0EC /* AudioSampleDataSource.h */; };
119
		073B87691E4385AC0071C0EC /* AudioSampleDataSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 073B87651E43859D0071C0EC /* AudioSampleDataSource.h */; };
121
		073BDC051F68436100EE34ED /* TrackPrivateBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 076E11BE1F683E0D00177395 /* TrackPrivateBase.cpp */; };
120
		073BDC051F68436100EE34ED /* TrackPrivateBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 076E11BE1F683E0D00177395 /* TrackPrivateBase.cpp */; };
122
		073BE34117D17E01002BD431 /* JSNavigatorUserMedia.h in Headers */ = {isa = PBXBuildFile; fileRef = 073BE33F17D17E01002BD431 /* JSNavigatorUserMedia.h */; settings = {ATTRIBUTES = (Private, ); }; };
123
		074E82BB18A69F0E007EF54C /* PlatformTimeRanges.h in Headers */ = {isa = PBXBuildFile; fileRef = 074E82B918A69F0E007EF54C /* PlatformTimeRanges.h */; settings = {ATTRIBUTES = (Private, ); }; };
121
		074E82BB18A69F0E007EF54C /* PlatformTimeRanges.h in Headers */ = {isa = PBXBuildFile; fileRef = 074E82B918A69F0E007EF54C /* PlatformTimeRanges.h */; settings = {ATTRIBUTES = (Private, ); }; };
124
		0753860214489E9800B78452 /* CachedTextTrack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0753860014489E9800B78452 /* CachedTextTrack.cpp */; };
122
		0753860214489E9800B78452 /* CachedTextTrack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0753860014489E9800B78452 /* CachedTextTrack.cpp */; };
125
		0753860314489E9800B78452 /* CachedTextTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = 0753860114489E9800B78452 /* CachedTextTrack.h */; };
123
		0753860314489E9800B78452 /* CachedTextTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = 0753860114489E9800B78452 /* CachedTextTrack.h */; };
Lines 139-145 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec3
139
		07846385145B1B8E00A58DF1 /* JSTrackCustom.h in Headers */ = {isa = PBXBuildFile; fileRef = 07846384145B1B8E00A58DF1 /* JSTrackCustom.h */; };
137
		07846385145B1B8E00A58DF1 /* JSTrackCustom.h in Headers */ = {isa = PBXBuildFile; fileRef = 07846384145B1B8E00A58DF1 /* JSTrackCustom.h */; };
140
		0787C46A1BFBDF6F006DCD7F /* JSMediaTrackSupportedConstraints.h in Headers */ = {isa = PBXBuildFile; fileRef = 0787C4681BFBDF6F006DCD7F /* JSMediaTrackSupportedConstraints.h */; };
138
		0787C46A1BFBDF6F006DCD7F /* JSMediaTrackSupportedConstraints.h in Headers */ = {isa = PBXBuildFile; fileRef = 0787C4681BFBDF6F006DCD7F /* JSMediaTrackSupportedConstraints.h */; };
141
		078E091517D14D1C00420AA1 /* MediaStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B4D17CEC32700848E51 /* MediaStream.h */; };
139
		078E091517D14D1C00420AA1 /* MediaStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B4D17CEC32700848E51 /* MediaStream.h */; };
142
		078E091617D14D1C00420AA1 /* MediaStreamEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B5017CEC32700848E51 /* MediaStreamEvent.h */; };
143
		078E091717D14D1C00420AA1 /* MediaStreamRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B5317CEC32700848E51 /* MediaStreamRegistry.h */; settings = {ATTRIBUTES = (Private, ); }; };
140
		078E091717D14D1C00420AA1 /* MediaStreamRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B5317CEC32700848E51 /* MediaStreamRegistry.h */; settings = {ATTRIBUTES = (Private, ); }; };
144
		078E091817D14D1C00420AA1 /* MediaStreamTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B5517CEC32700848E51 /* MediaStreamTrack.h */; settings = {ATTRIBUTES = (Private, ); }; };
141
		078E091817D14D1C00420AA1 /* MediaStreamTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B5517CEC32700848E51 /* MediaStreamTrack.h */; settings = {ATTRIBUTES = (Private, ); }; };
145
		078E091917D14D1C00420AA1 /* MediaStreamTrackEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B5817CEC32700848E51 /* MediaStreamTrackEvent.h */; settings = {ATTRIBUTES = (Private, ); }; };
142
		078E091917D14D1C00420AA1 /* MediaStreamTrackEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B5817CEC32700848E51 /* MediaStreamTrackEvent.h */; settings = {ATTRIBUTES = (Private, ); }; };
Lines 5218-5226 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec4
5218
		07221B4C17CEC32700848E51 /* MediaStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaStream.cpp; sourceTree = "<group>"; };
5215
		07221B4C17CEC32700848E51 /* MediaStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaStream.cpp; sourceTree = "<group>"; };
5219
		07221B4D17CEC32700848E51 /* MediaStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaStream.h; sourceTree = "<group>"; };
5216
		07221B4D17CEC32700848E51 /* MediaStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaStream.h; sourceTree = "<group>"; };
5220
		07221B4E17CEC32700848E51 /* MediaStream.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaStream.idl; sourceTree = "<group>"; };
5217
		07221B4E17CEC32700848E51 /* MediaStream.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaStream.idl; sourceTree = "<group>"; };
5221
		07221B4F17CEC32700848E51 /* MediaStreamEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaStreamEvent.cpp; sourceTree = "<group>"; };
5222
		07221B5017CEC32700848E51 /* MediaStreamEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaStreamEvent.h; sourceTree = "<group>"; };
5223
		07221B5117CEC32700848E51 /* MediaStreamEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaStreamEvent.idl; sourceTree = "<group>"; };
5224
		07221B5217CEC32700848E51 /* MediaStreamRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaStreamRegistry.cpp; sourceTree = "<group>"; };
5218
		07221B5217CEC32700848E51 /* MediaStreamRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaStreamRegistry.cpp; sourceTree = "<group>"; };
5225
		07221B5317CEC32700848E51 /* MediaStreamRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaStreamRegistry.h; sourceTree = "<group>"; };
5219
		07221B5317CEC32700848E51 /* MediaStreamRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaStreamRegistry.h; sourceTree = "<group>"; };
5226
		07221B5417CEC32700848E51 /* MediaStreamTrack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaStreamTrack.cpp; sourceTree = "<group>"; };
5220
		07221B5417CEC32700848E51 /* MediaStreamTrack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaStreamTrack.cpp; sourceTree = "<group>"; };
Lines 5229-5235 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec5
5229
		07221B5717CEC32700848E51 /* MediaStreamTrackEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaStreamTrackEvent.cpp; sourceTree = "<group>"; };
5223
		07221B5717CEC32700848E51 /* MediaStreamTrackEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaStreamTrackEvent.cpp; sourceTree = "<group>"; };
5230
		07221B5817CEC32700848E51 /* MediaStreamTrackEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaStreamTrackEvent.h; sourceTree = "<group>"; };
5224
		07221B5817CEC32700848E51 /* MediaStreamTrackEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaStreamTrackEvent.h; sourceTree = "<group>"; };
5231
		07221B5917CEC32700848E51 /* MediaStreamTrackEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaStreamTrackEvent.idl; sourceTree = "<group>"; };
5225
		07221B5917CEC32700848E51 /* MediaStreamTrackEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaStreamTrackEvent.idl; sourceTree = "<group>"; };
5232
		07221B5C17CEC32700848E51 /* NavigatorUserMedia.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NavigatorUserMedia.idl; sourceTree = "<group>"; };
5233
		07221B6317CEC32700848E51 /* RTCDataChannel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RTCDataChannel.cpp; sourceTree = "<group>"; };
5226
		07221B6317CEC32700848E51 /* RTCDataChannel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RTCDataChannel.cpp; sourceTree = "<group>"; };
5234
		07221B6417CEC32700848E51 /* RTCDataChannel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCDataChannel.h; sourceTree = "<group>"; };
5227
		07221B6417CEC32700848E51 /* RTCDataChannel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCDataChannel.h; sourceTree = "<group>"; };
5235
		07221B6517CEC32700848E51 /* RTCDataChannel.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RTCDataChannel.idl; sourceTree = "<group>"; };
5228
		07221B6517CEC32700848E51 /* RTCDataChannel.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RTCDataChannel.idl; sourceTree = "<group>"; };
Lines 5280-5287 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec6
5280
		07277E4117D018CC0015534E /* JSCanvasCaptureMediaStreamTrack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCanvasCaptureMediaStreamTrack.h; sourceTree = "<group>"; };
5273
		07277E4117D018CC0015534E /* JSCanvasCaptureMediaStreamTrack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCanvasCaptureMediaStreamTrack.h; sourceTree = "<group>"; };
5281
		07277E4217D018CC0015534D /* JSMediaStreamAudioDestinationNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaStreamAudioDestinationNode.cpp; sourceTree = "<group>"; };
5274
		07277E4217D018CC0015534D /* JSMediaStreamAudioDestinationNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaStreamAudioDestinationNode.cpp; sourceTree = "<group>"; };
5282
		07277E4317D018CC0015534D /* JSMediaStreamAudioDestinationNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaStreamAudioDestinationNode.h; sourceTree = "<group>"; };
5275
		07277E4317D018CC0015534D /* JSMediaStreamAudioDestinationNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaStreamAudioDestinationNode.h; sourceTree = "<group>"; };
5283
		07277E4417D018CC0015534D /* JSMediaStreamEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaStreamEvent.cpp; sourceTree = "<group>"; };
5284
		07277E4517D018CC0015534D /* JSMediaStreamEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaStreamEvent.h; sourceTree = "<group>"; };
5285
		07277E4617D018CC0015534D /* JSMediaStreamTrack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaStreamTrack.cpp; sourceTree = "<group>"; };
5276
		07277E4617D018CC0015534D /* JSMediaStreamTrack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaStreamTrack.cpp; sourceTree = "<group>"; };
5286
		07277E4717D018CC0015534D /* JSMediaStreamTrack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaStreamTrack.h; sourceTree = "<group>"; };
5277
		07277E4717D018CC0015534D /* JSMediaStreamTrack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaStreamTrack.h; sourceTree = "<group>"; };
5287
		07277E4817D018CC0015534D /* JSMediaStreamTrackEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaStreamTrackEvent.cpp; sourceTree = "<group>"; };
5278
		07277E4817D018CC0015534D /* JSMediaStreamTrackEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaStreamTrackEvent.cpp; sourceTree = "<group>"; };
Lines 5316-5323 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec7
5316
		073B87631E43859D0071C0EC /* AudioSampleBufferList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioSampleBufferList.h; sourceTree = "<group>"; };
5307
		073B87631E43859D0071C0EC /* AudioSampleBufferList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioSampleBufferList.h; sourceTree = "<group>"; };
5317
		073B87641E43859D0071C0EC /* AudioSampleDataSource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AudioSampleDataSource.mm; sourceTree = "<group>"; };
5308
		073B87641E43859D0071C0EC /* AudioSampleDataSource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AudioSampleDataSource.mm; sourceTree = "<group>"; };
5318
		073B87651E43859D0071C0EC /* AudioSampleDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioSampleDataSource.h; sourceTree = "<group>"; };
5309
		073B87651E43859D0071C0EC /* AudioSampleDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioSampleDataSource.h; sourceTree = "<group>"; };
5319
		073BE33E17D17E01002BD431 /* JSNavigatorUserMedia.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSNavigatorUserMedia.cpp; sourceTree = "<group>"; };
5320
		073BE33F17D17E01002BD431 /* JSNavigatorUserMedia.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSNavigatorUserMedia.h; sourceTree = "<group>"; };
5321
		0744ECEB1E0C4AE5000D0944 /* MockRealtimeAudioSourceMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MockRealtimeAudioSourceMac.h; sourceTree = "<group>"; };
5310
		0744ECEB1E0C4AE5000D0944 /* MockRealtimeAudioSourceMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MockRealtimeAudioSourceMac.h; sourceTree = "<group>"; };
5322
		0744ECEC1E0C4AE5000D0944 /* MockRealtimeAudioSourceMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MockRealtimeAudioSourceMac.mm; sourceTree = "<group>"; };
5311
		0744ECEC1E0C4AE5000D0944 /* MockRealtimeAudioSourceMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MockRealtimeAudioSourceMac.mm; sourceTree = "<group>"; };
5323
		074E82B818A69F0E007EF54C /* PlatformTimeRanges.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformTimeRanges.cpp; sourceTree = "<group>"; };
5312
		074E82B818A69F0E007EF54C /* PlatformTimeRanges.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformTimeRanges.cpp; sourceTree = "<group>"; };
Lines 7290-7296 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec8
7290
		419BC2DC1685329900D64D6D /* VisitedLinkState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VisitedLinkState.cpp; sourceTree = "<group>"; };
7279
		419BC2DC1685329900D64D6D /* VisitedLinkState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VisitedLinkState.cpp; sourceTree = "<group>"; };
7291
		419BC2DD1685329900D64D6D /* VisitedLinkState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VisitedLinkState.h; sourceTree = "<group>"; };
7280
		419BC2DD1685329900D64D6D /* VisitedLinkState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VisitedLinkState.h; sourceTree = "<group>"; };
7292
		419BE7521BC7F3DB00E1C85B /* WebCoreBuiltinNames.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreBuiltinNames.h; sourceTree = "<group>"; };
7281
		419BE7521BC7F3DB00E1C85B /* WebCoreBuiltinNames.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreBuiltinNames.h; sourceTree = "<group>"; };
7293
		419BE75A1BCBD3ED00E1C85B /* NavigatorUserMedia.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = NavigatorUserMedia.js; sourceTree = "<group>"; };
7294
		419FAFAD1ABABCD5005B3572 /* ReadableStreamBYOBReader.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReadableStreamBYOBReader.idl; sourceTree = "<group>"; };
7282
		419FAFAD1ABABCD5005B3572 /* ReadableStreamBYOBReader.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReadableStreamBYOBReader.idl; sourceTree = "<group>"; };
7295
		419FAFAD1ABABCD5005B828B /* ReadableStreamDefaultReader.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReadableStreamDefaultReader.idl; sourceTree = "<group>"; };
7283
		419FAFAD1ABABCD5005B828B /* ReadableStreamDefaultReader.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReadableStreamDefaultReader.idl; sourceTree = "<group>"; };
7296
		41A023ED1A39DB7900F722CF /* ReadableStream.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReadableStream.idl; sourceTree = "<group>"; };
7284
		41A023ED1A39DB7900F722CF /* ReadableStream.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReadableStream.idl; sourceTree = "<group>"; };
Lines 15037-15045 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec9
15037
				07221B4C17CEC32700848E51 /* MediaStream.cpp */,
15025
				07221B4C17CEC32700848E51 /* MediaStream.cpp */,
15038
				07221B4D17CEC32700848E51 /* MediaStream.h */,
15026
				07221B4D17CEC32700848E51 /* MediaStream.h */,
15039
				07221B4E17CEC32700848E51 /* MediaStream.idl */,
15027
				07221B4E17CEC32700848E51 /* MediaStream.idl */,
15040
				07221B4F17CEC32700848E51 /* MediaStreamEvent.cpp */,
15041
				07221B5017CEC32700848E51 /* MediaStreamEvent.h */,
15042
				07221B5117CEC32700848E51 /* MediaStreamEvent.idl */,
15043
				07221B5217CEC32700848E51 /* MediaStreamRegistry.cpp */,
15028
				07221B5217CEC32700848E51 /* MediaStreamRegistry.cpp */,
15044
				07221B5317CEC32700848E51 /* MediaStreamRegistry.h */,
15029
				07221B5317CEC32700848E51 /* MediaStreamRegistry.h */,
15045
				07221B5417CEC32700848E51 /* MediaStreamTrack.cpp */,
15030
				07221B5417CEC32700848E51 /* MediaStreamTrack.cpp */,
Lines 15056-15063 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec10
15056
				5EA725CA1ACABCB500EAD17B /* NavigatorMediaDevices.cpp */,
15041
				5EA725CA1ACABCB500EAD17B /* NavigatorMediaDevices.cpp */,
15057
				5EA725CB1ACABCB500EAD17B /* NavigatorMediaDevices.h */,
15042
				5EA725CB1ACABCB500EAD17B /* NavigatorMediaDevices.h */,
15058
				5EA725CC1ACABCB500EAD17B /* NavigatorMediaDevices.idl */,
15043
				5EA725CC1ACABCB500EAD17B /* NavigatorMediaDevices.idl */,
15059
				07221B5C17CEC32700848E51 /* NavigatorUserMedia.idl */,
15060
				419BE75A1BCBD3ED00E1C85B /* NavigatorUserMedia.js */,
15061
				0704A4051D6DE9F10086DCDB /* OverconstrainedError.h */,
15044
				0704A4051D6DE9F10086DCDB /* OverconstrainedError.h */,
15062
				0704A4031D6DE9F10086DCDB /* OverconstrainedError.idl */,
15045
				0704A4031D6DE9F10086DCDB /* OverconstrainedError.idl */,
15063
				072A703E1D6E8F6200DF0AFC /* OverconstrainedErrorEvent.h */,
15046
				072A703E1D6E8F6200DF0AFC /* OverconstrainedErrorEvent.h */,
Lines 15310-15317 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec11
15310
				07277E4117D018CC0015534D /* JSMediaStream.h */,
15293
				07277E4117D018CC0015534D /* JSMediaStream.h */,
15311
				07277E4217D018CC0015534D /* JSMediaStreamAudioDestinationNode.cpp */,
15294
				07277E4217D018CC0015534D /* JSMediaStreamAudioDestinationNode.cpp */,
15312
				07277E4317D018CC0015534D /* JSMediaStreamAudioDestinationNode.h */,
15295
				07277E4317D018CC0015534D /* JSMediaStreamAudioDestinationNode.h */,
15313
				07277E4417D018CC0015534D /* JSMediaStreamEvent.cpp */,
15314
				07277E4517D018CC0015534D /* JSMediaStreamEvent.h */,
15315
				07277E4617D018CC0015534D /* JSMediaStreamTrack.cpp */,
15296
				07277E4617D018CC0015534D /* JSMediaStreamTrack.cpp */,
15316
				07277E4717D018CC0015534D /* JSMediaStreamTrack.h */,
15297
				07277E4717D018CC0015534D /* JSMediaStreamTrack.h */,
15317
				07277E4817D018CC0015534D /* JSMediaStreamTrackEvent.cpp */,
15298
				07277E4817D018CC0015534D /* JSMediaStreamTrackEvent.cpp */,
Lines 15320-15327 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec12
15320
				932CC0D11DFFD667004C0F9F /* JSMediaTrackConstraints.h */,
15301
				932CC0D11DFFD667004C0F9F /* JSMediaTrackConstraints.h */,
15321
				0787C4671BFBDF6F006DCD7F /* JSMediaTrackSupportedConstraints.cpp */,
15302
				0787C4671BFBDF6F006DCD7F /* JSMediaTrackSupportedConstraints.cpp */,
15322
				0787C4681BFBDF6F006DCD7F /* JSMediaTrackSupportedConstraints.h */,
15303
				0787C4681BFBDF6F006DCD7F /* JSMediaTrackSupportedConstraints.h */,
15323
				073BE33E17D17E01002BD431 /* JSNavigatorUserMedia.cpp */,
15324
				073BE33F17D17E01002BD431 /* JSNavigatorUserMedia.h */,
15325
				0704A4091D6DFC690086DCDB /* JSOverconstrainedError.cpp */,
15304
				0704A4091D6DFC690086DCDB /* JSOverconstrainedError.cpp */,
15326
				0704A40A1D6DFC690086DCDB /* JSOverconstrainedError.h */,
15305
				0704A40A1D6DFC690086DCDB /* JSOverconstrainedError.h */,
15327
				0704A4131D6F39FB0086DCDB /* JSOverconstrainedErrorEvent.cpp */,
15306
				0704A4131D6F39FB0086DCDB /* JSOverconstrainedErrorEvent.cpp */,
Lines 28725-28731 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec13
28725
				07277E4D17D018CC0015534D /* JSMediaStream.h in Headers */,
28704
				07277E4D17D018CC0015534D /* JSMediaStream.h in Headers */,
28726
				07277E4F17D018CC0015534D /* JSMediaStreamAudioDestinationNode.h in Headers */,
28705
				07277E4F17D018CC0015534D /* JSMediaStreamAudioDestinationNode.h in Headers */,
28727
				FDBD480D159BC6870093EB4F /* JSMediaStreamAudioSourceNode.h in Headers */,
28706
				FDBD480D159BC6870093EB4F /* JSMediaStreamAudioSourceNode.h in Headers */,
28728
				07277E5117D018CC0015534D /* JSMediaStreamEvent.h in Headers */,
28729
				07277E5317D018CC0015534D /* JSMediaStreamTrack.h in Headers */,
28707
				07277E5317D018CC0015534D /* JSMediaStreamTrack.h in Headers */,
28730
				07277E5517D018CC0015534D /* JSMediaStreamTrackEvent.h in Headers */,
28708
				07277E5517D018CC0015534D /* JSMediaStreamTrackEvent.h in Headers */,
28731
				932CC0D51DFFD667004C0F9F /* JSMediaTrackConstraints.h in Headers */,
28709
				932CC0D51DFFD667004C0F9F /* JSMediaTrackConstraints.h in Headers */,
Lines 28744-28750 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec14
28744
				A9D247F80D757E3400FDF959 /* JSNavigator.h in Headers */,
28722
				A9D247F80D757E3400FDF959 /* JSNavigator.h in Headers */,
28745
				77D510251ED74B5800DA4C87 /* JSNavigatorCredentials.h in Headers */,
28723
				77D510251ED74B5800DA4C87 /* JSNavigatorCredentials.h in Headers */,
28746
				51F886C01F32923100C193EF /* JSNavigatorServiceWorker.h in Headers */,
28724
				51F886C01F32923100C193EF /* JSNavigatorServiceWorker.h in Headers */,
28747
				073BE34117D17E01002BD431 /* JSNavigatorUserMedia.h in Headers */,
28748
				BC9439C3116CF4940048C750 /* JSNodeCustom.h in Headers */,
28725
				BC9439C3116CF4940048C750 /* JSNodeCustom.h in Headers */,
28749
				14115B7309F84CD600CA4FC1 /* JSNodeFilter.h in Headers */,
28726
				14115B7309F84CD600CA4FC1 /* JSNodeFilter.h in Headers */,
28750
				1A750D8E0A90E521000FF215 /* JSNodeIterator.h in Headers */,
28727
				1A750D8E0A90E521000FF215 /* JSNodeIterator.h in Headers */,
Lines 29349-29355 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec15
29349
				0783228518013ED800999E0C /* MediaStreamAudioSource.h in Headers */,
29326
				0783228518013ED800999E0C /* MediaStreamAudioSource.h in Headers */,
29350
				FD671A78159BB07000197559 /* MediaStreamAudioSourceNode.h in Headers */,
29327
				FD671A78159BB07000197559 /* MediaStreamAudioSourceNode.h in Headers */,
29351
				070F549817F12F6B00169E04 /* MediaStreamConstraintsValidationClient.h in Headers */,
29328
				070F549817F12F6B00169E04 /* MediaStreamConstraintsValidationClient.h in Headers */,
29352
				078E091617D14D1C00420AA1 /* MediaStreamEvent.h in Headers */,
29353
				078E093717D16B2C00420AA1 /* MediaStreamPrivate.h in Headers */,
29329
				078E093717D16B2C00420AA1 /* MediaStreamPrivate.h in Headers */,
29354
				078E091717D14D1C00420AA1 /* MediaStreamRegistry.h in Headers */,
29330
				078E091717D14D1C00420AA1 /* MediaStreamRegistry.h in Headers */,
29355
				078E3CC01FE1C73C00483C1D /* MediaStreamRequest.h in Headers */,
29331
				078E3CC01FE1C73C00483C1D /* MediaStreamRequest.h in Headers */,
- a/Source/WebCore/bindings/js/JSDOMGlobalObject.cpp -11 lines
Lines 55-61 using namespace JSC; a/Source/WebCore/bindings/js/JSDOMGlobalObject.cpp_sec1
55
55
56
EncodedJSValue JSC_HOST_CALL makeThisTypeErrorForBuiltins(ExecState*);
56
EncodedJSValue JSC_HOST_CALL makeThisTypeErrorForBuiltins(ExecState*);
57
EncodedJSValue JSC_HOST_CALL makeGetterTypeErrorForBuiltins(ExecState*);
57
EncodedJSValue JSC_HOST_CALL makeGetterTypeErrorForBuiltins(ExecState*);
58
EncodedJSValue JSC_HOST_CALL isWebRTCLegacyAPIEnabled(ExecState*);
59
EncodedJSValue JSC_HOST_CALL isReadableByteStreamAPIEnabled(ExecState*);
58
EncodedJSValue JSC_HOST_CALL isReadableByteStreamAPIEnabled(ExecState*);
60
59
61
const ClassInfo JSDOMGlobalObject::s_info = { "DOMGlobalObject", &JSGlobalObject::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSDOMGlobalObject) };
60
const ClassInfo JSDOMGlobalObject::s_info = { "DOMGlobalObject", &JSGlobalObject::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSDOMGlobalObject) };
Lines 103-115 EncodedJSValue JSC_HOST_CALL makeGetterTypeErrorForBuiltins(ExecState* execState a/Source/WebCore/bindings/js/JSDOMGlobalObject.cpp_sec2
103
    return JSValue::encode(createTypeError(execState, makeGetterTypeErrorMessage(interfaceName.utf8().data(), attributeName.utf8().data())));
102
    return JSValue::encode(createTypeError(execState, makeGetterTypeErrorMessage(interfaceName.utf8().data(), attributeName.utf8().data())));
104
}
103
}
105
104
106
#if ENABLE(WEB_RTC)
107
EncodedJSValue JSC_HOST_CALL isWebRTCLegacyAPIEnabled(ExecState*)
108
{
109
    return JSValue::encode(jsBoolean(RuntimeEnabledFeatures::sharedFeatures().webRTCLegacyAPIEnabled()));
110
}
111
#endif
112
113
#if ENABLE(STREAMS_API)
105
#if ENABLE(STREAMS_API)
114
EncodedJSValue JSC_HOST_CALL isReadableByteStreamAPIEnabled(ExecState*)
106
EncodedJSValue JSC_HOST_CALL isReadableByteStreamAPIEnabled(ExecState*)
115
{
107
{
Lines 169-177 void JSDOMGlobalObject::addBuiltinGlobals(VM& vm) a/Source/WebCore/bindings/js/JSDOMGlobalObject.cpp_sec3
169
        JSDOMGlobalObject::GlobalPropertyInfo(clientData.builtinNames().ReadableStreamDefaultReaderPrivateName(), privateReadableStreamDefaultReaderConstructor, PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
161
        JSDOMGlobalObject::GlobalPropertyInfo(clientData.builtinNames().ReadableStreamDefaultReaderPrivateName(), privateReadableStreamDefaultReaderConstructor, PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
170
        JSDOMGlobalObject::GlobalPropertyInfo(clientData.builtinNames().ReadableStreamBYOBReaderPrivateName(), privateReadableStreamBYOBReaderConstructor, PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
162
        JSDOMGlobalObject::GlobalPropertyInfo(clientData.builtinNames().ReadableStreamBYOBReaderPrivateName(), privateReadableStreamBYOBReaderConstructor, PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
171
        JSDOMGlobalObject::GlobalPropertyInfo(clientData.builtinNames().readableByteStreamAPIEnabledPrivateName(), JSFunction::create(vm, this, 0, String(), isReadableByteStreamAPIEnabled), PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
163
        JSDOMGlobalObject::GlobalPropertyInfo(clientData.builtinNames().readableByteStreamAPIEnabledPrivateName(), JSFunction::create(vm, this, 0, String(), isReadableByteStreamAPIEnabled), PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
172
#endif
173
#if ENABLE(WEB_RTC)
174
        JSDOMGlobalObject::GlobalPropertyInfo(clientData.builtinNames().webRTCLegacyAPIEnabledPrivateName(), JSFunction::create(vm, this, 0, String(), isWebRTCLegacyAPIEnabled), PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
175
#endif
164
#endif
176
    };
165
    };
177
    addStaticGlobals(staticGlobals, WTF_ARRAY_LENGTH(staticGlobals));
166
    addStaticGlobals(staticGlobals, WTF_ARRAY_LENGTH(staticGlobals));
- a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h -6 lines
Lines 99-105 namespace WebCore { a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h_sec1
99
    macro(MediaKeys) \
99
    macro(MediaKeys) \
100
    macro(MediaSource) \
100
    macro(MediaSource) \
101
    macro(MediaStream) \
101
    macro(MediaStream) \
102
    macro(MediaStreamEvent) \
103
    macro(MediaStreamTrack) \
102
    macro(MediaStreamTrack) \
104
    macro(ModernMediaControls) \
103
    macro(ModernMediaControls) \
105
    macro(NavigatorCredentials) \
104
    macro(NavigatorCredentials) \
Lines 191-197 namespace WebCore { a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h_sec2
191
    macro(WindowClient) \
190
    macro(WindowClient) \
192
    macro(WritableStream) \
191
    macro(WritableStream) \
193
    macro(XMLHttpRequest) \
192
    macro(XMLHttpRequest) \
194
    macro(addTrack) \
195
    macro(appendFromJS) \
193
    macro(appendFromJS) \
196
    macro(associatedReadableByteStreamController) \
194
    macro(associatedReadableByteStreamController) \
197
    macro(autoAllocateChunkSize) \
195
    macro(autoAllocateChunkSize) \
Lines 223-230 namespace WebCore { a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h_sec3
223
    macro(finishConsumingStream) \
221
    macro(finishConsumingStream) \
224
    macro(focus) \
222
    macro(focus) \
225
    macro(frames) \
223
    macro(frames) \
226
    macro(getRemoteStreams) \
227
    macro(getSenders) \
228
    macro(getTracks) \
224
    macro(getTracks) \
229
    macro(getUserMedia) \
225
    macro(getUserMedia) \
230
    macro(header) \
226
    macro(header) \
Lines 268-274 namespace WebCore { a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h_sec4
268
    macro(readableStreamController) \
264
    macro(readableStreamController) \
269
    macro(reader) \
265
    macro(reader) \
270
    macro(readyPromiseCapability) \
266
    macro(readyPromiseCapability) \
271
    macro(removeTrack) \
272
    macro(response) \
267
    macro(response) \
273
    macro(responseCacheIsValid) \
268
    macro(responseCacheIsValid) \
274
    macro(retrieveResponse) \
269
    macro(retrieveResponse) \
Lines 298-304 namespace WebCore { a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h_sec5
298
    macro(underlyingSource) \
293
    macro(underlyingSource) \
299
    macro(view) \
294
    macro(view) \
300
    macro(visualViewport) \
295
    macro(visualViewport) \
301
    macro(webRTCLegacyAPIEnabled) \
302
    macro(webkit) \
296
    macro(webkit) \
303
    macro(webkitAudioContext) \
297
    macro(webkitAudioContext) \
304
    macro(webkitIDBCursor) \
298
    macro(webkitIDBCursor) \
- a/Source/WebCore/dom/EventNames.in -1 lines
Lines 48-54 ApplePayShippingMethodSelectedEvent conditional=APPLE_PAY a/Source/WebCore/dom/EventNames.in_sec1
48
ApplePayValidateMerchantEvent conditional=APPLE_PAY
48
ApplePayValidateMerchantEvent conditional=APPLE_PAY
49
AudioProcessingEvent conditional=WEB_AUDIO
49
AudioProcessingEvent conditional=WEB_AUDIO
50
OfflineAudioCompletionEvent conditional=WEB_AUDIO
50
OfflineAudioCompletionEvent conditional=WEB_AUDIO
51
MediaStreamEvent conditional=WEB_RTC
52
MediaStreamTrackEvent conditional=MEDIA_STREAM
51
MediaStreamTrackEvent conditional=MEDIA_STREAM
53
MerchantValidationEvent conditional=PAYMENT_REQUEST
52
MerchantValidationEvent conditional=PAYMENT_REQUEST
54
PaymentRequestUpdateEvent conditional=PAYMENT_REQUEST
53
PaymentRequestUpdateEvent conditional=PAYMENT_REQUEST
- a/Source/WebCore/page/RuntimeEnabledFeatures.h -3 lines
Lines 118-125 public: a/Source/WebCore/page/RuntimeEnabledFeatures.h_sec1
118
#if ENABLE(WEB_RTC)
118
#if ENABLE(WEB_RTC)
119
    bool peerConnectionEnabled() const { return m_isPeerConnectionEnabled; }
119
    bool peerConnectionEnabled() const { return m_isPeerConnectionEnabled; }
120
    void setPeerConnectionEnabled(bool isEnabled) { m_isPeerConnectionEnabled = isEnabled; }
120
    void setPeerConnectionEnabled(bool isEnabled) { m_isPeerConnectionEnabled = isEnabled; }
121
    bool webRTCLegacyAPIEnabled() const { return m_webRTCLegacyAPIEnabled; }
122
    void setWebRTCLegacyAPIEnabled(bool isEnabled) { m_webRTCLegacyAPIEnabled = isEnabled; }
123
    bool mdnsICECandidatesEnabled() const { return m_mdnsICECandidatesEnabled; }
121
    bool mdnsICECandidatesEnabled() const { return m_mdnsICECandidatesEnabled; }
124
    void setMDNSICECandidatesEnabled(bool isEnabled) { m_mdnsICECandidatesEnabled = isEnabled; }
122
    void setMDNSICECandidatesEnabled(bool isEnabled) { m_mdnsICECandidatesEnabled = isEnabled; }
125
#endif
123
#endif
Lines 322-328 private: a/Source/WebCore/page/RuntimeEnabledFeatures.h_sec2
322
320
323
#if ENABLE(WEB_RTC)
321
#if ENABLE(WEB_RTC)
324
    bool m_isPeerConnectionEnabled { true };
322
    bool m_isPeerConnectionEnabled { true };
325
    bool m_webRTCLegacyAPIEnabled { false };
326
    bool m_mdnsICECandidatesEnabled { false };
323
    bool m_mdnsICECandidatesEnabled { false };
327
#endif
324
#endif
328
325
- a/Source/WebKit/Shared/WebPreferences.yaml -8 lines
Lines 1147-1160 IntersectionObserverEnabled: a/Source/WebKit/Shared/WebPreferences.yaml_sec1
1147
  category: experimental
1147
  category: experimental
1148
  condition: ENABLE(INTERSECTION_OBSERVER)
1148
  condition: ENABLE(INTERSECTION_OBSERVER)
1149
1149
1150
WebRTCLegacyAPIEnabled:
1151
  type: bool
1152
  defaultValue: false
1153
  humanReadableName: "Enable Legacy WebRTC API"
1154
  humanReadableDescription: "Enable Legacy WebRTC API"
1155
  webcoreBinding: RuntimeEnabledFeatures
1156
  condition: ENABLE(WEB_RTC)
1157
1158
MDNSICECandidatesEnabled:
1150
MDNSICECandidatesEnabled:
1159
  type: bool
1151
  type: bool
1160
  defaultValue: false
1152
  defaultValue: false
- a/Source/WebKit/UIProcess/API/C/WKPreferences.cpp -10 lines
Lines 1428-1443 bool WKPreferencesGetPeerConnectionEnabled(WKPreferencesRef preferencesRef) a/Source/WebKit/UIProcess/API/C/WKPreferences.cpp_sec1
1428
    return toImpl(preferencesRef)->peerConnectionEnabled();
1428
    return toImpl(preferencesRef)->peerConnectionEnabled();
1429
}
1429
}
1430
1430
1431
void WKPreferencesSetWebRTCLegacyAPIEnabled(WKPreferencesRef preferencesRef, bool enabled)
1432
{
1433
    toImpl(preferencesRef)->setWebRTCLegacyAPIEnabled(enabled);
1434
}
1435
1436
bool WKPreferencesGetWebRTCLegacyAPIEnabled(WKPreferencesRef preferencesRef)
1437
{
1438
    return toImpl(preferencesRef)->webRTCLegacyAPIEnabled();
1439
}
1440
1441
void WKPreferencesSetWebRTCMDNSICECandidatesEnabled(WKPreferencesRef preferencesRef, bool enabled)
1431
void WKPreferencesSetWebRTCMDNSICECandidatesEnabled(WKPreferencesRef preferencesRef, bool enabled)
1442
{
1432
{
1443
    toImpl(preferencesRef)->setMDNSICECandidatesEnabled(enabled);
1433
    toImpl(preferencesRef)->setMDNSICECandidatesEnabled(enabled);
- a/Source/WebKit/UIProcess/API/C/WKPreferencesRef.h -4 lines
Lines 268-277 WK_EXPORT bool WKPreferencesGetMediaDevicesEnabled(WKPreferencesRef preferencesR a/Source/WebKit/UIProcess/API/C/WKPreferencesRef.h_sec1
268
WK_EXPORT void WKPreferencesSetPeerConnectionEnabled(WKPreferencesRef preferencesRef, bool enabled);
268
WK_EXPORT void WKPreferencesSetPeerConnectionEnabled(WKPreferencesRef preferencesRef, bool enabled);
269
WK_EXPORT bool WKPreferencesGetPeerConnectionEnabled(WKPreferencesRef preferencesRef);
269
WK_EXPORT bool WKPreferencesGetPeerConnectionEnabled(WKPreferencesRef preferencesRef);
270
270
271
// Should default to false
272
WK_EXPORT void WKPreferencesSetWebRTCLegacyAPIEnabled(WKPreferencesRef preferencesRef, bool enabled);
273
WK_EXPORT bool WKPreferencesGetWebRTCLegacyAPIEnabled(WKPreferencesRef preferencesRef);
274
275
// Defaults to false
271
// Defaults to false
276
WK_EXPORT void WKPreferencesSetWebRTCMDNSICECandidatesEnabled(WKPreferencesRef preferencesRef, bool enabled);
272
WK_EXPORT void WKPreferencesSetWebRTCMDNSICECandidatesEnabled(WKPreferencesRef preferencesRef, bool enabled);
277
WK_EXPORT bool WKPreferencesGetWebRTCMDNSICECandidatesEnabled(WKPreferencesRef preferencesRef);
273
WK_EXPORT bool WKPreferencesGetWebRTCMDNSICECandidatesEnabled(WKPreferencesRef preferencesRef);
- a/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm -10 lines
Lines 669-684 - (void)_setICECandidateFilteringEnabled:(BOOL)enabled a/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm_sec1
669
    _preferences->setICECandidateFilteringEnabled(enabled);
669
    _preferences->setICECandidateFilteringEnabled(enabled);
670
}
670
}
671
671
672
- (BOOL)_webRTCLegacyAPIEnabled
673
{
674
    return _preferences->webRTCLegacyAPIEnabled();
675
}
676
677
- (void)_setWebRTCLegacyAPIEnabled:(BOOL)enabled
678
{
679
    _preferences->setWebRTCLegacyAPIEnabled(enabled);
680
}
681
682
- (void)_setJavaScriptCanAccessClipboard:(BOOL)javaScriptCanAccessClipboard
672
- (void)_setJavaScriptCanAccessClipboard:(BOOL)javaScriptCanAccessClipboard
683
{
673
{
684
    _preferences->setJavaScriptCanAccessClipboard(javaScriptCanAccessClipboard);
674
    _preferences->setJavaScriptCanAccessClipboard(javaScriptCanAccessClipboard);
- a/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h -1 lines
Lines 118-124 typedef NS_ENUM(NSInteger, _WKEditableLinkBehavior) { a/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h_sec1
118
@property (nonatomic, setter=_setMediaCaptureRequiresSecureConnection:) BOOL _mediaCaptureRequiresSecureConnection WK_API_AVAILABLE(macosx(10.13), ios(11.0));
118
@property (nonatomic, setter=_setMediaCaptureRequiresSecureConnection:) BOOL _mediaCaptureRequiresSecureConnection WK_API_AVAILABLE(macosx(10.13), ios(11.0));
119
@property (nonatomic, setter=_setEnumeratingAllNetworkInterfacesEnabled:) BOOL _enumeratingAllNetworkInterfacesEnabled WK_API_AVAILABLE(macosx(10.13), ios(11.0));
119
@property (nonatomic, setter=_setEnumeratingAllNetworkInterfacesEnabled:) BOOL _enumeratingAllNetworkInterfacesEnabled WK_API_AVAILABLE(macosx(10.13), ios(11.0));
120
@property (nonatomic, setter=_setICECandidateFilteringEnabled:) BOOL _iceCandidateFilteringEnabled WK_API_AVAILABLE(macosx(10.13.4), ios(11.3));
120
@property (nonatomic, setter=_setICECandidateFilteringEnabled:) BOOL _iceCandidateFilteringEnabled WK_API_AVAILABLE(macosx(10.13.4), ios(11.3));
121
@property (nonatomic, setter=_setWebRTCLegacyAPIEnabled:) BOOL _webRTCLegacyAPIEnabled WK_API_AVAILABLE(macosx(10.13), ios(11.0));
122
@property (nonatomic, setter=_setInactiveMediaCaptureSteamRepromptIntervalInMinutes:) double _inactiveMediaCaptureSteamRepromptIntervalInMinutes WK_API_AVAILABLE(macosx(10.13.4), ios(11.3));
121
@property (nonatomic, setter=_setInactiveMediaCaptureSteamRepromptIntervalInMinutes:) double _inactiveMediaCaptureSteamRepromptIntervalInMinutes WK_API_AVAILABLE(macosx(10.13.4), ios(11.3));
123
122
124
@property (nonatomic, setter=_setJavaScriptCanAccessClipboard:) BOOL _javaScriptCanAccessClipboard WK_API_AVAILABLE(macosx(10.13), ios(11.0));
123
@property (nonatomic, setter=_setJavaScriptCanAccessClipboard:) BOOL _javaScriptCanAccessClipboard WK_API_AVAILABLE(macosx(10.13), ios(11.0));
- a/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp -2 lines
Lines 239-246 void InjectedBundle::overrideBoolPreferenceForTestRunner(WebPageGroupProxy* page a/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp_sec1
239
#endif
239
#endif
240
240
241
#if ENABLE(WEB_RTC)
241
#if ENABLE(WEB_RTC)
242
    if (preference == "WebKitWebRTCLegacyAPIEnabled")
243
        RuntimeEnabledFeatures::sharedFeatures().setWebRTCLegacyAPIEnabled(enabled);
244
    if (preference == "WebKitMDNSICECandidatesEnabled")
242
    if (preference == "WebKitMDNSICECandidatesEnabled")
245
        RuntimeEnabledFeatures::sharedFeatures().setMDNSICECandidatesEnabled(enabled);
243
        RuntimeEnabledFeatures::sharedFeatures().setMDNSICECandidatesEnabled(enabled);
246
#endif
244
#endif
- a/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h -1 lines
Lines 187-193 a/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h_sec1
187
#define WebKitMediaDevicesEnabledPreferenceKey @"WebKitMediaDevicesEnabled"
187
#define WebKitMediaDevicesEnabledPreferenceKey @"WebKitMediaDevicesEnabled"
188
#define WebKitMediaStreamEnabledPreferenceKey @"WebKitMediaStreamEnabled"
188
#define WebKitMediaStreamEnabledPreferenceKey @"WebKitMediaStreamEnabled"
189
#define WebKitPeerConnectionEnabledPreferenceKey @"WebKitPeerConnectionEnabled"
189
#define WebKitPeerConnectionEnabledPreferenceKey @"WebKitPeerConnectionEnabled"
190
#define WebKitWebRTCLegacyAPIEnabledPreferenceKey @"WebKitWebRTCLegacyAPIEnabled"
191
#define WebKitLinkPreloadEnabledPreferenceKey @"WebKitLinkPreloadEnabled"
190
#define WebKitLinkPreloadEnabledPreferenceKey @"WebKitLinkPreloadEnabled"
192
#define WebKitMediaPreloadingEnabledPreferenceKey @"WebKitMediaPreloadingEnabled"
191
#define WebKitMediaPreloadingEnabledPreferenceKey @"WebKitMediaPreloadingEnabled"
193
#define WebKitWebAuthenticationEnabledPreferenceKey @"WebKitWebAuthenticationEnabled"
192
#define WebKitWebAuthenticationEnabledPreferenceKey @"WebKitWebAuthenticationEnabled"
- a/Source/WebKitLegacy/mac/WebView/WebPreferences.mm -11 lines
Lines 662-668 + (void)initialize a/Source/WebKitLegacy/mac/WebView/WebPreferences.mm_sec1
662
#endif
662
#endif
663
#if ENABLE(WEB_RTC)
663
#if ENABLE(WEB_RTC)
664
        [NSNumber numberWithBool:YES], WebKitPeerConnectionEnabledPreferenceKey,
664
        [NSNumber numberWithBool:YES], WebKitPeerConnectionEnabledPreferenceKey,
665
        [NSNumber numberWithBool:NO], WebKitWebRTCLegacyAPIEnabledPreferenceKey,
666
#endif
665
#endif
667
#if ENABLE(INTERSECTION_OBSERVER)
666
#if ENABLE(INTERSECTION_OBSERVER)
668
        @NO, WebKitIntersectionObserverEnabledPreferenceKey,
667
        @NO, WebKitIntersectionObserverEnabledPreferenceKey,
Lines 2833-2848 - (void)setPeerConnectionEnabled:(BOOL)flag a/Source/WebKitLegacy/mac/WebView/WebPreferences.mm_sec2
2833
    [self _setBoolValue:flag forKey:WebKitPeerConnectionEnabledPreferenceKey];
2832
    [self _setBoolValue:flag forKey:WebKitPeerConnectionEnabledPreferenceKey];
2834
}
2833
}
2835
2834
2836
- (BOOL)webRTCLegacyAPIEnabled
2837
{
2838
    return [self _boolValueForKey:WebKitWebRTCLegacyAPIEnabledPreferenceKey];
2839
}
2840
2841
- (void)setWebRTCLegacyAPIEnabled:(BOOL)flag
2842
{
2843
    [self _setBoolValue:flag forKey:WebKitWebRTCLegacyAPIEnabledPreferenceKey];
2844
}
2845
2846
- (BOOL)linkPreloadEnabled
2835
- (BOOL)linkPreloadEnabled
2847
{
2836
{
2848
    return [self _boolValueForKey:WebKitLinkPreloadEnabledPreferenceKey];
2837
    return [self _boolValueForKey:WebKitLinkPreloadEnabledPreferenceKey];
- a/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h -3 lines
Lines 183-191 extern NSString *WebPreferencesCacheModelChangedInternalNotification WEBKIT_DEPR a/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h_sec1
183
- (void)setPeerConnectionEnabled:(BOOL)flag;
183
- (void)setPeerConnectionEnabled:(BOOL)flag;
184
- (BOOL)peerConnectionEnabled;
184
- (BOOL)peerConnectionEnabled;
185
185
186
- (void)setWebRTCLegacyAPIEnabled:(BOOL)flag;
187
- (BOOL)webRTCLegacyAPIEnabled;
188
189
#if !TARGET_OS_IPHONE
186
#if !TARGET_OS_IPHONE
190
// zero means do AutoScale
187
// zero means do AutoScale
191
- (float)PDFScaleFactor;
188
- (float)PDFScaleFactor;
- a/Source/WebKitLegacy/mac/WebView/WebView.mm -1 lines
Lines 3049-3055 - (void)_preferencesChanged:(WebPreferences *)preferences a/Source/WebKitLegacy/mac/WebView/WebView.mm_sec1
3049
3049
3050
#if ENABLE(WEB_RTC)
3050
#if ENABLE(WEB_RTC)
3051
    RuntimeEnabledFeatures::sharedFeatures().setPeerConnectionEnabled([preferences peerConnectionEnabled]);
3051
    RuntimeEnabledFeatures::sharedFeatures().setPeerConnectionEnabled([preferences peerConnectionEnabled]);
3052
    RuntimeEnabledFeatures::sharedFeatures().setWebRTCLegacyAPIEnabled([preferences webRTCLegacyAPIEnabled]);
3053
#endif
3052
#endif
3054
3053
3055
#if ENABLE(WEB_AUDIO)
3054
#if ENABLE(WEB_AUDIO)
- a/Tools/ChangeLog +16 lines
Lines 1-3 a/Tools/ChangeLog_sec1
1
2018-08-27  Youenn Fablet  <youenn@apple.com>
2
3
        Remove WebRTC legacy API implementation
4
        https://bugs.webkit.org/show_bug.cgi?id=189040
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        * DumpRenderTree/mac/DumpRenderTree.mm:
9
        (enableExperimentalFeatures):
10
        * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
11
        * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
12
        (WTR::TestRunner::setWebRTCLegacyAPIEnabled): Deleted.
13
        * WebKitTestRunner/InjectedBundle/TestRunner.h:
14
        * WebKitTestRunner/TestController.cpp:
15
        (WTR::TestController::resetPreferencesToConsistentValues):
16
1
2018-08-28  Daniel Bates  <dabates@apple.com>
17
2018-08-28  Daniel Bates  <dabates@apple.com>
2
18
3
        lldb-webkit: KeyError thrown for OptionSet
19
        lldb-webkit: KeyError thrown for OptionSet
- a/Tools/DumpRenderTree/mac/DumpRenderTree.mm -1 lines
Lines 856-862 static void enableExperimentalFeatures(WebPreferences* preferences) a/Tools/DumpRenderTree/mac/DumpRenderTree.mm_sec1
856
    [preferences setWebGL2Enabled:YES];
856
    [preferences setWebGL2Enabled:YES];
857
    [preferences setWebGPUEnabled:YES];
857
    [preferences setWebGPUEnabled:YES];
858
    // FIXME: AsyncFrameScrollingEnabled
858
    // FIXME: AsyncFrameScrollingEnabled
859
    [preferences setWebRTCLegacyAPIEnabled:YES];
860
    [preferences setWebAuthenticationEnabled:NO];
859
    [preferences setWebAuthenticationEnabled:NO];
861
    [preferences setCacheAPIEnabled:NO];
860
    [preferences setCacheAPIEnabled:NO];
862
    [preferences setReadableByteStreamAPIEnabled:YES];
861
    [preferences setReadableByteStreamAPIEnabled:YES];
- a/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl -1 lines
Lines 320-326 interface TestRunner { a/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl_sec1
320
    // Open panel
320
    // Open panel
321
    void setOpenPanelFiles(object filesArray);
321
    void setOpenPanelFiles(object filesArray);
322
322
323
    void setWebRTCLegacyAPIEnabled(boolean value);
324
    void setMDNSICECandidatesEnabled(boolean value);
323
    void setMDNSICECandidatesEnabled(boolean value);
325
    void setCustomUserAgent(DOMString userAgent);
324
    void setCustomUserAgent(DOMString userAgent);
326
325
- a/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp -7 lines
Lines 448-460 void TestRunner::setCustomUserAgent(JSStringRef userAgent) a/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp_sec1
448
    WKBundlePostSynchronousMessage(InjectedBundle::singleton().bundle(), messageName.get(), toWK(userAgent).get(), nullptr);
448
    WKBundlePostSynchronousMessage(InjectedBundle::singleton().bundle(), messageName.get(), toWK(userAgent).get(), nullptr);
449
}
449
}
450
450
451
void TestRunner::setWebRTCLegacyAPIEnabled(bool enabled)
452
{
453
    WKRetainPtr<WKStringRef> key(AdoptWK, WKStringCreateWithUTF8CString("WebKitWebRTCLegacyAPIEnabled"));
454
    auto& injectedBundle = InjectedBundle::singleton();
455
    WKBundleOverrideBoolPreferenceForTestRunner(injectedBundle.bundle(), injectedBundle.pageGroup(), key.get(), enabled);
456
}
457
458
void TestRunner::setModernMediaControlsEnabled(bool enabled)
451
void TestRunner::setModernMediaControlsEnabled(bool enabled)
459
{
452
{
460
    WKRetainPtr<WKStringRef> key(AdoptWK, WKStringCreateWithUTF8CString("WebKitModernMediaControlsEnabled"));
453
    WKRetainPtr<WKStringRef> key(AdoptWK, WKStringCreateWithUTF8CString("WebKitModernMediaControlsEnabled"));
- a/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h -1 lines
Lines 130-136 public: a/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h_sec1
130
    void setAllowsAnySSLCertificate(bool);
130
    void setAllowsAnySSLCertificate(bool);
131
    void setEncryptedMediaAPIEnabled(bool);
131
    void setEncryptedMediaAPIEnabled(bool);
132
    void setMediaDevicesEnabled(bool);
132
    void setMediaDevicesEnabled(bool);
133
    void setWebRTCLegacyAPIEnabled(bool);
134
    void setMDNSICECandidatesEnabled(bool);
133
    void setMDNSICECandidatesEnabled(bool);
135
    void setCustomUserAgent(JSStringRef);
134
    void setCustomUserAgent(JSStringRef);
136
135
- a/Tools/WebKitTestRunner/TestController.cpp -1 lines
Lines 706-712 void TestController::resetPreferencesToConsistentValues(const TestOptions& optio a/Tools/WebKitTestRunner/TestController.cpp_sec1
706
    WKPreferencesSetXSSAuditorEnabled(preferences, false);
706
    WKPreferencesSetXSSAuditorEnabled(preferences, false);
707
    WKPreferencesSetWebAudioEnabled(preferences, true);
707
    WKPreferencesSetWebAudioEnabled(preferences, true);
708
    WKPreferencesSetMediaDevicesEnabled(preferences, true);
708
    WKPreferencesSetMediaDevicesEnabled(preferences, true);
709
    WKPreferencesSetWebRTCLegacyAPIEnabled(preferences, true);
710
    WKPreferencesSetWebRTCMDNSICECandidatesEnabled(preferences, false);
709
    WKPreferencesSetWebRTCMDNSICECandidatesEnabled(preferences, false);
711
    WKPreferencesSetDeveloperExtrasEnabled(preferences, true);
710
    WKPreferencesSetDeveloperExtrasEnabled(preferences, true);
712
    WKPreferencesSetJavaScriptRuntimeFlags(preferences, kWKJavaScriptRuntimeFlagsAllEnabled);
711
    WKPreferencesSetJavaScriptRuntimeFlags(preferences, kWKJavaScriptRuntimeFlagsAllEnabled);
- a/LayoutTests/ChangeLog +48 lines
Lines 1-3 a/LayoutTests/ChangeLog_sec1
1
2018-08-27  Youenn Fablet  <youenn@apple.com>
2
3
        Remove WebRTC legacy API implementation
4
        https://bugs.webkit.org/show_bug.cgi?id=189040
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        * TestExpectations:
9
        * fast/events/constructors/media-stream-event-constructor-expected.txt: Removed.
10
        * fast/events/constructors/media-stream-event-constructor.html: Removed.
11
        * fast/mediastream/RTCPeerConnection-AddRemoveStream-expected.txt: Removed.
12
        * fast/mediastream/RTCPeerConnection-AddRemoveStream.html: Removed.
13
        * fast/mediastream/RTCPeerConnection-createAnswer-expected.txt:
14
        * fast/mediastream/RTCPeerConnection-createAnswer.html:
15
        * fast/mediastream/RTCPeerConnection-createOffer-expected.txt: Removed.
16
        * fast/mediastream/RTCPeerConnection-createOffer.html: Removed.
17
        * fast/mediastream/RTCPeerConnection-dtmf.html: Removed.
18
        * fast/mediastream/RTCPeerConnection-events-expected.txt: Removed.
19
        * fast/mediastream/RTCPeerConnection-events.html: Removed.
20
        * fast/mediastream/RTCPeerConnection-have-local-offer-expected.txt:
21
        * fast/mediastream/RTCPeerConnection-have-local-offer.html:
22
        * fast/mediastream/RTCPeerConnection-have-local-pranswer-expected.txt:
23
        * fast/mediastream/RTCPeerConnection-have-local-pranswer.html:
24
        * fast/mediastream/RTCPeerConnection-have-remote-offer-expected.txt:
25
        * fast/mediastream/RTCPeerConnection-have-remote-offer.html:
26
        * fast/mediastream/RTCPeerConnection-have-remote-pranswer-expected.txt:
27
        * fast/mediastream/RTCPeerConnection-have-remote-pranswer.html:
28
        * fast/mediastream/RTCPeerConnection-legacy-stream-based-api-expected.txt: Removed.
29
        * fast/mediastream/RTCPeerConnection-legacy-stream-based-api.html: Removed.
30
        * fast/mediastream/RTCPeerConnection-localDescription-expected.txt:
31
        * fast/mediastream/RTCPeerConnection-localDescription.html:
32
        * fast/mediastream/RTCPeerConnection-remoteDescription-expected.txt:
33
        * fast/mediastream/RTCPeerConnection-remoteDescription.html:
34
        * fast/mediastream/RTCPeerConnection-stable-expected.txt:
35
        * fast/mediastream/RTCPeerConnection-stable.html:
36
        * fast/mediastream/RTCPeerConnection-stats.html:
37
        * fast/mediastream/RTCPeerConnection-statsSelector-expected.txt:
38
        * fast/mediastream/RTCPeerConnection-statsSelector.html:
39
        * fast/mediastream/argument-types-expected.txt: Removed.
40
        * fast/mediastream/argument-types.html: Removed.
41
        * fast/mediastream/getusermedia-expected.txt: Removed.
42
        * fast/mediastream/getusermedia.html: Removed.
43
        * fast/mediastream/webkitGetUserMedia-shadowing-then-expected.txt: Removed.
44
        * fast/mediastream/webkitGetUserMedia-shadowing-then.html: Removed.
45
        * platform/mac/TestExpectations:
46
        * webrtc/legacy-api-expected.txt:
47
        * webrtc/legacy-api.html:
48
1
2018-08-28  Truitt Savell  <tsavell@apple.com>
49
2018-08-28  Truitt Savell  <tsavell@apple.com>
2
50
3
        Edditing test expectations from webkit.org/b/188985.
51
        Edditing test expectations from webkit.org/b/188985.
- a/LayoutTests/imported/w3c/ChangeLog +14 lines
Lines 1-3 a/LayoutTests/imported/w3c/ChangeLog_sec1
1
2018-08-27  Youenn Fablet  <youenn@apple.com>
2
3
        Remove WebRTC legacy API implementation
4
        https://bugs.webkit.org/show_bug.cgi?id=189040
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        * web-platform-tests/mediacapture-streams/MediaDevices-IDL-all-expected.txt:
9
        * web-platform-tests/mediacapture-streams/MediaDevices-IDL-enumerateDevices-expected.txt:
10
        * web-platform-tests/mediacapture-streams/MediaStream-default-feature-policy.https-expected.txt:
11
        * web-platform-tests/webrtc/historical-expected.txt:
12
        * web-platform-tests/webrtc/no-media-call.html:
13
        * web-platform-tests/webrtc/simplecall.https.html:
14
1
2018-08-28  Aditya Keerthi  <akeerthi@apple.com>
15
2018-08-28  Aditya Keerthi  <akeerthi@apple.com>
2
16
3
        [iOS] Support inputmode=none
17
        [iOS] Support inputmode=none
- a/LayoutTests/TestExpectations -1 / +3 lines
Lines 1177-1188 webkit.org/b/172f21 imported/w3c/web-platform-tests/webrtc/getstats.html [ Failu a/LayoutTests/TestExpectations_sec1
1177
imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-ontrack.https.html [ Skip ]
1177
imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-ontrack.https.html [ Skip ]
1178
imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-offer.html [ Failure ]
1178
imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-offer.html [ Failure ]
1179
1179
1180
# Uses legacy WebRTC API.
1181
imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/setRemoteDescription.html [ Skip ]
1182
1180
fast/mediastream/RTCPeerConnection-closed-state.html [ Skip ]
1183
fast/mediastream/RTCPeerConnection-closed-state.html [ Skip ]
1181
fast/mediastream/RTCPeerConnection-iceconnectionstatechange-event.html [ Skip ]
1184
fast/mediastream/RTCPeerConnection-iceconnectionstatechange-event.html [ Skip ]
1182
fast/mediastream/RTCPeerConnection-more-media-to-negotiate.html [ Skip ]
1185
fast/mediastream/RTCPeerConnection-more-media-to-negotiate.html [ Skip ]
1183
fast/mediastream/RTCPeerConnection-overloaded-operations-params.html [ Skip ]
1186
fast/mediastream/RTCPeerConnection-overloaded-operations-params.html [ Skip ]
1184
fast/mediastream/RTCRtpSender-replaceTrack.html [ Skip ]
1187
fast/mediastream/RTCRtpSender-replaceTrack.html [ Skip ]
1185
fast/mediastream/RTCPeerConnection-dtmf.html [ Failure ]
1186
fast/mediastream/RTCPeerConnection-inspect-offer-bundlePolicy-bundle-only.html [ Failure ]
1188
fast/mediastream/RTCPeerConnection-inspect-offer-bundlePolicy-bundle-only.html [ Failure ]
1187
1189
1188
# Only iOS WK1 has testRunner.setPagePaused.
1190
# Only iOS WK1 has testRunner.setPagePaused.
- a/LayoutTests/fast/events/constructors/media-stream-event-constructor-expected.txt -34 lines
Lines 1-34 a/LayoutTests/fast/events/constructors/media-stream-event-constructor-expected.txt_sec1
1
This tests the constructor for the MediaStreamEvent DOM class.
2
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6
PASS new MediaStreamEvent('eventType').bubbles is false
7
PASS new MediaStreamEvent('eventType').cancelable is false
8
PASS new MediaStreamEvent('eventType').stream is null
9
PASS new MediaStreamEvent('eventType', { bubbles: false }).bubbles is false
10
PASS new MediaStreamEvent('eventType', { bubbles: true }).bubbles is true
11
PASS new MediaStreamEvent('eventType', { cancelable: false }).cancelable is false
12
PASS new MediaStreamEvent('eventType', { cancelable: true }).cancelable is true
13
PASS new MediaStreamEvent('eventType', { stream: mediaStream }).stream is mediaStream
14
PASS new MediaStreamEvent('eventType', { stream: testObject }).stream threw exception TypeError: Type error.
15
PASS new MediaStreamEvent('eventType', { stream: document }).stream threw exception TypeError: Type error.
16
PASS new MediaStreamEvent('eventType', { stream: undefined }).stream is null
17
PASS new MediaStreamEvent('eventType', { stream: null }).stream is null
18
PASS new MediaStreamEvent('eventType', { stream: false }).stream threw exception TypeError: Type error.
19
PASS new MediaStreamEvent('eventType', { stream: true }).stream threw exception TypeError: Type error.
20
PASS new MediaStreamEvent('eventType', { stream: '' }).stream threw exception TypeError: Type error.
21
PASS new MediaStreamEvent('eventType', { stream: 'chocolate' }).stream threw exception TypeError: Type error.
22
PASS new MediaStreamEvent('eventType', { stream: 12345 }).stream threw exception TypeError: Type error.
23
PASS new MediaStreamEvent('eventType', { stream: 18446744073709551615 }).stream threw exception TypeError: Type error.
24
PASS new MediaStreamEvent('eventType', { stream: NaN }).stream threw exception TypeError: Type error.
25
PASS new MediaStreamEvent('eventType', { stream: {valueOf: function () { return mediaStream; } } }).stream threw exception TypeError: Type error.
26
PASS new MediaStreamEvent('eventType', { get stream() { return 123; } }).stream threw exception TypeError: Type error.
27
PASS new MediaStreamEvent('eventType', { get stream() { throw 'MediaStreamEvent Error'; } }) threw exception MediaStreamEvent Error.
28
PASS new MediaStreamEvent('eventType', { bubbles: true, cancelable: true, stream: mediaStream }).bubbles is true
29
PASS new MediaStreamEvent('eventType', { bubbles: true, cancelable: true, stream: mediaStream }).cancelable is true
30
PASS new MediaStreamEvent('eventType', { bubbles: true, cancelable: true, stream: mediaStream }).stream is mediaStream
31
PASS successfullyParsed is true
32
33
TEST COMPLETE
34
- a/LayoutTests/fast/events/constructors/media-stream-event-constructor.html -55 lines
Lines 1-55 a/LayoutTests/fast/events/constructors/media-stream-event-constructor.html_sec1
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<script src="../../../resources/js-test-pre.js"></script>
5
</head>
6
<body>
7
<script>
8
9
description("This tests the constructor for the MediaStreamEvent DOM class.");
10
11
var testObject = {nyannyan: 123};
12
var mediaStream = new MediaStream();
13
14
// No initializer is passed.
15
shouldBe("new MediaStreamEvent('eventType').bubbles", "false");
16
shouldBe("new MediaStreamEvent('eventType').cancelable", "false");
17
shouldBe("new MediaStreamEvent('eventType').stream", "null");
18
19
// bubbles is passed.
20
shouldBe("new MediaStreamEvent('eventType', { bubbles: false }).bubbles", "false");
21
shouldBe("new MediaStreamEvent('eventType', { bubbles: true }).bubbles", "true");
22
23
// cancelable is passed.
24
shouldBe("new MediaStreamEvent('eventType', { cancelable: false }).cancelable", "false");
25
shouldBe("new MediaStreamEvent('eventType', { cancelable: true }).cancelable", "true");
26
27
// stream is passed.
28
// Valid object.
29
shouldBe("new MediaStreamEvent('eventType', { stream: mediaStream }).stream", "mediaStream");
30
31
// Invalid objects.
32
shouldThrowErrorName("new MediaStreamEvent('eventType', { stream: testObject }).stream", "TypeError");
33
shouldThrowErrorName("new MediaStreamEvent('eventType', { stream: document }).stream", "TypeError");
34
shouldBe("new MediaStreamEvent('eventType', { stream: undefined }).stream", "null");
35
shouldBe("new MediaStreamEvent('eventType', { stream: null }).stream", "null");
36
shouldThrowErrorName("new MediaStreamEvent('eventType', { stream: false }).stream", "TypeError");
37
shouldThrowErrorName("new MediaStreamEvent('eventType', { stream: true }).stream", "TypeError");
38
shouldThrowErrorName("new MediaStreamEvent('eventType', { stream: '' }).stream", "TypeError");
39
shouldThrowErrorName("new MediaStreamEvent('eventType', { stream: 'chocolate' }).stream", "TypeError");
40
shouldThrowErrorName("new MediaStreamEvent('eventType', { stream: 12345 }).stream", "TypeError");
41
shouldThrowErrorName("new MediaStreamEvent('eventType', { stream: 18446744073709551615 }).stream", "TypeError");
42
shouldThrowErrorName("new MediaStreamEvent('eventType', { stream: NaN }).stream", "TypeError");
43
// Note that valueOf() is not called, when the left hand side is evaluated.
44
shouldThrowErrorName("new MediaStreamEvent('eventType', { stream: {valueOf: function () { return mediaStream; } } }).stream", "TypeError");
45
shouldThrowErrorName("new MediaStreamEvent('eventType', { get stream() { return 123; } }).stream", "TypeError");
46
shouldThrow("new MediaStreamEvent('eventType', { get stream() { throw 'MediaStreamEvent Error'; } })");
47
48
// All initializers are passed.
49
shouldBe("new MediaStreamEvent('eventType', { bubbles: true, cancelable: true, stream: mediaStream }).bubbles", "true");
50
shouldBe("new MediaStreamEvent('eventType', { bubbles: true, cancelable: true, stream: mediaStream }).cancelable", "true");
51
shouldBe("new MediaStreamEvent('eventType', { bubbles: true, cancelable: true, stream: mediaStream }).stream", "mediaStream");
52
</script>
53
<script src="../../../resources/js-test-post.js"></script>
54
</body>
55
</html>
- a/LayoutTests/fast/mediastream/RTCPeerConnection-AddRemoveStream-expected.txt -21 lines
Lines 1-21 a/LayoutTests/fast/mediastream/RTCPeerConnection-AddRemoveStream-expected.txt_sec1
1
Tests RTCPeerConnection [add|remove]Stream.
2
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6
PASS Got a stream.
7
PASS pc.addStream(null) threw exception TypeError: Argument 1 ('stream') to RTCPeerConnection.addStream must be an instance of MediaStream.
8
PASS pc.getLocalStreams().length is 0
9
PASS Got another stream.
10
PASS stream.id === stream2.id is false
11
PASS onAddStream was called.
12
PASS pc.getStreamById(stream.id) is stream
13
PASS pc.getStreamById(stream2.id) is null
14
PASS pc.getLocalStreams().length is 1
15
PASS pc.getLocalStreams().length is 1
16
PASS onRemoveStream was called.
17
PASS pc.getLocalStreams().length is 0
18
PASS successfullyParsed is true
19
20
TEST COMPLETE
21
- a/LayoutTests/fast/mediastream/RTCPeerConnection-AddRemoveStream.html -104 lines
Lines 1-104 a/LayoutTests/fast/mediastream/RTCPeerConnection-AddRemoveStream.html_sec1
1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2
<html>
3
    <head>
4
        <script src="../../resources/js-test-pre.js"></script>
5
        <script src="./resources/getUserMedia-helper.js"></script>
6
    </head>
7
    <body>
8
        <script>
9
            description("Tests RTCPeerConnection [add|remove]Stream.");
10
11
            var stream = null;
12
            var stream2 = null;
13
            var pc = null;
14
15
            function error()
16
            {
17
                testFailed('Stream generation failed.');
18
                finishJSTest();
19
            }
20
21
            function getUserMedia(dictionary, callback)
22
            {
23
                try {
24
                    navigator.mediaDevices.getUserMedia(dictionary)
25
                        .then(callback)
26
                        .catch(error);
27
                } catch (e) {
28
                    testFailed('webkitGetUserMedia threw exception :' + e);
29
                    finishJSTest();
30
                }
31
            }
32
33
            function onErroneousNegotiationNeeded()
34
            {
35
                testFailed('onErroneousNegotiationNeeded was called.');
36
                finishJSTest();
37
            }
38
39
            function onRemoveStream(event)
40
            {
41
                testPassed('onRemoveStream was called.');
42
43
                shouldBe('pc.getLocalStreams().length', '0');
44
45
                finishJSTest();
46
            }
47
48
            function onAddStream(event)
49
            {
50
                testPassed('onAddStream was called.');
51
52
                shouldBe('pc.getStreamById(stream.id)', 'stream');
53
                shouldBe('pc.getStreamById(stream2.id)', 'null');
54
55
                pc.onnegotiationneeded = onErroneousNegotiationNeeded;
56
                pc.addStream(stream);
57
                shouldBe('pc.getLocalStreams().length', '1');
58
                pc.removeStream(stream2);
59
                shouldBe('pc.getLocalStreams().length', '1');
60
61
                pc.onnegotiationneeded = onRemoveStream;
62
                pc.removeStream(stream);
63
            }
64
65
            function gotStream2(s)
66
            {
67
                testPassed('Got another stream.');
68
                stream2 = s;
69
70
                shouldBeFalse("stream.id === stream2.id");
71
72
                pc.onnegotiationneeded = onAddStream;
73
                pc.addStream(stream);
74
            }
75
76
            function gotStream1(s)
77
            {
78
                testPassed('Got a stream.');
79
                stream = s;
80
81
                pc = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
82
                pc.onnegotiationneeded = onErroneousNegotiationNeeded;
83
                shouldThrow("pc.addStream(null)");
84
85
                shouldBe('pc.getLocalStreams().length', '0');
86
87
                getUserMedia({audio:true, video:true}, gotStream2);
88
            }
89
90
            if (window.testRunner)
91
                testRunner.setUserMediaPermission(true);
92
            else {
93
                debug("This test can not be run without the testRunner");
94
                finishJSTest();
95
            }
96
97
            getUserMedia({audio:true, video:true}, gotStream1);
98
99
            window.jsTestIsAsync = true;
100
            window.successfullyParsed = true;
101
        </script>
102
        <script src="../../resources/js-test-post.js"></script>
103
    </body>
104
</html>
- a/LayoutTests/fast/mediastream/RTCPeerConnection-createAnswer-expected.txt -1 / +1 lines
Lines 3-9 Tests RTCPeerConnection createAnswer. a/LayoutTests/fast/mediastream/RTCPeerConnection-createAnswer-expected.txt_sec1
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
4
5
5
6
PASS pc.createAnswer(requestSucceeded1, requestFailed1); did not throw exception.
6
PASS pc.createAnswer().then(requestSucceeded1, requestFailed1); did not throw exception.
7
FAIL createAnswer request failed.
7
FAIL createAnswer request failed.
8
PASS successfullyParsed is true
8
PASS successfullyParsed is true
9
9
- a/LayoutTests/fast/mediastream/RTCPeerConnection-createAnswer.html -6 / +6 lines
Lines 26-32 a/LayoutTests/fast/mediastream/RTCPeerConnection-createAnswer.html_sec1
26
                sessionDescription = sd;
26
                sessionDescription = sd;
27
                shouldBe('sessionDescription.type', '"answer"');
27
                shouldBe('sessionDescription.type', '"answer"');
28
28
29
                shouldNotThrow('pc.createAnswer(requestSucceeded5, requestFailed1, {requestIdentity:"no"});');
29
                shouldNotThrow('pc.createAnswer({requestIdentity:"no"}).then(requestSucceeded5, requestFailed1);');
30
            }
30
            }
31
31
32
            function requestSucceeded3(sd)
32
            function requestSucceeded3(sd)
Lines 37-43 a/LayoutTests/fast/mediastream/RTCPeerConnection-createAnswer.html_sec2
37
                sessionDescription = sd;
37
                sessionDescription = sd;
38
                shouldBe('sessionDescription.type', '"answer"');
38
                shouldBe('sessionDescription.type', '"answer"');
39
39
40
                shouldNotThrow('pc.createAnswer(requestSucceeded4, requestFailed1, {requestIdentity:"yes"});');
40
                shouldNotThrow('pc.createAnswer({requestIdentity:"yes"}).then(requestSucceeded4, requestFailed1);');
41
            }
41
            }
42
42
43
            function requestFailed2(reason)
43
            function requestFailed2(reason)
Lines 46-52 a/LayoutTests/fast/mediastream/RTCPeerConnection-createAnswer.html_sec3
46
46
47
                errorReason = reason;
47
                errorReason = reason;
48
                shouldBe('errorReason.name', '"Invalid createAnswer argument."');
48
                shouldBe('errorReason.name', '"Invalid createAnswer argument."');
49
                shouldNotThrow('pc.createAnswer(requestSucceeded3, requestFailed1, {requestIdentity:"ifconfigured"});');
49
                shouldNotThrow('pc.createAnswer({requestIdentity:"ifconfigured"}).then(requestSucceeded3, requestFailed1);');
50
            }
50
            }
51
51
52
            function requestSucceeded2()
52
            function requestSucceeded2()
Lines 68-74 a/LayoutTests/fast/mediastream/RTCPeerConnection-createAnswer.html_sec4
68
                testPassed('createAnswer request succeeded.');
68
                testPassed('createAnswer request succeeded.');
69
69
70
                sessionDescription = new RTCSessionDescription({type:"offer", sdp:"v=0\r\no=- 5667094644266930845 0 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"});
70
                sessionDescription = new RTCSessionDescription({type:"offer", sdp:"v=0\r\no=- 5667094644266930845 0 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"});
71
                shouldNotThrow('pc.setRemoteDescription(sessionDescription, setDescriptionSucceeded, setDescriptionFailed);');
71
                shouldNotThrow('pc.setRemoteDescription(sessionDescription).then(setDescriptionSucceeded, setDescriptionFailed);');
72
            }
72
            }
73
73
74
            function setDescriptionFailed(message)
74
            function setDescriptionFailed(message)
Lines 81-91 a/LayoutTests/fast/mediastream/RTCPeerConnection-createAnswer.html_sec5
81
            function setDescriptionSucceeded()
81
            function setDescriptionSucceeded()
82
            {
82
            {
83
                testPassed('setRemoteDescription succeeded.');
83
                testPassed('setRemoteDescription succeeded.');
84
                pc.createAnswer(requestSucceeded2, requestFailed2, {});
84
                pc.createAnswer({}).then(requestSucceeded2, requestFailed2);
85
            }
85
            }
86
86
87
            pc = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
87
            pc = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
88
            shouldNotThrow('pc.createAnswer(requestSucceeded1, requestFailed1);');
88
            shouldNotThrow('pc.createAnswer().then(requestSucceeded1, requestFailed1);');
89
89
90
            window.jsTestIsAsync = true;
90
            window.jsTestIsAsync = true;
91
            window.successfullyParsed = true;
91
            window.successfullyParsed = true;
- a/LayoutTests/fast/mediastream/RTCPeerConnection-createOffer-expected.txt -14 lines
Lines 1-14 a/LayoutTests/fast/mediastream/RTCPeerConnection-createOffer-expected.txt_sec1
1
Tests RTCPeerConnection createOffer.
2
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6
PASS pc.createOffer(requestSucceeded1, requestFailed1); did not throw exception.
7
PASS createOffer request succeeded.
8
PASS sessionDescription.type is "offer"
9
FAIL pc.createOffer(requestSucceeded2, requestFailed2, {}); should throw an exception. Was [object Promise].
10
FAIL createOffer request succeeded.
11
PASS successfullyParsed is true
12
13
TEST COMPLETE
14
- a/LayoutTests/fast/mediastream/RTCPeerConnection-createOffer.html -118 lines
Lines 1-118 a/LayoutTests/fast/mediastream/RTCPeerConnection-createOffer.html_sec1
1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2
<html>
3
    <head>
4
        <script src="../../resources/js-test-pre.js"></script>
5
    </head>
6
    <body>
7
        <script>
8
            description("Tests RTCPeerConnection createOffer.");
9
10
            // Let's ensure built-ins are shielded from user scripts
11
            var thenPromise = Promise.prototype.then;
12
            Promise.prototype.then = function() {
13
                console.log("Promise.prototype.then is called internally");
14
                return thenPromise.apply(this, arguments);
15
            }
16
17
            var pc = null;
18
19
            function requestSucceeded3(sd)
20
            {
21
                testPassed('createOffer request succeeded.');
22
23
                sessionDescription = sd;
24
                shouldBe('sessionDescription.type', '"offer"');
25
                finishJSTest();
26
            }
27
28
            function requestFailed7(reason)
29
            {
30
                testPassed('createOffer request failed.');
31
32
                errorReason = reason;
33
                shouldBe('errorReason.name', '"Invalid createOffer argument."');
34
35
                shouldNotThrow('pc.createOffer(requestSucceeded3, requestFailed1, {requestIdentity:"yes", offerToReceiveVideo:0, offerToReceiveAudio:0});');
36
            }
37
38
            function requestFailed6(reason)
39
            {
40
                testPassed('createOffer request failed.');
41
42
                errorReason = reason;
43
                shouldBe('errorReason.name', '"Invalid createOffer argument."');
44
45
                shouldThrow('pc.createOffer(requestSucceeded2, requestFailed7, {requestIdentity:"yes", offerToReceiveVideo:0, offerToReceiveAudio:""});');
46
            }
47
48
            function requestFailed5(reason)
49
            {
50
                testPassed('createOffer request failed.');
51
52
                errorReason = reason;
53
                shouldBe('errorReason.name', '"Invalid createOffer argument."');
54
55
                shouldThrow('pc.createOffer(requestSucceeded2, requestFailed6, {requestIdentity:"yes", offerToReceiveVideo:"", offerToReceiveAudio:0});');
56
            }
57
58
            function requestFailed4(reason)
59
            {
60
                testPassed('createOffer request failed.');
61
62
                errorReason = reason;
63
                shouldBe('errorReason.name', '"Invalid createOffer argument."');
64
65
                shouldThrow('pc.createOffer(requestSucceeded2, requestFailed5, {offerToReceiveVideo:0, offerToReceiveAudio:0});');
66
            }
67
68
            function requestFailed3(reason)
69
            {
70
                testPassed('createOffer request failed.');
71
72
                errorReason = reason;
73
                shouldBe('errorReason.name', '"Invalid createOffer argument."');
74
75
                shouldThrow('pc.createOffer(requestSucceeded2, requestFailed4, {requestIdentity:"yes", offerToReceiveVideo:0});');
76
            }
77
78
            function requestFailed2(reason)
79
            {
80
                testPassed('createOffer request failed.');
81
82
                errorReason = reason;
83
                shouldBe('errorReason.name', '"Invalid createOffer argument."');
84
85
                shouldThrow('pc.createOffer(requestSucceeded2, requestFailed3, {requestIdentity:"yes", offerToReceiveAudio:0});');
86
            }
87
88
            function requestSucceeded2(sd)
89
            {
90
                testFailed('createOffer request succeeded.');
91
                finishJSTest();
92
            }
93
94
            function requestFailed1()
95
            {
96
                testFailed('createOffer request failed.');
97
                finishJSTest();
98
            }
99
100
            function requestSucceeded1(sd)
101
            {
102
                testPassed('createOffer request succeeded.');
103
104
                sessionDescription = sd;
105
                shouldBe('sessionDescription.type', '"offer"');
106
107
                shouldThrow('pc.createOffer(requestSucceeded2, requestFailed2, {});');
108
            }
109
110
            pc = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
111
            shouldNotThrow('pc.createOffer(requestSucceeded1, requestFailed1);');
112
113
            window.jsTestIsAsync = true;
114
            window.successfullyParsed = true;
115
        </script>
116
        <script src="../../resources/js-test-post.js"></script>
117
    </body>
118
</html>
- a/LayoutTests/fast/mediastream/RTCPeerConnection-dtmf.html -82 lines
Lines 1-82 a/LayoutTests/fast/mediastream/RTCPeerConnection-dtmf.html_sec1
1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2
<html>
3
    <head>
4
        <script src="../../resources/js-test-pre.js"></script>
5
    </head>
6
    <body>
7
        <script>
8
            description("Tests RTCDTMFSender.");
9
10
            var pc = null;
11
            var stream = null;
12
            var dtmfsender = null;
13
14
            function error() {
15
                testFailed('Error callback called.');
16
                finishJSTest();
17
            }
18
19
            var lastCall = false;
20
            var callCount = 1;
21
22
            function ontonechange(e) {
23
                event = e;
24
                testPassed("ontonechange was called " + event.tone);
25
                if (!lastCall) {
26
                    callCount++;
27
                    if (8 == callCount)
28
                        lastCall = true;
29
                } else {
30
                    shouldBeEmptyString('event.tone');
31
                    finishJSTest();
32
                }
33
            }
34
35
            function pc_onicechange() {
36
                if (pc.iceConnectionState === "completed") {
37
                    testPassed("pc is connected");
38
                    track = stream.getAudioTracks()[0];
39
40
                    shouldThrow('dtmfsender = pc.createDTMFSender(track);');
41
                    pc.addStream(stream);
42
                    shouldNotThrow('dtmfsender = pc.createDTMFSender(track);');
43
                    shouldBeTrue('dtmfsender.canInsertDTMF');
44
45
                    dtmfsender.ontonechange = ontonechange;
46
                    dtmfsender.insertDTMF("1");
47
                    shouldBe('dtmfsender.duration', "100");
48
                    shouldBe('dtmfsender.interToneGap', "70");
49
50
                    dtmfsender.insertDTMF("4", "40", "30");
51
                    shouldBe('dtmfsender.duration', "40");
52
                    shouldBe('dtmfsender.interToneGap', "30");
53
54
                    dtmfsender.insertDTMF("123", "6000");
55
                    shouldBe('dtmfsender.duration', "6000");
56
                    shouldBe('dtmfsender.interToneGap', "70");
57
58
                    shouldThrow('dtmfsender.insertDTMF("1", "20");');
59
                    shouldThrow('dtmfsender.insertDTMF("1", "7000");');
60
                    shouldThrow('dtmfsender.insertDTMF("1", "70", "10");');
61
62
                }
63
            }
64
65
            function gotStream(s) {
66
                stream = s;
67
                testPassed('Stream generated.');
68
                shouldBe('stream.getAudioTracks().length', '1');
69
                shouldBe('stream.getVideoTracks().length', '0');
70
71
                pc = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
72
                pc.oniceconnectionstatechange = pc_onicechange;
73
            }
74
75
            shouldNotThrow("navigator.webkitGetUserMedia({audio:true}, gotStream, error);");
76
77
            window.jsTestIsAsync = true;
78
            window.successfullyParsed = true;
79
        </script>
80
        <script src="../../resources/js-test-post.js"></script>
81
    </body>
82
</html>
- a/LayoutTests/fast/mediastream/RTCPeerConnection-events-expected.txt -10 lines
Lines 1-10 a/LayoutTests/fast/mediastream/RTCPeerConnection-events-expected.txt_sec1
1
Tests that RTCPeerConnection event callbacks are async so that for example close can be called safely. The order of the messages is very important.
2
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6
FAIL webkitGetUserMedia threw exception :TypeError: navigator.webkitGetUserMedia is not a function. (In 'navigator.webkitGetUserMedia(dictionary, callback, error)', 'navigator.webkitGetUserMedia' is undefined)
7
PASS successfullyParsed is true
8
9
TEST COMPLETE
10
- a/LayoutTests/fast/mediastream/RTCPeerConnection-events.html -58 lines
Lines 1-58 a/LayoutTests/fast/mediastream/RTCPeerConnection-events.html_sec1
1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2
<html>
3
    <head>
4
        <script src="../../resources/js-test-pre.js"></script>
5
    </head>
6
    <body>
7
        <script>
8
            description("Tests that RTCPeerConnection event callbacks are async so that for example close can be called safely. The order of the messages is very important.");
9
10
            var stream = null;
11
            var pc = null;
12
13
            function error() {
14
                testFailed('Stream generation failed.');
15
                finishJSTest();
16
            }
17
18
            function getUserMedia(dictionary, callback) {
19
                try {
20
                    navigator.webkitGetUserMedia(dictionary, callback, error);
21
                } catch (e) {
22
                    testFailed('webkitGetUserMedia threw exception :' + e);
23
                    finishJSTest();
24
                }
25
            }
26
27
            function onStateChange(event) {
28
                testPassed('onStateChange was called.');
29
                shouldBe("pc.signalingState", "'closed'");
30
                finishJSTest();
31
            }
32
33
            function onNegotiationNeeded(event) {
34
                testPassed('onNegotiationNeeded was called.');
35
                pc.onsignalingstatechange = onStateChange;
36
                pc.close();
37
                testPassed('onNegotiationNeeded done.')
38
            }
39
40
            function gotStream(s) {
41
                testPassed('gotStream was called.');
42
                stream = s;
43
44
                pc = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
45
                pc.onnegotiationneeded = onNegotiationNeeded;
46
47
                pc.addStream(stream);
48
                testPassed('gotStream done.');
49
            }
50
51
            getUserMedia({audio:true, video:true}, gotStream);
52
53
            window.jsTestIsAsync = true;
54
            window.successfullyParsed = true;
55
        </script>
56
        <script src="../../resources/js-test-post.js"></script>
57
    </body>
58
</html>
- a/LayoutTests/fast/mediastream/RTCPeerConnection-have-local-offer-expected.txt -1 / +1 lines
Lines 4-10 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE a/LayoutTests/fast/mediastream/RTCPeerConnection-have-local-offer-expected.txt_sec1
4
4
5
5
6
PASS pc.signalingState is "stable"
6
PASS pc.signalingState is "stable"
7
PASS pc.setLocalDescription(sessionDescription, requestSucceeded1, finishIfFailed); did not throw exception.
7
PASS pc.setLocalDescription(sessionDescription).then(requestSucceeded1, finishIfFailed); did not throw exception.
8
FAIL setRemoteDescription failed.
8
FAIL setRemoteDescription failed.
9
PASS successfullyParsed is true
9
PASS successfullyParsed is true
10
10
- a/LayoutTests/fast/mediastream/RTCPeerConnection-have-local-offer.html -8 / +8 lines
Lines 21-27 a/LayoutTests/fast/mediastream/RTCPeerConnection-have-local-offer.html_sec1
21
                testPassed('setLocalDescription succeeded.');
21
                testPassed('setLocalDescription succeeded.');
22
                check("offer", "local", "", "", '"have-local-offer"');
22
                check("offer", "local", "", "", '"have-local-offer"');
23
                sessionDescription = new RTCSessionDescription({type:"answer", sdp:"remote"});
23
                sessionDescription = new RTCSessionDescription({type:"answer", sdp:"remote"});
24
                shouldNotThrow('pc.setRemoteDescription(sessionDescription, requestSucceeded5, finishIfFailed);');
24
                shouldNotThrow('pc.setRemoteDescription(sessionDescription).then(requestSucceeded5, finishIfFailed);');
25
            }
25
            }
26
26
27
            function requestSucceeded3()
27
            function requestSucceeded3()
Lines 31-37 a/LayoutTests/fast/mediastream/RTCPeerConnection-have-local-offer.html_sec2
31
                pc = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
31
                pc = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
32
                check("", "", "", "", '"stable"');
32
                check("", "", "", "", '"stable"');
33
                sessionDescription = new RTCSessionDescription({type:"offer", sdp:"local"});
33
                sessionDescription = new RTCSessionDescription({type:"offer", sdp:"local"});
34
                shouldNotThrow('pc.setLocalDescription(sessionDescription, requestSucceeded4, finishIfFailed);');
34
                shouldNotThrow('pc.setLocalDescription(sessionDescription).then(requestSucceeded4, finishIfFailed);');
35
            }
35
            }
36
36
37
            function requestSucceeded2()
37
            function requestSucceeded2()
Lines 39-45 a/LayoutTests/fast/mediastream/RTCPeerConnection-have-local-offer.html_sec3
39
                testPassed('setLocalDescription succeeded.');
39
                testPassed('setLocalDescription succeeded.');
40
                check("offer", "local", "", "", '"have-local-offer"');
40
                check("offer", "local", "", "", '"have-local-offer"');
41
                sessionDescription = new RTCSessionDescription({type:"pranswer", sdp:"remote"});
41
                sessionDescription = new RTCSessionDescription({type:"pranswer", sdp:"remote"});
42
                shouldNotThrow('pc.setRemoteDescription(sessionDescription, requestSucceeded3, finishIfFailed);');
42
                shouldNotThrow('pc.setRemoteDescription(sessionDescription).then(requestSucceeded3, finishIfFailed);');
43
            }
43
            }
44
44
45
            function requestFailed3(reason)
45
            function requestFailed3(reason)
Lines 49-55 a/LayoutTests/fast/mediastream/RTCPeerConnection-have-local-offer.html_sec4
49
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
49
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
50
                check("offer", "local", "", "", '"have-local-offer"');
50
                check("offer", "local", "", "", '"have-local-offer"');
51
                sessionDescription = new RTCSessionDescription({type:"offer", sdp:"local"});
51
                sessionDescription = new RTCSessionDescription({type:"offer", sdp:"local"});
52
                shouldNotThrow('pc.setLocalDescription(sessionDescription, requestSucceeded2, finishIfFailed);');
52
                shouldNotThrow('pc.setLocalDescription(sessionDescription).then(requestSucceeded2, finishIfFailed);');
53
            }
53
            }
54
54
55
            function requestFailed2(reason)
55
            function requestFailed2(reason)
Lines 59-65 a/LayoutTests/fast/mediastream/RTCPeerConnection-have-local-offer.html_sec5
59
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
59
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
60
                check("offer", "local", "", "", '"have-local-offer"');
60
                check("offer", "local", "", "", '"have-local-offer"');
61
                sessionDescription = new RTCSessionDescription({type:"offer", sdp:"remote"});
61
                sessionDescription = new RTCSessionDescription({type:"offer", sdp:"remote"});
62
                shouldNotThrow('pc.setRemoteDescription(sessionDescription, finishIfSucceeded, requestFailed3);');
62
                shouldNotThrow('pc.setRemoteDescription(sessionDescription).then(finishIfSucceeded, requestFailed3);');
63
            }
63
            }
64
64
65
            function requestFailed1(reason)
65
            function requestFailed1(reason)
Lines 69-75 a/LayoutTests/fast/mediastream/RTCPeerConnection-have-local-offer.html_sec6
69
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
69
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
70
                check("offer", "local", "", "", '"have-local-offer"');
70
                check("offer", "local", "", "", '"have-local-offer"');
71
                sessionDescription = new RTCSessionDescription({type:"pranswer", sdp:"local"});
71
                sessionDescription = new RTCSessionDescription({type:"pranswer", sdp:"local"});
72
                shouldNotThrow('pc.setLocalDescription(sessionDescription, finishIfSucceeded, requestFailed2);');
72
                shouldNotThrow('pc.setLocalDescription(sessionDescription).then(finishIfSucceeded, requestFailed2);');
73
            }
73
            }
74
74
75
            function requestSucceeded1()
75
            function requestSucceeded1()
Lines 77-83 a/LayoutTests/fast/mediastream/RTCPeerConnection-have-local-offer.html_sec7
77
                testPassed('setLocalDescription succeeded.');
77
                testPassed('setLocalDescription succeeded.');
78
                check("offer", "local", "", "", '"have-local-offer"');
78
                check("offer", "local", "", "", '"have-local-offer"');
79
                sessionDescription = new RTCSessionDescription({type:"answer", sdp:"local"});
79
                sessionDescription = new RTCSessionDescription({type:"answer", sdp:"local"});
80
                shouldNotThrow('pc.setLocalDescription(sessionDescription, finishIfSucceeded, requestFailed1);');
80
                shouldNotThrow('pc.setLocalDescription(sessionDescription).then(finishIfSucceeded, requestFailed1);');
81
            }
81
            }
82
82
83
            function finishIfSucceeded()
83
            function finishIfSucceeded()
Lines 112-118 a/LayoutTests/fast/mediastream/RTCPeerConnection-have-local-offer.html_sec8
112
            pc = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
112
            pc = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
113
            shouldBe('pc.signalingState', '"stable"');
113
            shouldBe('pc.signalingState', '"stable"');
114
            var sessionDescription = new RTCSessionDescription({type:"offer", sdp:"local"});
114
            var sessionDescription = new RTCSessionDescription({type:"offer", sdp:"local"});
115
            shouldNotThrow('pc.setLocalDescription(sessionDescription, requestSucceeded1, finishIfFailed);');
115
            shouldNotThrow('pc.setLocalDescription(sessionDescription).then(requestSucceeded1, finishIfFailed);');
116
116
117
            window.jsTestIsAsync = true;
117
            window.jsTestIsAsync = true;
118
            window.successfullyParsed = true;
118
            window.successfullyParsed = true;
- a/LayoutTests/fast/mediastream/RTCPeerConnection-have-local-pranswer-expected.txt -1 / +1 lines
Lines 4-10 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE a/LayoutTests/fast/mediastream/RTCPeerConnection-have-local-pranswer-expected.txt_sec1
4
4
5
5
6
PASS pc.signalingState is "stable"
6
PASS pc.signalingState is "stable"
7
PASS pc.setRemoteDescription(sessionDescription, requestSucceeded1, finishIfFailed); did not throw exception.
7
PASS pc.setRemoteDescription(sessionDescription).then(requestSucceeded1, finishIfFailed); did not throw exception.
8
FAIL setRemoteDescription failed.
8
FAIL setRemoteDescription failed.
9
PASS successfullyParsed is true
9
PASS successfullyParsed is true
10
10
- a/LayoutTests/fast/mediastream/RTCPeerConnection-have-local-pranswer.html -8 / +8 lines
Lines 23-29 a/LayoutTests/fast/mediastream/RTCPeerConnection-have-local-pranswer.html_sec1
23
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
23
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
24
                check("pranswer", "local", "offer", "remote", '"have-local-pranswer"');
24
                check("pranswer", "local", "offer", "remote", '"have-local-pranswer"');
25
                sessionDescription = new RTCSessionDescription({type:"answer", sdp:"local"});
25
                sessionDescription = new RTCSessionDescription({type:"answer", sdp:"local"});
26
                shouldNotThrow('pc.setLocalDescription(sessionDescription, requestSucceeded4, finishIfFailed);');
26
                shouldNotThrow('pc.setLocalDescription(sessionDescription).then(requestSucceeded4, finishIfFailed);');
27
            }
27
            }
28
28
29
            function requestFailed3(reason)
29
            function requestFailed3(reason)
Lines 33-39 a/LayoutTests/fast/mediastream/RTCPeerConnection-have-local-pranswer.html_sec2
33
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
33
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
34
                check("pranswer", "local", "offer", "remote", '"have-local-pranswer"');
34
                check("pranswer", "local", "offer", "remote", '"have-local-pranswer"');
35
                sessionDescription = new RTCSessionDescription({type:"pranswer", sdp:"remote"});
35
                sessionDescription = new RTCSessionDescription({type:"pranswer", sdp:"remote"});
36
                shouldNotThrow('pc.setRemoteDescription(sessionDescription, finishIfSucceeded, requestFailed4);');
36
                shouldNotThrow('pc.setRemoteDescription(sessionDescription).then(finishIfSucceeded, requestFailed4);');
37
            }
37
            }
38
38
39
            function requestFailed2(reason)
39
            function requestFailed2(reason)
Lines 43-49 a/LayoutTests/fast/mediastream/RTCPeerConnection-have-local-pranswer.html_sec3
43
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
43
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
44
                check("pranswer", "local", "offer", "remote", '"have-local-pranswer"');
44
                check("pranswer", "local", "offer", "remote", '"have-local-pranswer"');
45
                sessionDescription = new RTCSessionDescription({type:"answer", sdp:"remote"});
45
                sessionDescription = new RTCSessionDescription({type:"answer", sdp:"remote"});
46
                shouldNotThrow('pc.setRemoteDescription(sessionDescription, finishIfSucceeded, requestFailed3);');
46
                shouldNotThrow('pc.setRemoteDescription(sessionDescription).then(finishIfSucceeded, requestFailed3);');
47
            }
47
            }
48
48
49
            function requestFailed1(reason)
49
            function requestFailed1(reason)
Lines 53-59 a/LayoutTests/fast/mediastream/RTCPeerConnection-have-local-pranswer.html_sec4
53
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
53
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
54
                check("pranswer", "local", "offer", "remote", '"have-local-pranswer"');
54
                check("pranswer", "local", "offer", "remote", '"have-local-pranswer"');
55
                sessionDescription = new RTCSessionDescription({type:"offer", sdp:"remote"});
55
                sessionDescription = new RTCSessionDescription({type:"offer", sdp:"remote"});
56
                shouldNotThrow('pc.setRemoteDescription(sessionDescription, finishIfSucceeded, requestFailed2);');
56
                shouldNotThrow('pc.setRemoteDescription(sessionDescription).then(finishIfSucceeded, requestFailed2);');
57
            }
57
            }
58
58
59
            function requestSucceeded3()
59
            function requestSucceeded3()
Lines 61-67 a/LayoutTests/fast/mediastream/RTCPeerConnection-have-local-pranswer.html_sec5
61
                testPassed('setLocalDescription succeeded.');
61
                testPassed('setLocalDescription succeeded.');
62
                check("pranswer", "local", "offer", "remote", '"have-local-pranswer"');
62
                check("pranswer", "local", "offer", "remote", '"have-local-pranswer"');
63
                sessionDescription = new RTCSessionDescription({type:"offer", sdp:"local"});
63
                sessionDescription = new RTCSessionDescription({type:"offer", sdp:"local"});
64
                shouldNotThrow('pc.setLocalDescription(sessionDescription, finishIfSucceeded, requestFailed1);');
64
                shouldNotThrow('pc.setLocalDescription(sessionDescription).then(finishIfSucceeded, requestFailed1);');
65
            }
65
            }
66
66
67
            function requestSucceeded2()
67
            function requestSucceeded2()
Lines 69-75 a/LayoutTests/fast/mediastream/RTCPeerConnection-have-local-pranswer.html_sec6
69
                testPassed('setLocalDescription succeeded.');
69
                testPassed('setLocalDescription succeeded.');
70
                check("pranswer", "local", "offer", "remote", '"have-local-pranswer"');
70
                check("pranswer", "local", "offer", "remote", '"have-local-pranswer"');
71
                sessionDescription = new RTCSessionDescription({type:"pranswer", sdp:"local"});
71
                sessionDescription = new RTCSessionDescription({type:"pranswer", sdp:"local"});
72
                shouldNotThrow('pc.setLocalDescription(sessionDescription, requestSucceeded3, finishIfFailed);');
72
                shouldNotThrow('pc.setLocalDescription(sessionDescription).then(requestSucceeded3, finishIfFailed);');
73
            }
73
            }
74
74
75
            function requestSucceeded1()
75
            function requestSucceeded1()
Lines 77-83 a/LayoutTests/fast/mediastream/RTCPeerConnection-have-local-pranswer.html_sec7
77
                testPassed('setRemoteDescription succeeded.');
77
                testPassed('setRemoteDescription succeeded.');
78
                check("", "", "offer", "remote", '"have-remote-offer"');
78
                check("", "", "offer", "remote", '"have-remote-offer"');
79
                sessionDescription = new RTCSessionDescription({type:"pranswer", sdp:"local"});
79
                sessionDescription = new RTCSessionDescription({type:"pranswer", sdp:"local"});
80
                shouldNotThrow('pc.setLocalDescription(sessionDescription, requestSucceeded2, finishIfFailed);');
80
                shouldNotThrow('pc.setLocalDescription(sessionDescription).then(requestSucceeded2, finishIfFailed);');
81
            }
81
            }
82
82
83
            function finishIfSucceeded()
83
            function finishIfSucceeded()
Lines 108-114 a/LayoutTests/fast/mediastream/RTCPeerConnection-have-local-pranswer.html_sec8
108
            pc = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
108
            pc = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
109
            shouldBe('pc.signalingState', '"stable"');
109
            shouldBe('pc.signalingState', '"stable"');
110
            var sessionDescription = new RTCSessionDescription({type:"offer", sdp:"remote"});
110
            var sessionDescription = new RTCSessionDescription({type:"offer", sdp:"remote"});
111
            shouldNotThrow('pc.setRemoteDescription(sessionDescription, requestSucceeded1, finishIfFailed);');
111
            shouldNotThrow('pc.setRemoteDescription(sessionDescription).then(requestSucceeded1, finishIfFailed);');
112
112
113
            window.jsTestIsAsync = true;
113
            window.jsTestIsAsync = true;
114
            window.successfullyParsed = true;
114
            window.successfullyParsed = true;
- a/LayoutTests/fast/mediastream/RTCPeerConnection-have-remote-offer-expected.txt -1 / +1 lines
Lines 4-10 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE a/LayoutTests/fast/mediastream/RTCPeerConnection-have-remote-offer-expected.txt_sec1
4
4
5
5
6
PASS pc.signalingState is "stable"
6
PASS pc.signalingState is "stable"
7
PASS pc.setRemoteDescription(sessionDescription, requestSucceeded1, finishIfFailed); did not throw exception.
7
PASS pc.setRemoteDescription(sessionDescription).then(requestSucceeded1, finishIfFailed); did not throw exception.
8
FAIL setRemoteDescription failed.
8
FAIL setRemoteDescription failed.
9
PASS successfullyParsed is true
9
PASS successfullyParsed is true
10
10
- a/LayoutTests/fast/mediastream/RTCPeerConnection-have-remote-offer.html -8 / +8 lines
Lines 21-27 a/LayoutTests/fast/mediastream/RTCPeerConnection-have-remote-offer.html_sec1
21
                testPassed('setRemoteDescription succeeded.');
21
                testPassed('setRemoteDescription succeeded.');
22
                check("", "", "offer", "remote", '"have-remote-offer"');
22
                check("", "", "offer", "remote", '"have-remote-offer"');
23
                sessionDescription = new RTCSessionDescription({type:"pranswer", sdp:"local"});
23
                sessionDescription = new RTCSessionDescription({type:"pranswer", sdp:"local"});
24
                shouldNotThrow('pc.setLocalDescription(sessionDescription, requestSucceeded5, finishIfFailed);');
24
                shouldNotThrow('pc.setLocalDescription(sessionDescription).then(requestSucceeded5, finishIfFailed);');
25
            }
25
            }
26
26
27
            function requestSucceeded3()
27
            function requestSucceeded3()
Lines 31-37 a/LayoutTests/fast/mediastream/RTCPeerConnection-have-remote-offer.html_sec2
31
                pc = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
31
                pc = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
32
                check("", "", "", "", '"stable"');
32
                check("", "", "", "", '"stable"');
33
                sessionDescription = new RTCSessionDescription({type:"offer", sdp:"remote"});
33
                sessionDescription = new RTCSessionDescription({type:"offer", sdp:"remote"});
34
                shouldNotThrow('pc.setRemoteDescription(sessionDescription, requestSucceeded4, finishIfFailed);');
34
                shouldNotThrow('pc.setRemoteDescription(sessionDescription).then(requestSucceeded4, finishIfFailed);');
35
            }
35
            }
36
36
37
            function requestSucceeded2()
37
            function requestSucceeded2()
Lines 39-45 a/LayoutTests/fast/mediastream/RTCPeerConnection-have-remote-offer.html_sec3
39
                testPassed('setRemoteDescription succeeded.');
39
                testPassed('setRemoteDescription succeeded.');
40
                check("", "", "offer", "remote", '"have-remote-offer"');
40
                check("", "", "offer", "remote", '"have-remote-offer"');
41
                sessionDescription = new RTCSessionDescription({type:"answer", sdp:"local"});
41
                sessionDescription = new RTCSessionDescription({type:"answer", sdp:"local"});
42
                shouldNotThrow('pc.setLocalDescription(sessionDescription, requestSucceeded3, finishIfFailed);');
42
                shouldNotThrow('pc.setLocalDescription(sessionDescription).then(requestSucceeded3, finishIfFailed);');
43
            }
43
            }
44
44
45
            function requestFailed3(reason)
45
            function requestFailed3(reason)
Lines 49-55 a/LayoutTests/fast/mediastream/RTCPeerConnection-have-remote-offer.html_sec4
49
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
49
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
50
                check("", "", "offer", "remote", '"have-remote-offer"');
50
                check("", "", "offer", "remote", '"have-remote-offer"');
51
                sessionDescription = new RTCSessionDescription({type:"offer", sdp:"remote"});
51
                sessionDescription = new RTCSessionDescription({type:"offer", sdp:"remote"});
52
                shouldNotThrow('pc.setRemoteDescription(sessionDescription, requestSucceeded2, finishIfFailed);');
52
                shouldNotThrow('pc.setRemoteDescription(sessionDescription).then(requestSucceeded2, finishIfFailed);');
53
            }
53
            }
54
54
55
            function requestFailed2(reason)
55
            function requestFailed2(reason)
Lines 59-65 a/LayoutTests/fast/mediastream/RTCPeerConnection-have-remote-offer.html_sec5
59
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
59
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
60
                check("", "", "offer", "remote", '"have-remote-offer"');
60
                check("", "", "offer", "remote", '"have-remote-offer"');
61
                sessionDescription = new RTCSessionDescription({type:"answer", sdp:"remote"});
61
                sessionDescription = new RTCSessionDescription({type:"answer", sdp:"remote"});
62
                shouldNotThrow('pc.setRemoteDescription(sessionDescription, finishIfSucceeded, requestFailed3);');
62
                shouldNotThrow('pc.setRemoteDescription(sessionDescription).then(finishIfSucceeded, requestFailed3);');
63
            }
63
            }
64
64
65
            function requestFailed1(reason)
65
            function requestFailed1(reason)
Lines 69-75 a/LayoutTests/fast/mediastream/RTCPeerConnection-have-remote-offer.html_sec6
69
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
69
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
70
                check("", "", "offer", "remote", '"have-remote-offer"');
70
                check("", "", "offer", "remote", '"have-remote-offer"');
71
                sessionDescription = new RTCSessionDescription({type:"pranswer", sdp:"remote"});
71
                sessionDescription = new RTCSessionDescription({type:"pranswer", sdp:"remote"});
72
                shouldNotThrow('pc.setRemoteDescription(sessionDescription, finishIfSucceeded, requestFailed2);');
72
                shouldNotThrow('pc.setRemoteDescription(sessionDescription).then(finishIfSucceeded, requestFailed2);');
73
            }
73
            }
74
74
75
            function requestSucceeded1()
75
            function requestSucceeded1()
Lines 77-83 a/LayoutTests/fast/mediastream/RTCPeerConnection-have-remote-offer.html_sec7
77
                testPassed('setRemoteDescription succeeded.');
77
                testPassed('setRemoteDescription succeeded.');
78
                check("", "", "offer", "remote", '"have-remote-offer"');
78
                check("", "", "offer", "remote", '"have-remote-offer"');
79
                sessionDescription = new RTCSessionDescription({type:"offer", sdp:"local"});
79
                sessionDescription = new RTCSessionDescription({type:"offer", sdp:"local"});
80
                shouldNotThrow('pc.setLocalDescription(sessionDescription, finishIfSucceeded, requestFailed1);');
80
                shouldNotThrow('pc.setLocalDescription(sessionDescription).then(finishIfSucceeded, requestFailed1);');
81
            }
81
            }
82
82
83
            function finishIfSucceeded()
83
            function finishIfSucceeded()
Lines 112-118 a/LayoutTests/fast/mediastream/RTCPeerConnection-have-remote-offer.html_sec8
112
            pc = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
112
            pc = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
113
            shouldBe('pc.signalingState', '"stable"');
113
            shouldBe('pc.signalingState', '"stable"');
114
            var sessionDescription = new RTCSessionDescription({type:"offer", sdp:"remote"});
114
            var sessionDescription = new RTCSessionDescription({type:"offer", sdp:"remote"});
115
            shouldNotThrow('pc.setRemoteDescription(sessionDescription, requestSucceeded1, finishIfFailed);');
115
            shouldNotThrow('pc.setRemoteDescription(sessionDescription).then(requestSucceeded1, finishIfFailed);');
116
116
117
            window.jsTestIsAsync = true;
117
            window.jsTestIsAsync = true;
118
            window.successfullyParsed = true;
118
            window.successfullyParsed = true;
- a/LayoutTests/fast/mediastream/RTCPeerConnection-have-remote-pranswer-expected.txt -1 / +1 lines
Lines 4-10 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE a/LayoutTests/fast/mediastream/RTCPeerConnection-have-remote-pranswer-expected.txt_sec1
4
4
5
5
6
PASS pc.signalingState is "stable"
6
PASS pc.signalingState is "stable"
7
PASS pc.setLocalDescription(sessionDescription, requestSucceeded1, finishIfFailed); did not throw exception.
7
PASS pc.setLocalDescription(sessionDescription).then(requestSucceeded1, finishIfFailed); did not throw exception.
8
FAIL setRemoteDescription failed.
8
FAIL setRemoteDescription failed.
9
PASS successfullyParsed is true
9
PASS successfullyParsed is true
10
10
- a/LayoutTests/fast/mediastream/RTCPeerConnection-have-remote-pranswer.html -8 / +8 lines
Lines 23-29 a/LayoutTests/fast/mediastream/RTCPeerConnection-have-remote-pranswer.html_sec1
23
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
23
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
24
                check("offer", "local", "pranswer", "remote", '"have-remote-pranswer"');
24
                check("offer", "local", "pranswer", "remote", '"have-remote-pranswer"');
25
                sessionDescription = new RTCSessionDescription({type:"answer", sdp:"remote"});
25
                sessionDescription = new RTCSessionDescription({type:"answer", sdp:"remote"});
26
                shouldNotThrow('pc.setRemoteDescription(sessionDescription, requestSucceeded4, finishIfFailed);');
26
                shouldNotThrow('pc.setRemoteDescription(sessionDescription).then(requestSucceeded4, finishIfFailed);');
27
            }
27
            }
28
28
29
            function requestFailed3(reason)
29
            function requestFailed3(reason)
Lines 33-39 a/LayoutTests/fast/mediastream/RTCPeerConnection-have-remote-pranswer.html_sec2
33
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
33
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
34
                check("offer", "local", "pranswer", "remote", '"have-remote-pranswer"');
34
                check("offer", "local", "pranswer", "remote", '"have-remote-pranswer"');
35
                sessionDescription = new RTCSessionDescription({type:"pranswer", sdp:"local"});
35
                sessionDescription = new RTCSessionDescription({type:"pranswer", sdp:"local"});
36
                shouldNotThrow('pc.setLocalDescription(sessionDescription, finishIfSucceeded, requestFailed4);');
36
                shouldNotThrow('pc.setLocalDescription(sessionDescription).then(finishIfSucceeded, requestFailed4);');
37
            }
37
            }
38
38
39
            function requestFailed2(reason)
39
            function requestFailed2(reason)
Lines 43-49 a/LayoutTests/fast/mediastream/RTCPeerConnection-have-remote-pranswer.html_sec3
43
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
43
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
44
                check("offer", "local", "pranswer", "remote", '"have-remote-pranswer"');
44
                check("offer", "local", "pranswer", "remote", '"have-remote-pranswer"');
45
                sessionDescription = new RTCSessionDescription({type:"answer", sdp:"local"});
45
                sessionDescription = new RTCSessionDescription({type:"answer", sdp:"local"});
46
                shouldNotThrow('pc.setLocalDescription(sessionDescription, finishIfSucceeded, requestFailed3);');
46
                shouldNotThrow('pc.setLocalDescription(sessionDescription).then(finishIfSucceeded, requestFailed3);');
47
            }
47
            }
48
48
49
            function requestFailed1(reason)
49
            function requestFailed1(reason)
Lines 53-59 a/LayoutTests/fast/mediastream/RTCPeerConnection-have-remote-pranswer.html_sec4
53
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
53
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
54
                check("offer", "local", "pranswer", "remote", '"have-remote-pranswer"');
54
                check("offer", "local", "pranswer", "remote", '"have-remote-pranswer"');
55
                sessionDescription = new RTCSessionDescription({type:"offer", sdp:"local"});
55
                sessionDescription = new RTCSessionDescription({type:"offer", sdp:"local"});
56
                shouldNotThrow('pc.setLocalDescription(sessionDescription, finishIfSucceeded, requestFailed2);');
56
                shouldNotThrow('pc.setLocalDescription(sessionDescription).then(finishIfSucceeded, requestFailed2);');
57
            }
57
            }
58
58
59
            function requestSucceeded3()
59
            function requestSucceeded3()
Lines 61-67 a/LayoutTests/fast/mediastream/RTCPeerConnection-have-remote-pranswer.html_sec5
61
                testPassed('setRemoteDescription succeeded.');
61
                testPassed('setRemoteDescription succeeded.');
62
                check("offer", "local", "pranswer", "remote", '"have-remote-pranswer"');
62
                check("offer", "local", "pranswer", "remote", '"have-remote-pranswer"');
63
                sessionDescription = new RTCSessionDescription({type:"offer", sdp:"remote"});
63
                sessionDescription = new RTCSessionDescription({type:"offer", sdp:"remote"});
64
                shouldNotThrow('pc.setRemoteDescription(sessionDescription, finishIfSucceeded, requestFailed1);');
64
                shouldNotThrow('pc.setRemoteDescription(sessionDescription).then(finishIfSucceeded, requestFailed1);');
65
            }
65
            }
66
66
67
            function requestSucceeded2()
67
            function requestSucceeded2()
Lines 69-75 a/LayoutTests/fast/mediastream/RTCPeerConnection-have-remote-pranswer.html_sec6
69
                testPassed('setRemoteDescription succeeded.');
69
                testPassed('setRemoteDescription succeeded.');
70
                check("offer", "local", "pranswer", "remote", '"have-remote-pranswer"');
70
                check("offer", "local", "pranswer", "remote", '"have-remote-pranswer"');
71
                sessionDescription = new RTCSessionDescription({type:"pranswer", sdp:"remote"});
71
                sessionDescription = new RTCSessionDescription({type:"pranswer", sdp:"remote"});
72
                shouldNotThrow('pc.setRemoteDescription(sessionDescription, requestSucceeded3, finishIfFailed);');
72
                shouldNotThrow('pc.setRemoteDescription(sessionDescription).then(requestSucceeded3, finishIfFailed);');
73
            }
73
            }
74
74
75
            function requestSucceeded1()
75
            function requestSucceeded1()
Lines 77-83 a/LayoutTests/fast/mediastream/RTCPeerConnection-have-remote-pranswer.html_sec7
77
                testPassed('setLocalDescription succeeded.');
77
                testPassed('setLocalDescription succeeded.');
78
                check("offer", "local", "", "", '"have-local-offer"');
78
                check("offer", "local", "", "", '"have-local-offer"');
79
                sessionDescription = new RTCSessionDescription({type:"pranswer", sdp:"remote"});
79
                sessionDescription = new RTCSessionDescription({type:"pranswer", sdp:"remote"});
80
                shouldNotThrow('pc.setRemoteDescription(sessionDescription, requestSucceeded2, finishIfFailed);');
80
                shouldNotThrow('pc.setRemoteDescription(sessionDescription).then(requestSucceeded2, finishIfFailed);');
81
            }
81
            }
82
82
83
            function finishIfSucceeded()
83
            function finishIfSucceeded()
Lines 108-114 a/LayoutTests/fast/mediastream/RTCPeerConnection-have-remote-pranswer.html_sec8
108
            pc = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
108
            pc = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
109
            shouldBe('pc.signalingState', '"stable"');
109
            shouldBe('pc.signalingState', '"stable"');
110
            var sessionDescription = new RTCSessionDescription({type:"offer", sdp:"local"});
110
            var sessionDescription = new RTCSessionDescription({type:"offer", sdp:"local"});
111
            shouldNotThrow('pc.setLocalDescription(sessionDescription, requestSucceeded1, finishIfFailed);');
111
            shouldNotThrow('pc.setLocalDescription(sessionDescription).then(requestSucceeded1, finishIfFailed);');
112
112
113
            window.jsTestIsAsync = true;
113
            window.jsTestIsAsync = true;
114
            window.successfullyParsed = true;
114
            window.successfullyParsed = true;
- a/LayoutTests/fast/mediastream/RTCPeerConnection-legacy-stream-based-api-expected.txt -57 lines
Lines 1-57 a/LayoutTests/fast/mediastream/RTCPeerConnection-legacy-stream-based-api-expected.txt_sec1
1
Test RTCPeerConnection's legacy MediaStream-based API
2
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6
Stream sets should be empty initially
7
PASS pc.getLocalStreams().length is 0
8
PASS pc.getRemoteStreams().length is 0
9
10
Test with single track MediaStream
11
audioTrack = stream.getAudioTracks()[0]
12
PASS pc.addStream(stream) did not throw exception.
13
PASS pc.getLocalStreams().length is 1
14
PASS pc.getLocalStreams()[0] is stream
15
PASS pc.getStreamById(stream.id) is stream
16
PASS pc.getSenders().length is 1
17
PASS pc.getSenders()[0].track is audioTrack
18
Adding the same stream again should be a no-op
19
PASS pc.addStream(stream) did not throw exception.
20
PASS pc.getLocalStreams().length is 1
21
22
Test with audio and video MediaStream
23
audioTrack = stream.getAudioTracks()[0]
24
videoTrack = stream.getVideoTracks()[0]
25
PASS pc.addStream(stream) did not throw exception.
26
PASS pc.getLocalStreams().length is 2
27
PASS pc.getLocalStreams().includes(stream) is true
28
PASS pc.getStreamById(stream.id) is stream
29
PASS pc.getSenders().length is 3
30
PASS audioTrackFoundAmongSenders is true
31
PASS videoTrackFoundAmongSenders is true
32
33
Test removeStream
34
Remove a non-existent stream
35
otherStream = stream.clone()
36
PASS pc.removeStream(otherStream) did not throw exception.
37
Both streams should still be present
38
PASS pc.getLocalStreams().length is 2
39
PASS pc.removeStream(stream) did not throw exception.
40
PASS pc.getLocalStreams().length is 1
41
PASS pc.getStreamById(stream.id) is null
42
All senders should still be present
43
PASS pc.getSenders().length is 3
44
Removing the same stream again should be a no-op
45
PASS pc.removeStream(stream) did not throw exception.
46
PASS pc.getLocalStreams().length is 1
47
48
Test applying a remote description offering a stream with two tracks
49
Create remote offer
50
Got remote offer, set it
51
Remote offer set
52
PASS End of test promise chain
53
54
PASS successfullyParsed is true
55
56
TEST COMPLETE
57
- a/LayoutTests/fast/mediastream/RTCPeerConnection-legacy-stream-based-api.html -144 lines
Lines 1-144 a/LayoutTests/fast/mediastream/RTCPeerConnection-legacy-stream-based-api.html_sec1
1
<!DOCTYPE html>
2
<html>
3
    <head>
4
        <script src="../../resources/js-test-pre.js"></script>
5
    </head>
6
    <body>
7
        <script>
8
            if (window.internals)
9
                internals.useMockRTCPeerConnectionFactory("");
10
11
            description("Test RTCPeerConnection's legacy MediaStream-based API");
12
13
            let stream;
14
            let otherStream;
15
            let audioTrack;
16
            let videoTrack;
17
            let audioTrackFoundAmongSenders;
18
            let videoTrackFoundAmongSenders;
19
            let remoteStream;
20
21
            if (window.testRunner)
22
                testRunner.setUserMediaPermission(true);
23
            else {
24
                debug("This test can not be run without the testRunner");
25
                finishJSTest();
26
            }
27
28
            const pc = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
29
            const remotePc = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
30
31
            debug("Stream sets should be empty initially")
32
            shouldBe("pc.getLocalStreams().length", "0");
33
            shouldBe("pc.getRemoteStreams().length", "0");
34
35
            pc.onaddstream = evt => {
36
                testPassed("Got 'addstream' event (before setRemoteDescription promise fulfilled)");
37
                remoteStream = evt.stream;
38
39
                shouldBe("remoteStream.getTracks().length", "2");
40
41
                shouldBe("pc.getRemoteStreams().length", "1");
42
                shouldBe("pc.getRemoteStreams()[0]", "remoteStream");
43
44
                shouldBe("pc.getStreamById(remoteStream.id)", "remoteStream");
45
            };
46
47
            navigator.mediaDevices.getUserMedia({ "audio": true })
48
            .then(s => {
49
                stream = s;
50
51
                debug("<br>Test with single track MediaStream");
52
                evalAndLog("audioTrack = stream.getAudioTracks()[0]");
53
                shouldNotThrow("pc.addStream(stream)");
54
55
                shouldBe("pc.getLocalStreams().length", "1");
56
                shouldBe("pc.getLocalStreams()[0]", "stream");
57
58
                shouldBe("pc.getStreamById(stream.id)", "stream");
59
60
                shouldBe("pc.getSenders().length", "1");
61
                shouldBe("pc.getSenders()[0].track", "audioTrack");
62
63
                debug("Adding the same stream again should be a no-op");
64
                shouldNotThrow("pc.addStream(stream)");
65
                shouldBe("pc.getLocalStreams().length", "1");
66
67
                return navigator.mediaDevices.getUserMedia({ "audio": true, "video": true });
68
            })
69
            .then(s => {
70
                stream = s;
71
72
                debug("<br>Test with audio and video MediaStream");
73
                evalAndLog("audioTrack = stream.getAudioTracks()[0]");
74
                evalAndLog("videoTrack = stream.getVideoTracks()[0]");
75
76
                shouldNotThrow("pc.addStream(stream)");
77
78
                shouldBe("pc.getLocalStreams().length", "2");
79
                shouldBeTrue("pc.getLocalStreams().includes(stream)");
80
81
                shouldBe("pc.getStreamById(stream.id)", "stream");
82
83
                shouldBe("pc.getSenders().length", "3");
84
85
                audioTrackFoundAmongSenders = false;
86
                videoTrackFoundAmongSenders = false;
87
                pc.getSenders().forEach(sender => {
88
                    if (sender.track === audioTrack)
89
                        audioTrackFoundAmongSenders = true;
90
                    else if (sender.track === videoTrack)
91
                        videoTrackFoundAmongSenders = true;
92
                });
93
94
                shouldBeTrue("audioTrackFoundAmongSenders");
95
                shouldBeTrue("videoTrackFoundAmongSenders");
96
97
                debug("<br>Test removeStream");
98
                debug("Remove a non-existent stream");
99
                evalAndLog("otherStream = stream.clone()");
100
                shouldNotThrow("pc.removeStream(otherStream)");
101
102
                debug("Both streams should still be present");
103
                shouldBe("pc.getLocalStreams().length", "2");
104
105
                shouldNotThrow("pc.removeStream(stream)");
106
107
                shouldBe("pc.getLocalStreams().length", "1");
108
                shouldBe("pc.getStreamById(stream.id)", "null");
109
110
                debug("All senders should still be present")
111
                shouldBe("pc.getSenders().length", "3");
112
113
                debug("Removing the same stream again should be a no-op");
114
                shouldNotThrow("pc.removeStream(stream)");
115
                shouldBe("pc.getLocalStreams().length", "1");
116
117
                debug("<br>Test applying a remote description offering a stream with two tracks");
118
                remotePc.addStream(stream);
119
120
                debug("Create remote offer");
121
                return remotePc.createOffer();
122
            })
123
            .then(remoteOffer => {
124
                debug("Got remote offer, set it");
125
                return pc.setRemoteDescription(remoteOffer);
126
            })
127
            .then(() => {
128
                debug("Remote offer set");
129
                testPassed("End of test promise chain");
130
                debug("");
131
132
                finishJSTest();
133
            })
134
            .catch(error => {
135
                testFailed("Error in promise chain: " + error);
136
                finishJSTest();
137
            });
138
139
            window.jsTestIsAsync = true;
140
            window.successfullyParsed = true;
141
        </script>
142
        <script src="../../resources/js-test-post.js"></script>
143
    </body>
144
</html>
- a/LayoutTests/fast/mediastream/RTCPeerConnection-localDescription-expected.txt -1 / +1 lines
Lines 3-9 Tests RTCPeerConnection localDescription. a/LayoutTests/fast/mediastream/RTCPeerConnection-localDescription-expected.txt_sec1
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
4
5
5
6
PASS pc.setLocalDescription(sessionDescription, requestSucceeded1, requestFailed1); did not throw exception.
6
PASS pc.setLocalDescription(sessionDescription).then(requestSucceeded1, requestFailed1); did not throw exception.
7
FAIL requestFailed was called.
7
FAIL requestFailed was called.
8
PASS successfullyParsed is true
8
PASS successfullyParsed is true
9
9
- a/LayoutTests/fast/mediastream/RTCPeerConnection-localDescription.html -2 / +2 lines
Lines 39-50 a/LayoutTests/fast/mediastream/RTCPeerConnection-localDescription.html_sec1
39
                testPassed('requestSucceeded was called.');
39
                testPassed('requestSucceeded was called.');
40
40
41
                sessionDescription = new RTCSessionDescription({type:"answer", sdp:"remote"});
41
                sessionDescription = new RTCSessionDescription({type:"answer", sdp:"remote"});
42
                shouldNotThrow('pc.setLocalDescription(sessionDescription, requestSucceeded2, requestFailed2);');
42
                shouldNotThrow('pc.setLocalDescription(sessionDescription).then(requestSucceeded2, requestFailed2);');
43
            }
43
            }
44
44
45
            pc = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
45
            pc = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
46
            var sessionDescription = new RTCSessionDescription({type:"offer", sdp:"local"});
46
            var sessionDescription = new RTCSessionDescription({type:"offer", sdp:"local"});
47
            shouldNotThrow('pc.setLocalDescription(sessionDescription, requestSucceeded1, requestFailed1);');
47
            shouldNotThrow('pc.setLocalDescription(sessionDescription).then(requestSucceeded1, requestFailed1);');
48
48
49
49
50
            window.jsTestIsAsync = true;
50
            window.jsTestIsAsync = true;
- a/LayoutTests/fast/mediastream/RTCPeerConnection-remoteDescription-expected.txt -1 / +1 lines
Lines 3-9 Tests RTCPeerConnection remoteDescription. a/LayoutTests/fast/mediastream/RTCPeerConnection-remoteDescription-expected.txt_sec1
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
4
5
5
6
PASS pc.setRemoteDescription(sessionDescription, requestSucceeded1, requestFailed1); did not throw exception.
6
PASS pc.setRemoteDescription(sessionDescription).then(requestSucceeded1, requestFailed1); did not throw exception.
7
FAIL requestFailed was called.
7
FAIL requestFailed was called.
8
PASS successfullyParsed is true
8
PASS successfullyParsed is true
9
9
- a/LayoutTests/fast/mediastream/RTCPeerConnection-remoteDescription.html -2 / +2 lines
Lines 39-50 a/LayoutTests/fast/mediastream/RTCPeerConnection-remoteDescription.html_sec1
39
                testPassed('requestSucceeded was called.');
39
                testPassed('requestSucceeded was called.');
40
40
41
                sessionDescription = new RTCSessionDescription({type:"answer", sdp:"local"});
41
                sessionDescription = new RTCSessionDescription({type:"answer", sdp:"local"});
42
                shouldNotThrow('pc.setRemoteDescription(sessionDescription, requestSucceeded2, requestFailed2);');
42
                shouldNotThrow('pc.setRemoteDescription(sessionDescription).then(requestSucceeded2, requestFailed2);');
43
            }
43
            }
44
44
45
            pc = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
45
            pc = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
46
            var sessionDescription = new RTCSessionDescription({type:"offer", sdp:"remote"});
46
            var sessionDescription = new RTCSessionDescription({type:"offer", sdp:"remote"});
47
            shouldNotThrow('pc.setRemoteDescription(sessionDescription, requestSucceeded1, requestFailed1);');
47
            shouldNotThrow('pc.setRemoteDescription(sessionDescription).then(requestSucceeded1, requestFailed1);');
48
48
49
49
50
            window.jsTestIsAsync = true;
50
            window.jsTestIsAsync = true;
- a/LayoutTests/fast/mediastream/RTCPeerConnection-stable-expected.txt -5 / +5 lines
Lines 4-34 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE a/LayoutTests/fast/mediastream/RTCPeerConnection-stable-expected.txt_sec1
4
4
5
5
6
PASS pc.signalingState is "stable"
6
PASS pc.signalingState is "stable"
7
PASS pc.setLocalDescription(sessionDescription, finishIfSucceeded, requestFailed1); did not throw exception.
7
PASS pc.setLocalDescription(sessionDescription).then(finishIfSucceeded, requestFailed1); did not throw exception.
8
PASS setLocalDescription failed.
8
PASS setLocalDescription failed.
9
FAIL errorReason.name should be InvalidSessionDescriptionError. Was InvalidStateError.
9
FAIL errorReason.name should be InvalidSessionDescriptionError. Was InvalidStateError.
10
FAIL pc.localDescription should throw an exception. Was null.
10
FAIL pc.localDescription should throw an exception. Was null.
11
FAIL pc.remoteDescription should throw an exception. Was null.
11
FAIL pc.remoteDescription should throw an exception. Was null.
12
PASS pc.signalingState is "stable"
12
PASS pc.signalingState is "stable"
13
PASS pc.setLocalDescription(sessionDescription, finishIfSucceeded, requestFailed2); did not throw exception.
13
PASS pc.setLocalDescription(sessionDescription).then(finishIfSucceeded, requestFailed2); did not throw exception.
14
PASS setLocalDescription failed.
14
PASS setLocalDescription failed.
15
FAIL errorReason.name should be InvalidSessionDescriptionError. Was InvalidStateError.
15
FAIL errorReason.name should be InvalidSessionDescriptionError. Was InvalidStateError.
16
FAIL pc.localDescription should throw an exception. Was null.
16
FAIL pc.localDescription should throw an exception. Was null.
17
FAIL pc.remoteDescription should throw an exception. Was null.
17
FAIL pc.remoteDescription should throw an exception. Was null.
18
PASS pc.signalingState is "stable"
18
PASS pc.signalingState is "stable"
19
PASS pc.setRemoteDescription(sessionDescription, finishIfSucceeded, requestFailed3); did not throw exception.
19
PASS pc.setRemoteDescription(sessionDescription).then(finishIfSucceeded, requestFailed3); did not throw exception.
20
PASS setRemoteDescription failed.
20
PASS setRemoteDescription failed.
21
FAIL errorReason.name should be InvalidSessionDescriptionError. Was InvalidStateError.
21
FAIL errorReason.name should be InvalidSessionDescriptionError. Was InvalidStateError.
22
FAIL pc.localDescription should throw an exception. Was null.
22
FAIL pc.localDescription should throw an exception. Was null.
23
FAIL pc.remoteDescription should throw an exception. Was null.
23
FAIL pc.remoteDescription should throw an exception. Was null.
24
PASS pc.signalingState is "stable"
24
PASS pc.signalingState is "stable"
25
PASS pc.setRemoteDescription(sessionDescription, finishIfSucceeded, requestFailed4); did not throw exception.
25
PASS pc.setRemoteDescription(sessionDescription).then(finishIfSucceeded, requestFailed4); did not throw exception.
26
PASS setRemoteDescription failed.
26
PASS setRemoteDescription failed.
27
FAIL errorReason.name should be InvalidSessionDescriptionError. Was InvalidStateError.
27
FAIL errorReason.name should be InvalidSessionDescriptionError. Was InvalidStateError.
28
FAIL pc.localDescription should throw an exception. Was null.
28
FAIL pc.localDescription should throw an exception. Was null.
29
FAIL pc.remoteDescription should throw an exception. Was null.
29
FAIL pc.remoteDescription should throw an exception. Was null.
30
PASS pc.signalingState is "stable"
30
PASS pc.signalingState is "stable"
31
PASS pc.setLocalDescription(sessionDescription, requestSucceeded1, finishIfFailed); did not throw exception.
31
PASS pc.setLocalDescription(sessionDescription).then(requestSucceeded1, finishIfFailed); did not throw exception.
32
FAIL setRemoteDescription failed.
32
FAIL setRemoteDescription failed.
33
PASS successfullyParsed is true
33
PASS successfullyParsed is true
34
34
- a/LayoutTests/fast/mediastream/RTCPeerConnection-stable.html -13 / +6 lines
Lines 9-21 a/LayoutTests/fast/mediastream/RTCPeerConnection-stable.html_sec1
9
9
10
            var pc = null;
10
            var pc = null;
11
11
12
            // Let's ensure built-ins are shielded from user scripts
13
            var thenPromise = Promise.prototype.then;
14
            Promise.prototype.then = function() {
15
                console.log("Promise.prototype.then is called internally");
16
                return thenPromise.apply(this, arguments);
17
            }
18
19
            function requestSucceeded2()
12
            function requestSucceeded2()
20
            {
13
            {
21
                testPassed('setRemoteDescription succeeded.');
14
                testPassed('setRemoteDescription succeeded.');
Lines 30-36 a/LayoutTests/fast/mediastream/RTCPeerConnection-stable.html_sec2
30
                pc = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
23
                pc = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
31
                check("", "", "", "", '"stable"');
24
                check("", "", "", "", '"stable"');
32
                sessionDescription = new RTCSessionDescription({type:"offer", sdp:"remote"});
25
                sessionDescription = new RTCSessionDescription({type:"offer", sdp:"remote"});
33
                shouldNotThrow('pc.setRemoteDescription(sessionDescription, requestSucceeded2, finishIfFailed);');
26
                shouldNotThrow('pc.setRemoteDescription(sessionDescription).then(requestSucceeded2, finishIfFailed);');
34
            }
27
            }
35
28
36
            function requestFailed4(reason)
29
            function requestFailed4(reason)
Lines 40-46 a/LayoutTests/fast/mediastream/RTCPeerConnection-stable.html_sec3
40
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
33
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
41
                check("", "", "", "", '"stable"');
34
                check("", "", "", "", '"stable"');
42
                sessionDescription = new RTCSessionDescription({type:"offer", sdp:"local"});
35
                sessionDescription = new RTCSessionDescription({type:"offer", sdp:"local"});
43
                shouldNotThrow('pc.setLocalDescription(sessionDescription, requestSucceeded1, finishIfFailed);');
36
                shouldNotThrow('pc.setLocalDescription(sessionDescription).then(requestSucceeded1, finishIfFailed);');
44
            }
37
            }
45
38
46
            function requestFailed3(reason)
39
            function requestFailed3(reason)
Lines 50-56 a/LayoutTests/fast/mediastream/RTCPeerConnection-stable.html_sec4
50
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
43
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
51
                check("", "", "", "", '"stable"');
44
                check("", "", "", "", '"stable"');
52
                sessionDescription = new RTCSessionDescription({type:"answer", sdp:"remote"});
45
                sessionDescription = new RTCSessionDescription({type:"answer", sdp:"remote"});
53
                shouldNotThrow('pc.setRemoteDescription(sessionDescription, finishIfSucceeded, requestFailed4);');
46
                shouldNotThrow('pc.setRemoteDescription(sessionDescription).then(finishIfSucceeded, requestFailed4);');
54
            }
47
            }
55
48
56
            function requestFailed2(reason)
49
            function requestFailed2(reason)
Lines 60-66 a/LayoutTests/fast/mediastream/RTCPeerConnection-stable.html_sec5
60
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
53
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
61
                check("", "", "", "", '"stable"');
54
                check("", "", "", "", '"stable"');
62
                sessionDescription = new RTCSessionDescription({type:"pranswer", sdp:"remote"});
55
                sessionDescription = new RTCSessionDescription({type:"pranswer", sdp:"remote"});
63
                shouldNotThrow('pc.setRemoteDescription(sessionDescription, finishIfSucceeded, requestFailed3);');
56
                shouldNotThrow('pc.setRemoteDescription(sessionDescription).then(finishIfSucceeded, requestFailed3);');
64
            }
57
            }
65
58
66
            function requestFailed1(reason)
59
            function requestFailed1(reason)
Lines 70-76 a/LayoutTests/fast/mediastream/RTCPeerConnection-stable.html_sec6
70
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
63
                shouldBe('errorReason.name', '"InvalidSessionDescriptionError"');
71
                check("", "", "", "", '"stable"');
64
                check("", "", "", "", '"stable"');
72
                sessionDescription = new RTCSessionDescription({type:"pranswer", sdp:"local"});
65
                sessionDescription = new RTCSessionDescription({type:"pranswer", sdp:"local"});
73
                shouldNotThrow('pc.setLocalDescription(sessionDescription, finishIfSucceeded, requestFailed2);');
66
                shouldNotThrow('pc.setLocalDescription(sessionDescription).then(finishIfSucceeded, requestFailed2);');
74
            }
67
            }
75
68
76
            function finishIfSucceeded()
69
            function finishIfSucceeded()
Lines 105-111 a/LayoutTests/fast/mediastream/RTCPeerConnection-stable.html_sec7
105
            pc = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
98
            pc = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
106
            shouldBe('pc.signalingState', '"stable"');
99
            shouldBe('pc.signalingState', '"stable"');
107
            var sessionDescription = new RTCSessionDescription({type:"answer", sdp:"local"});
100
            var sessionDescription = new RTCSessionDescription({type:"answer", sdp:"local"});
108
            shouldNotThrow('pc.setLocalDescription(sessionDescription, finishIfSucceeded, requestFailed1);');
101
            shouldNotThrow('pc.setLocalDescription(sessionDescription).then(finishIfSucceeded, requestFailed1);');
109
102
110
            window.jsTestIsAsync = true;
103
            window.jsTestIsAsync = true;
111
            window.successfullyParsed = true;
104
            window.successfullyParsed = true;
- a/LayoutTests/fast/mediastream/RTCPeerConnection-stats.html -2 / +2 lines
Lines 32-45 a/LayoutTests/fast/mediastream/RTCPeerConnection-stats.html_sec1
32
                shouldBeNonNull('status');
32
                shouldBeNonNull('status');
33
                result = status.result();
33
                result = status.result();
34
                shouldBe('result.length', '0');
34
                shouldBe('result.length', '0');
35
                shouldNotThrow('getUserMedia({audio:true, video:true}, gotStream)');
35
                shouldNotThrow('getUserMedia({audio:true, video:true}).then(gotStream)');
36
            }
36
            }
37
37
38
            function gotStream(s) {
38
            function gotStream(s) {
39
                testPassed('Got a stream.');
39
                testPassed('Got a stream.');
40
                stream = s;
40
                stream = s;
41
41
42
                pc.addStream(stream);
42
                pc.addTrack(stream.getVideoTracks()[0]);
43
                // FIXME: Test getStats error callback: https://webkit.org/b/129860
43
                // FIXME: Test getStats error callback: https://webkit.org/b/129860
44
                shouldNotThrow('pc.getStats().then(statsHandler2, statsError)');
44
                shouldNotThrow('pc.getStats().then(statsHandler2, statsError)');
45
            }
45
            }
- a/LayoutTests/fast/mediastream/RTCPeerConnection-statsSelector-expected.txt -2 / +6 lines
Lines 4-11 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE a/LayoutTests/fast/mediastream/RTCPeerConnection-statsSelector-expected.txt_sec1
4
4
5
5
6
PASS pc = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]}) did not throw exception.
6
PASS pc = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]}) did not throw exception.
7
FAIL webkitGetUserMedia threw exception :TypeError: navigator.webkitGetUserMedia is not a function. (In 'navigator.webkitGetUserMedia(dictionary, callback, error)', 'navigator.webkitGetUserMedia' is undefined)
7
PASS navigator.mediaDevices.getUserMedia({audio:true, video:true}).then(gotStream, error) did not throw exception.
8
PASS getUserMedia({audio:true, video:true}, gotStream) did not throw exception.
8
PASS Got a stream.
9
PASS statsHandler2 was called
10
PASS result.size is >= 1
11
PASS timestamp is >= startTime
12
FAIL local.type should be video. Was certificate.
9
PASS successfullyParsed is true
13
PASS successfullyParsed is true
10
14
11
TEST COMPLETE
15
TEST COMPLETE
- a/LayoutTests/fast/mediastream/RTCPeerConnection-statsSelector.html -18 / +11 lines
Lines 18-61 a/LayoutTests/fast/mediastream/RTCPeerConnection-statsSelector.html_sec1
18
                finishJSTest();
18
                finishJSTest();
19
            }
19
            }
20
20
21
            function getUserMedia(dictionary, callback) {
22
                try {
23
                    navigator.webkitGetUserMedia(dictionary, callback, error);
24
                } catch (e) {
25
                    testFailed('webkitGetUserMedia threw exception :' + e);
26
                    finishJSTest();
27
                }
28
            }
29
30
            function error() {
21
            function error() {
31
                testFailed('Stream generation failed.');
22
                testFailed('Stream generation failed.');
32
                finishJSTest();
23
                finishJSTest();
33
            }
24
            }
34
25
35
            function gotStream(s) {
26
            async function gotStream(s) {
36
                testPassed('Got a stream.');
27
                testPassed('Got a stream.');
37
                stream = s;
28
                stream = s;
38
29
39
                pc.addStream(stream);
30
                const sender = pc.addTrack(stream.getVideoTracks()[0], stream);
31
                var offer = await pc.createOffer();
32
                await pc.setLocalDescription(offer);
40
                // FIXME: Test getStats error callback: https://webkit.org/b/129860
33
                // FIXME: Test getStats error callback: https://webkit.org/b/129860
41
                shouldNotThrow('pc.getStats(pc.getLocalStreams()[0].getVideoTracks()[0]).then(statsHandler2, statsError)');
34
                pc.getStats(sender.track).then(statsHandler2, statsError);
42
            }
35
            }
43
36
44
            function statsHandler2(status)
37
            function statsHandler2(r)
45
            {
38
            {
39
                result = r;
46
                testPassed("statsHandler2 was called");
40
                testPassed("statsHandler2 was called");
47
                result = status.result();
41
                shouldBeGreaterThanOrEqual('result.size', '1');
48
                shouldBeGreaterThanOrEqual('result.length', '1');
42
                local = result.get(result.keys().next().value);
49
                local = result[0].local;
50
                timestamp = local.timestamp;
43
                timestamp = local.timestamp;
51
                shouldBeGreaterThanOrEqual('timestamp', 'startTime');
44
                shouldBeGreaterThanOrEqual('timestamp', 'startTime');
52
                shouldBe('local.stat("type")', '"video"');
45
                shouldBe('local.type', '"video"');
53
                finishJSTest();
46
                finishJSTest();
54
            }
47
            }
55
48
56
            var startTime = new Date().getTime();
49
            var startTime = new Date().getTime();
57
            shouldNotThrow("pc = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]})");
50
            shouldNotThrow("pc = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]})");
58
            shouldNotThrow('getUserMedia({audio:true, video:true}, gotStream)');
51
            shouldNotThrow('navigator.mediaDevices.getUserMedia({audio:true, video:true}).then(gotStream, error)');
59
52
60
            window.jsTestIsAsync = true;
53
            window.jsTestIsAsync = true;
61
            window.successfullyParsed = true;
54
            window.successfullyParsed = true;
- a/LayoutTests/fast/mediastream/argument-types-expected.txt -48 lines
Lines 1-48 a/LayoutTests/fast/mediastream/argument-types-expected.txt_sec1
1
Tests the acceptable types for arguments to navigator.getUserMedia methods.
2
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6
PASS navigator.getUserMedia() threw exception TypeError: Not enough arguments.
7
PASS navigator.getUserMedia(undefined) threw exception TypeError: Not enough arguments.
8
PASS navigator.getUserMedia(null) threw exception TypeError: Not enough arguments.
9
PASS navigator.getUserMedia({ }) threw exception TypeError: Not enough arguments.
10
PASS navigator.getUserMedia({video: true}) threw exception TypeError: Not enough arguments.
11
PASS navigator.getUserMedia(true) threw exception TypeError: Not enough arguments.
12
PASS navigator.getUserMedia(42) threw exception TypeError: Not enough arguments.
13
PASS navigator.getUserMedia(Infinity) threw exception TypeError: Not enough arguments.
14
PASS navigator.getUserMedia(-Infinity) threw exception TypeError: Not enough arguments.
15
PASS navigator.getUserMedia(emptyFunction) threw exception TypeError: Not enough arguments.
16
PASS navigator.getUserMedia({video: true}, emptyFunction) threw exception TypeError: Not enough arguments.
17
PASS navigator.getUserMedia(undefined, emptyFunction) threw exception TypeError: Not enough arguments.
18
PASS navigator.getUserMedia(null, emptyFunction) threw exception TypeError: Not enough arguments.
19
PASS navigator.getUserMedia({ }, emptyFunction) threw exception TypeError: Not enough arguments.
20
PASS navigator.getUserMedia(true, emptyFunction) threw exception TypeError: Not enough arguments.
21
PASS navigator.getUserMedia(42, emptyFunction) threw exception TypeError: Not enough arguments.
22
PASS navigator.getUserMedia(Infinity, emptyFunction) threw exception TypeError: Not enough arguments.
23
PASS navigator.getUserMedia(-Infinity, emptyFunction) threw exception TypeError: Not enough arguments.
24
PASS navigator.getUserMedia(emptyFunction, emptyFunction) threw exception TypeError: Not enough arguments.
25
PASS navigator.getUserMedia({video: true}, "foobar") threw exception TypeError: Not enough arguments.
26
PASS navigator.getUserMedia({video: true}, undefined) threw exception TypeError: Not enough arguments.
27
PASS navigator.getUserMedia({video: true}, null) threw exception TypeError: Not enough arguments.
28
PASS navigator.getUserMedia({video: true}, {}) threw exception TypeError: Not enough arguments.
29
PASS navigator.getUserMedia({video: true}, true) threw exception TypeError: Not enough arguments.
30
PASS navigator.getUserMedia({video: true}, 42) threw exception TypeError: Not enough arguments.
31
PASS navigator.getUserMedia({video: true}, Infinity) threw exception TypeError: Not enough arguments.
32
PASS navigator.getUserMedia({video: true}, -Infinity) threw exception TypeError: Not enough arguments.
33
PASS navigator.getUserMedia({ }, emptyFunction, emptyFunction) did not throw exception.
34
PASS navigator.getUserMedia({video: true}, emptyFunction, emptyFunction) did not throw exception.
35
PASS navigator.getUserMedia({video: true}, emptyFunction, undefined) threw exception TypeError: Argument 3 ('errorCallback') to Navigator.getUserMedia must be a function.
36
PASS navigator.getUserMedia({audio:true, video:true}, emptyFunction, undefined) threw exception TypeError: Argument 3 ('errorCallback') to Navigator.getUserMedia must be a function.
37
PASS navigator.getUserMedia({audio:true}, emptyFunction, undefined) threw exception TypeError: Argument 3 ('errorCallback') to Navigator.getUserMedia must be a function.
38
PASS navigator.getUserMedia({video: true}, emptyFunction, "video") threw exception TypeError: Argument 3 ('errorCallback') to Navigator.getUserMedia must be a function.
39
PASS navigator.getUserMedia({video: true}, emptyFunction, null) threw exception TypeError: Argument 3 ('errorCallback') to Navigator.getUserMedia must be a function.
40
PASS navigator.getUserMedia({video: true}, emptyFunction, {}) threw exception TypeError: Argument 3 ('errorCallback') to Navigator.getUserMedia must be a function.
41
PASS navigator.getUserMedia({video: true}, emptyFunction, true) threw exception TypeError: Argument 3 ('errorCallback') to Navigator.getUserMedia must be a function.
42
PASS navigator.getUserMedia({video: true}, emptyFunction, 42) threw exception TypeError: Argument 3 ('errorCallback') to Navigator.getUserMedia must be a function.
43
PASS navigator.getUserMedia({video: true}, emptyFunction, Infinity) threw exception TypeError: Argument 3 ('errorCallback') to Navigator.getUserMedia must be a function.
44
PASS navigator.getUserMedia({video: true}, emptyFunction, -Infinity) threw exception TypeError: Argument 3 ('errorCallback') to Navigator.getUserMedia must be a function.
45
PASS successfullyParsed is true
46
47
TEST COMPLETE
48
- a/LayoutTests/fast/mediastream/argument-types.html -81 lines
Lines 1-81 a/LayoutTests/fast/mediastream/argument-types.html_sec1
1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2
<html>
3
    <head>
4
        <script src="../../resources/js-test-pre.js"></script>
5
    </head>
6
    <body>
7
        <script>
8
        description("Tests the acceptable types for arguments to navigator.getUserMedia methods.");
9
        
10
        function test(expression, expressionShouldThrow, expectedException) {
11
            if (expressionShouldThrow) {
12
                if (expectedException)
13
                    shouldThrow(expression, '"' + expectedException + '"');
14
                else
15
                    shouldThrow(expression, '"TypeError: Not enough arguments"');
16
            } else {
17
                shouldNotThrow(expression);
18
            }
19
        }
20
        
21
        var errorCallbackError = new TypeError("Argument 3 ('errorCallback') to Navigator.getUserMedia must be a function")
22
        var invalidDictionaryError = new TypeError('First argument of getUserMedia must be a valid Dictionary')
23
        var notSupportedError = new Error('NotSupportedError: DOM Exception 9');
24
        var successCallbackError = new TypeError("Argument 2 ('successCallback') to Navigator.getUserMedia must be a function")
25
        var typeError = new TypeError('Type error');
26
        var typeNotAnObjectError = new TypeError('Not an object.');
27
        
28
        var emptyFunction = function() {};
29
        
30
        // No arguments
31
        test('navigator.getUserMedia()', true);
32
        
33
        // 1 Argument (Navigtor.getUserMedia requires at least 3 arguments).
34
        test('navigator.getUserMedia(undefined)', true);
35
        test('navigator.getUserMedia(null)', true);
36
        test('navigator.getUserMedia({ })', true);
37
        test('navigator.getUserMedia({video: true})', true);
38
        test('navigator.getUserMedia(true)', true);
39
        test('navigator.getUserMedia(42)', true);
40
        test('navigator.getUserMedia(Infinity)', true);
41
        test('navigator.getUserMedia(-Infinity)', true);
42
        test('navigator.getUserMedia(emptyFunction)', true);
43
        
44
        // 2 Arguments.
45
        test('navigator.getUserMedia({video: true}, emptyFunction)', true);
46
        test('navigator.getUserMedia(undefined, emptyFunction)', true);
47
        test('navigator.getUserMedia(null, emptyFunction)', true);
48
        test('navigator.getUserMedia({ }, emptyFunction)', true);
49
        test('navigator.getUserMedia(true, emptyFunction)', true);
50
        test('navigator.getUserMedia(42, emptyFunction)', true);
51
        test('navigator.getUserMedia(Infinity, emptyFunction)', true);
52
        test('navigator.getUserMedia(-Infinity, emptyFunction)', true);
53
        test('navigator.getUserMedia(emptyFunction, emptyFunction)', true);
54
        test('navigator.getUserMedia({video: true}, "foobar")', true);
55
        test('navigator.getUserMedia({video: true}, undefined)', true);
56
        test('navigator.getUserMedia({video: true}, null)', true);
57
        test('navigator.getUserMedia({video: true}, {})', true);
58
        test('navigator.getUserMedia({video: true}, true)', true);
59
        test('navigator.getUserMedia({video: true}, 42)', true);
60
        test('navigator.getUserMedia({video: true}, Infinity)', true);
61
        test('navigator.getUserMedia({video: true}, -Infinity)', true);
62
        
63
        // 3 Arguments.
64
        test('navigator.getUserMedia({ }, emptyFunction, emptyFunction)', false);
65
        test('navigator.getUserMedia({video: true}, emptyFunction, emptyFunction)', false);
66
        test('navigator.getUserMedia({video: true}, emptyFunction, undefined)', true, errorCallbackError);
67
        test('navigator.getUserMedia({audio:true, video:true}, emptyFunction, undefined)', true, errorCallbackError);
68
        test('navigator.getUserMedia({audio:true}, emptyFunction, undefined)', true, errorCallbackError);
69
        test('navigator.getUserMedia({video: true}, emptyFunction, "video")', true, errorCallbackError);
70
        test('navigator.getUserMedia({video: true}, emptyFunction, null)', true, errorCallbackError );
71
        test('navigator.getUserMedia({video: true}, emptyFunction, {})', true, errorCallbackError);
72
        test('navigator.getUserMedia({video: true}, emptyFunction, true)', true, errorCallbackError);
73
        test('navigator.getUserMedia({video: true}, emptyFunction, 42)', true, errorCallbackError);
74
        test('navigator.getUserMedia({video: true}, emptyFunction, Infinity)', true, errorCallbackError);
75
        test('navigator.getUserMedia({video: true}, emptyFunction, -Infinity)', true, errorCallbackError);
76
        
77
        window.jsTestIsAsync = false;
78
        </script>
79
        <script src="../../resources/js-test-post.js"></script>
80
    </body>
81
</html>
- a/LayoutTests/fast/mediastream/getusermedia-expected.txt -41 lines
Lines 1-41 a/LayoutTests/fast/mediastream/getusermedia-expected.txt_sec1
1
Tests getUserMedia.
2
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6
PASS navigator.getUserMedia({audio:false, video:false}, error, expectedError); did not throw exception.
7
PASS navigator.getUserMedia({audio:false, video:false}, error, null); threw exception TypeError: Argument 3 ('errorCallback') to Navigator.getUserMedia must be a function.
8
PASS navigator.getUserMedia({audio:true}, gotStream1, error); did not throw exception.
9
PASS Error callback called.
10
PASS Stream generated.
11
PASS stream.getAudioTracks().length is 1
12
PASS stream.getVideoTracks().length is 0
13
PASS navigator.getUserMedia({video:true}, gotStream2, null); threw exception TypeError: Argument 3 ('errorCallback') to Navigator.getUserMedia must be a function.
14
PASS navigator.getUserMedia({video:true}, gotStream2, error); did not throw exception.
15
PASS Stream generated.
16
PASS stream.getAudioTracks().length is 0
17
PASS stream.getVideoTracks().length is 1
18
PASS navigator.getUserMedia({audio:true, video:true}, gotStream3, null); threw exception TypeError: Argument 3 ('errorCallback') to Navigator.getUserMedia must be a function.
19
PASS navigator.getUserMedia({audio:true, video:true}, gotStream3, error); did not throw exception.
20
PASS Stream generated.
21
PASS stream.getAudioTracks().length is 1
22
PASS stream.getVideoTracks().length is 1
23
PASS navigator.getUserMedia({audio:{}, video:true}, gotStream4, null); threw exception TypeError: Argument 3 ('errorCallback') to Navigator.getUserMedia must be a function.
24
PASS navigator.getUserMedia({audio:{}, video:true}, gotStream4, error); did not throw exception.
25
PASS Stream generated.
26
PASS stream.getAudioTracks().length is 1
27
PASS stream.getVideoTracks().length is 1
28
PASS navigator.getUserMedia({audio:true, video:{width:{exact:11}}}, gotStreamInError, null); threw exception TypeError: Argument 3 ('errorCallback') to Navigator.getUserMedia must be a function.
29
PASS navigator.getUserMedia({audio:true, video:{width:{exact:11}}}, gotStreamInError, error1); did not throw exception.
30
PASS Error callback called.
31
FAIL errorArg.name should be OverconstrainedError. Was Error.
32
PASS errorArg.message is "Invalid constraint"
33
PASS navigator.getUserMedia({audio:{volume:{exact:1}}, video:true}, gotStream5, 0); threw exception TypeError: Argument 3 ('errorCallback') to Navigator.getUserMedia must be a function.
34
PASS navigator.getUserMedia({audio:{volume:{exact:1}}, video:true}, gotStream5, error); did not throw exception.
35
PASS Stream generated.
36
PASS stream.getAudioTracks().length is 1
37
PASS stream.getVideoTracks().length is 1
38
PASS successfullyParsed is true
39
40
TEST COMPLETE
41
- a/LayoutTests/fast/mediastream/getusermedia.html -105 lines
Lines 1-105 a/LayoutTests/fast/mediastream/getusermedia.html_sec1
1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2
<html>
3
    <head>
4
        <script src="../../resources/js-test-pre.js"></script>
5
    </head>
6
    <body>
7
        <p id="description"></p>
8
        <div id="console"></div>
9
        <script>
10
            description("Tests getUserMedia.");
11
12
            function setUserMediaPermission(isGranted) {
13
                if (window.testRunner)
14
                    testRunner.setUserMediaPermission(isGranted);
15
                else
16
                    debug("This test can not be run without the testRunner");
17
            }
18
19
            var stream;
20
            var errorArg;
21
22
            function error() {
23
                testFailed('Error callback called.');
24
                finishJSTest();
25
            }
26
27
            function expectedError() {
28
                testPassed('Error callback called.');
29
            }
30
31
            function gotStreamInError(s) {
32
                testFailed('Stream generated.');
33
                finishJSTest();
34
            }
35
36
            function gotStream5(s) {
37
                stream = s;
38
                testPassed('Stream generated.');
39
                shouldBe('stream.getAudioTracks().length', '1');
40
                shouldBe('stream.getVideoTracks().length', '1');
41
                finishJSTest();
42
            }
43
44
            function error1(e) {
45
                errorArg = e;
46
                testPassed('Error callback called.');
47
                shouldBeEqualToString('errorArg.name', 'OverconstrainedError');
48
                shouldBeEqualToString('errorArg.message', 'Invalid constraint');
49
50
                shouldThrow("navigator.getUserMedia({audio:{volume:{exact:1}}, video:true}, gotStream5, 0);");
51
                shouldNotThrow("navigator.getUserMedia({audio:{volume:{exact:1}}, video:true}, gotStream5, error);");
52
            }
53
54
            function gotStream4(s) {
55
                stream = s;
56
                testPassed('Stream generated.');
57
                shouldBe('stream.getAudioTracks().length', '1');
58
                shouldBe('stream.getVideoTracks().length', '1');
59
60
                shouldThrow("navigator.getUserMedia({audio:true, video:{width:{exact:11}}}, gotStreamInError, null);");
61
                shouldNotThrow("navigator.getUserMedia({audio:true, video:{width:{exact:11}}}, gotStreamInError, error1);");
62
            }
63
64
            function gotStream3(s) {
65
                stream = s;
66
                testPassed('Stream generated.');
67
                shouldBe('stream.getAudioTracks().length', '1');
68
                shouldBe('stream.getVideoTracks().length', '1');
69
70
                shouldThrow("navigator.getUserMedia({audio:{}, video:true}, gotStream4, null);");
71
                shouldNotThrow("navigator.getUserMedia({audio:{}, video:true}, gotStream4, error);");
72
            }
73
74
            function gotStream2(s) {
75
                stream = s;
76
                testPassed('Stream generated.');
77
                shouldBe('stream.getAudioTracks().length', '0');
78
                shouldBe('stream.getVideoTracks().length', '1');
79
80
                shouldThrow("navigator.getUserMedia({audio:true, video:true}, gotStream3, null);");
81
                shouldNotThrow("navigator.getUserMedia({audio:true, video:true}, gotStream3, error);");
82
            }
83
84
            function gotStream1(s) {
85
                stream = s;
86
                testPassed('Stream generated.');
87
                shouldBe('stream.getAudioTracks().length', '1');
88
                shouldBe('stream.getVideoTracks().length', '0');
89
90
                shouldThrow("navigator.getUserMedia({video:true}, gotStream2, null);")
91
                shouldNotThrow("navigator.getUserMedia({video:true}, gotStream2, error);")
92
            }
93
94
            shouldNotThrow("navigator.getUserMedia({audio:false, video:false}, error, expectedError);")
95
            shouldThrow("navigator.getUserMedia({audio:false, video:false}, error, null);")
96
97
            setUserMediaPermission(true);
98
            shouldNotThrow("navigator.getUserMedia({audio:true}, gotStream1, error);");
99
100
            window.jsTestIsAsync = true;
101
            window.successfullyParsed = true;
102
        </script>
103
        <script src="../../resources/js-test-post.js"></script>
104
    </body>
105
</html>
- a/LayoutTests/fast/mediastream/webkitGetUserMedia-shadowing-then-expected.txt -1 lines
Line 1 a/LayoutTests/fast/mediastream/webkitGetUserMedia-shadowing-then-expected.txt_sec1
1
PASS
- a/LayoutTests/fast/mediastream/webkitGetUserMedia-shadowing-then.html -44 lines
Lines 1-44 a/LayoutTests/fast/mediastream/webkitGetUserMedia-shadowing-then.html_sec1
1
<!DOCTYPE html>
2
<html lang="en">
3
<head>
4
    <meta charset="UTF-8">
5
    <title>Shadowing then()</title>
6
</head>
7
<body>
8
<!--
9
This test verifies that the implementation of navigator.getUserMedia does not use public promise APIs.
10
-->
11
<p id="output"></p>
12
<script>
13
    if (window.testRunner) {
14
        testRunner.dumpAsText();
15
        testRunner.waitUntilDone();
16
    }
17
18
    function endTest(testStatus) {
19
        document.getElementById("output").textContent = testStatus;
20
        testRunner.notifyDone();
21
    }
22
23
    // Shadow Promise.prototype.then
24
    Promise.prototype.then = (function () {
25
        const realThen = Promise.prototype.then;
26
        return function () {
27
            endTest("FAIL: Executed shadowed, public .then()");
28
        }
29
    })();
30
31
    function gotUserMedia(mediaStream) {
32
        endTest("FAIL: Got user media");
33
    }
34
35
    function userMediaError(error) {
36
        endTest("PASS");
37
    }
38
39
    var options = { audio: false, video: false };
40
    navigator.getUserMedia(options, gotUserMedia, userMediaError);
41
42
</script>
43
</body>
44
</html>
- a/LayoutTests/http/tests/media/media-stream/collect-media-devices.https-expected.txt +4 lines
Line 0 a/LayoutTests/http/tests/media/media-stream/collect-media-devices.https-expected.txt_sec1
1
2
3
PASS Ensure that the frame's document get collected after being stopped while using MediaDevices 
4
- a/LayoutTests/http/tests/media/media-stream/collect-media-devices.https.html +45 lines
Line 0 a/LayoutTests/http/tests/media/media-stream/collect-media-devices.https.html_sec1
1
<!DOCTYPE html>
2
<meta charset="utf-8">
3
<script src="/resources/testharness.js"></script>
4
<script src="/resources/testharnessreport.js"></script>
5
<script>
6
function waitFor(duration)
7
{
8
    return new Promise((resolve) => setTimeout(resolve, duration));
9
}
10
11
var resolveCallback, rejectCallback;
12
var promise = new Promise((resolve, reject) => {
13
    resolveCallback = resolve;
14
    rejectCallback = reject;
15
});
16
17
async function done()
18
{
19
    try {
20
        const frameIdentifier = internals.documentIdentifier(iframe.contentDocument);
21
        iframe.src = "non-existent-frame";
22
        let counter = 0;
23
        while (++counter < 10) {
24
            if (!internals.isDocumentAlive(frameIdentifier)) {
25
                resolveCallback();
26
                return;
27
            }
28
            if (window.GCController)
29
                GCController.collect();
30
31
            await waitFor(50);
32
        }
33
    } finally {
34
        rejectCallback("Test failed");
35
    }
36
}
37
38
promise_test((test) => {
39
    if (!window.internals)
40
        rejectCallback("Test require internals API");
41
    return promise;
42
}, "Ensure that the frame's document get collected after being stopped while using MediaDevices");
43
44
</script>
45
<iframe src="resources/mymediadevicesframe.htm" id="iframe"></iframe>
- a/LayoutTests/http/tests/media/media-stream/resources/mymediadevicesframe.htm +5 lines
Line 0 a/LayoutTests/http/tests/media/media-stream/resources/mymediadevicesframe.htm_sec1
1
<!DOCTYPE html>
2
<script>
3
navigator.mediaDevices.ondevicechange = () => {};
4
parent.done();
5
</script>
- a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-IDL-all-expected.txt -3 / +3 lines
Lines 8-18 This test checks for the presence of the navigator.mediaDevices.getUserMedia met a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-IDL-all-expected.txt_sec1
8
PASS Test driver 
8
PASS Test driver 
9
PASS Navigator interface: attribute mediaDevices 
9
PASS Navigator interface: attribute mediaDevices 
10
PASS Unscopable handled correctly for mediaDevices property on Navigator 
10
PASS Unscopable handled correctly for mediaDevices property on Navigator 
11
PASS Navigator interface: operation getUserMedia(MediaStreamConstraints, NavigatorUserMediaSuccessCallback, NavigatorUserMediaErrorCallback) 
11
FAIL Navigator interface: operation getUserMedia(MediaStreamConstraints, NavigatorUserMediaSuccessCallback, NavigatorUserMediaErrorCallback) assert_own_property: interface prototype object missing non-static operation expected property "getUserMedia" missing
12
PASS Unscopable handled correctly for getUserMedia(MediaStreamConstraints, NavigatorUserMediaSuccessCallback, NavigatorUserMediaErrorCallback) on Navigator 
12
PASS Unscopable handled correctly for getUserMedia(MediaStreamConstraints, NavigatorUserMediaSuccessCallback, NavigatorUserMediaErrorCallback) on Navigator 
13
PASS Navigator interface: navigator must inherit property "mediaDevices" with the proper type 
13
PASS Navigator interface: navigator must inherit property "mediaDevices" with the proper type 
14
PASS Navigator interface: navigator must inherit property "getUserMedia(MediaStreamConstraints, NavigatorUserMediaSuccessCallback, NavigatorUserMediaErrorCallback)" with the proper type 
14
FAIL Navigator interface: navigator must inherit property "getUserMedia(MediaStreamConstraints, NavigatorUserMediaSuccessCallback, NavigatorUserMediaErrorCallback)" with the proper type assert_inherits: property "getUserMedia" not found in prototype chain
15
PASS Navigator interface: calling getUserMedia(MediaStreamConstraints, NavigatorUserMediaSuccessCallback, NavigatorUserMediaErrorCallback) on navigator with too few arguments must throw TypeError 
15
FAIL Navigator interface: calling getUserMedia(MediaStreamConstraints, NavigatorUserMediaSuccessCallback, NavigatorUserMediaErrorCallback) on navigator with too few arguments must throw TypeError assert_inherits: property "getUserMedia" not found in prototype chain
16
PASS MediaStream interface: existence and properties of interface object 
16
PASS MediaStream interface: existence and properties of interface object 
17
PASS MediaStream interface object length 
17
PASS MediaStream interface object length 
18
PASS MediaStream interface object name 
18
PASS MediaStream interface object name 
- a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-IDL-enumerateDevices-expected.txt -1 / +1 lines
Lines 8-14 This test checks for the presence of the navigator.mediaDevices.enumerateDevices a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-IDL-enumerateDevices-expected.txt_sec1
8
PASS Test MediaDevices.enumerateDevices call and result. Types only. 
8
PASS Test MediaDevices.enumerateDevices call and result. Types only. 
9
PASS Navigator interface: attribute mediaDevices 
9
PASS Navigator interface: attribute mediaDevices 
10
PASS Unscopable handled correctly for mediaDevices property on Navigator 
10
PASS Unscopable handled correctly for mediaDevices property on Navigator 
11
PASS Navigator interface: operation getUserMedia(MediaStreamConstraints, NavigatorUserMediaSuccessCallback, NavigatorUserMediaErrorCallback) 
11
FAIL Navigator interface: operation getUserMedia(MediaStreamConstraints, NavigatorUserMediaSuccessCallback, NavigatorUserMediaErrorCallback) assert_own_property: interface prototype object missing non-static operation expected property "getUserMedia" missing
12
PASS Unscopable handled correctly for getUserMedia(MediaStreamConstraints, NavigatorUserMediaSuccessCallback, NavigatorUserMediaErrorCallback) on Navigator 
12
PASS Unscopable handled correctly for getUserMedia(MediaStreamConstraints, NavigatorUserMediaSuccessCallback, NavigatorUserMediaErrorCallback) on Navigator 
13
FAIL MediaStream interface: existence and properties of interface object undefined is not an object (evaluating 'this.array
13
FAIL MediaStream interface: existence and properties of interface object undefined is not an object (evaluating 'this.array
14
                     .members[this.base]
14
                     .members[this.base]
- a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStream-default-feature-policy.https-expected.txt -19 / +12 lines
Lines 1-22 a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStream-default-feature-policy.https-expected.txt_sec1
1
CONSOLE MESSAGE: line 1: The top-level frame has prevented a document with a different security origin to call getUserMedia.
2
CONSOLE MESSAGE: line 1: The top-level frame has prevented a document with a different security origin to call getUserMedia.
3
CONSOLE MESSAGE: line 1: The top-level frame has prevented a document with a different security origin to call getUserMedia.
4
CONSOLE MESSAGE: line 1: The top-level frame has prevented a document with a different security origin to call getUserMedia.
5
CONSOLE MESSAGE: line 1: The top-level frame has prevented a document with a different security origin to call getUserMedia.
6
CONSOLE MESSAGE: line 1: The top-level frame has prevented a document with a different security origin to call getUserMedia.
7
CONSOLE MESSAGE: line 1: The top-level frame has prevented a document with a different security origin to call getUserMedia.
8
1
9
2
10
PASS Default "microphone" feature policy ["self"] allows the top-level document. 
3
FAIL Default "microphone" feature policy ["self"] allows the top-level document. promise_test: Unhandled rejection with value: object "TypeError: undefined is not a function (near '...navigator.getUserMedia...')"
11
PASS Default "microphone" feature policy ["self"] allows same-origin iframes. 
4
FAIL Default "microphone" feature policy ["self"] allows same-origin iframes. assert_equals: expected "#OK" but got "#TypeError"
12
PASS Default "microphone" feature policy ["self"] disallows cross-origin iframes. 
5
FAIL Default "microphone" feature policy ["self"] disallows cross-origin iframes. assert_equals: expected "#NotAllowedError" but got "#TypeError"
13
FAIL Feature policy "microphone" can be enabled in cross-origin iframes using "allow" attribute. assert_equals: expected "#OK" but got "#NotAllowedError"
6
FAIL Feature policy "microphone" can be enabled in cross-origin iframes using "allow" attribute. assert_equals: expected "#OK" but got "#TypeError"
14
PASS Default "camera" feature policy ["self"] allows the top-level document. 
7
FAIL Default "camera" feature policy ["self"] allows the top-level document. promise_test: Unhandled rejection with value: object "TypeError: undefined is not a function (near '...navigator.getUserMedia...')"
15
PASS Default "camera" feature policy ["self"] allows same-origin iframes. 
8
FAIL Default "camera" feature policy ["self"] allows same-origin iframes. assert_equals: expected "#OK" but got "#TypeError"
16
PASS Default "camera" feature policy ["self"] disallows cross-origin iframes. 
9
FAIL Default "camera" feature policy ["self"] disallows cross-origin iframes. assert_equals: expected "#NotAllowedError" but got "#TypeError"
17
FAIL Feature policy "camera" can be enabled in cross-origin iframes using "allow" attribute. assert_equals: expected "#OK" but got "#NotAllowedError"
10
FAIL Feature policy "camera" can be enabled in cross-origin iframes using "allow" attribute. assert_equals: expected "#OK" but got "#TypeError"
18
PASS Default "camera; microphone" feature policy ["self"] allows the top-level document. 
11
FAIL Default "camera; microphone" feature policy ["self"] allows the top-level document. promise_test: Unhandled rejection with value: object "TypeError: undefined is not a function (near '...navigator.getUserMedia...')"
19
PASS Default "camera; microphone" feature policy ["self"] allows same-origin iframes. 
12
FAIL Default "camera; microphone" feature policy ["self"] allows same-origin iframes. assert_equals: expected "#OK" but got "#TypeError"
20
PASS Default "camera; microphone" feature policy ["self"] disallows cross-origin iframes. 
13
FAIL Default "camera; microphone" feature policy ["self"] disallows cross-origin iframes. assert_equals: expected "#NotAllowedError" but got "#TypeError"
21
PASS Feature policy "camera; microphone" can be enabled in cross-origin iframes using "allow" attribute. 
14
FAIL Feature policy "camera; microphone" can be enabled in cross-origin iframes using "allow" attribute. assert_equals: expected "#OK" but got "#TypeError"
22
15
- a/LayoutTests/imported/w3c/web-platform-tests/webrtc/historical-expected.txt -6 / +6 lines
Lines 1-13 a/LayoutTests/imported/w3c/web-platform-tests/webrtc/historical-expected.txt_sec1
1
1
2
PASS RTCDataChannel member reliable should not exist 
2
PASS RTCDataChannel member reliable should not exist 
3
FAIL RTCPeerConnection member addStream should not exist assert_false: expected false got true
3
PASS RTCPeerConnection member addStream should not exist 
4
PASS RTCPeerConnection member createDTMFSender should not exist 
4
PASS RTCPeerConnection member createDTMFSender should not exist 
5
FAIL RTCPeerConnection member getLocalStreams should not exist assert_false: expected false got true
5
PASS RTCPeerConnection member getLocalStreams should not exist 
6
FAIL RTCPeerConnection member getRemoteStreams should not exist assert_false: expected false got true
6
PASS RTCPeerConnection member getRemoteStreams should not exist 
7
FAIL RTCPeerConnection member getStreamById should not exist assert_false: expected false got true
7
PASS RTCPeerConnection member getStreamById should not exist 
8
FAIL RTCPeerConnection member onaddstream should not exist assert_false: expected false got true
8
PASS RTCPeerConnection member onaddstream should not exist 
9
PASS RTCPeerConnection member onremovestream should not exist 
9
PASS RTCPeerConnection member onremovestream should not exist 
10
FAIL RTCPeerConnection member removeStream should not exist assert_false: expected false got true
10
PASS RTCPeerConnection member removeStream should not exist 
11
PASS RTCPeerConnection member updateIce should not exist 
11
PASS RTCPeerConnection member updateIce should not exist 
12
PASS DataChannel interface should not exist 
12
PASS DataChannel interface should not exist 
13
PASS mozRTCIceCandidate interface should not exist 
13
PASS mozRTCIceCandidate interface should not exist 
- a/LayoutTests/imported/w3c/web-platform-tests/webrtc/no-media-call.html -4 / +4 lines
Lines 37-45 This test uses the legacy callback API with no media, and thus does not require a/LayoutTests/imported/w3c/web-platform-tests/webrtc/no-media-call.html_sec1
37
    var parsedOffer = new RTCSessionDescription({ type: 'offer',
37
    var parsedOffer = new RTCSessionDescription({ type: 'offer',
38
                                                  sdp: offerSdp });
38
                                                  sdp: offerSdp });
39
    // These functions use the legacy interface extensions to RTCPeerConnection.
39
    // These functions use the legacy interface extensions to RTCPeerConnection.
40
    gSecondConnection.setRemoteDescription(parsedOffer,
40
    gSecondConnection.setRemoteDescription(parsedOffer).then(
41
      function() {
41
      function() {
42
        gSecondConnection.createAnswer(onAnswerCreated,
42
        gSecondConnection.createAnswer().then(onAnswerCreated,
43
                                       failed('createAnswer'));
43
                                       failed('createAnswer'));
44
      },
44
      },
45
      failed('setRemoteDescription second'));
45
      failed('setRemoteDescription second'));
Lines 56-62 This test uses the legacy callback API with no media, and thus does not require a/LayoutTests/imported/w3c/web-platform-tests/webrtc/no-media-call.html_sec2
56
  function handleAnswer(answerSdp) {
56
  function handleAnswer(answerSdp) {
57
    var parsedAnswer = new RTCSessionDescription({ type: 'answer',
57
    var parsedAnswer = new RTCSessionDescription({ type: 'answer',
58
                                                   sdp: answerSdp });
58
                                                   sdp: answerSdp });
59
    gFirstConnection.setRemoteDescription(parsedAnswer, ignoreSuccess,
59
    gFirstConnection.setRemoteDescription(parsedAnswer).then(ignoreSuccess,
60
                                          failed('setRemoteDescription first'));
60
                                          failed('setRemoteDescription first'));
61
  };
61
  };
62
62
Lines 125-131 This test uses the legacy callback API with no media, and thus does not require a/LayoutTests/imported/w3c/web-platform-tests/webrtc/no-media-call.html_sec3
125
125
126
    // The offerToReceiveVideo is necessary and sufficient to make
126
    // The offerToReceiveVideo is necessary and sufficient to make
127
    // an actual connection.
127
    // an actual connection.
128
    gFirstConnection.createOffer(onOfferCreated, failed('createOffer'),
128
    gFirstConnection.createOffer().then(onOfferCreated, failed('createOffer'),
129
        {offerToReceiveVideo: true});
129
        {offerToReceiveVideo: true});
130
  });
130
  });
131
</script>
131
</script>
- a/LayoutTests/imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/setRemoteDescription-expected.txt -3 lines
Lines 1-3 a/LayoutTests/imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/setRemoteDescription-expected.txt_sec1
1
2
PASS Triggers onaddstream when called with a remote description and the MSID is parsed. 
3
- a/LayoutTests/imported/w3c/web-platform-tests/webrtc/simplecall.https.html -2 / +2 lines
Lines 44-50 property to true in Firefox. a/LayoutTests/imported/w3c/web-platform-tests/webrtc/simplecall.https.html_sec1
44
    localStream.getTracks().forEach(function(track) {
44
    localStream.getTracks().forEach(function(track) {
45
      gFirstConnection.addTrack(track, localStream);
45
      gFirstConnection.addTrack(track, localStream);
46
    });
46
    });
47
    gFirstConnection.createOffer(onOfferCreated, failed('createOffer'));
47
    gFirstConnection.createOffer().then(onOfferCreated, failed('createOffer'));
48
48
49
    var videoTag = document.getElementById('local-view');
49
    var videoTag = document.getElementById('local-view');
50
    videoTag.srcObject = localStream;
50
    videoTag.srcObject = localStream;
Lines 67-73 property to true in Firefox. a/LayoutTests/imported/w3c/web-platform-tests/webrtc/simplecall.https.html_sec2
67
                                                  sdp: offerSdp });
67
                                                  sdp: offerSdp });
68
    gSecondConnection.setRemoteDescription(parsedOffer);
68
    gSecondConnection.setRemoteDescription(parsedOffer);
69
69
70
    gSecondConnection.createAnswer(onAnswerCreated,
70
    gSecondConnection.createAnswer().then(onAnswerCreated,
71
                                   failed('createAnswer'));
71
                                   failed('createAnswer'));
72
  };
72
  };
73
73
- a/LayoutTests/platform/gtk/TestExpectations -3 lines
Lines 613-619 webkit.org/b/79203 fast/mediastream/mock-media-source-webaudio.html [ Timeout ] a/LayoutTests/platform/gtk/TestExpectations_sec1
613
webkit.org/b/79203 fast/mediastream/getUserMedia-webaudio.html [ Failure ]
613
webkit.org/b/79203 fast/mediastream/getUserMedia-webaudio.html [ Failure ]
614
# Crash is bug #186678
614
# Crash is bug #186678
615
webkit.org/b/79203 fast/mediastream/MediaStream-video-element-track-stop.html [ Timeout Crash ]
615
webkit.org/b/79203 fast/mediastream/MediaStream-video-element-track-stop.html [ Timeout Crash ]
616
webkit.org/b/79203 fast/mediastream/RTCPeerConnection-dtmf.html [ Timeout ]
617
webkit.org/b/79203 fast/mediastream/RTCPeerConnection-icecandidate-event.html [ Failure Crash ]
616
webkit.org/b/79203 fast/mediastream/RTCPeerConnection-icecandidate-event.html [ Failure Crash ]
618
webkit.org/b/79203 fast/mediastream/RTCPeerConnection-media-setup-two-dialogs.html [ Pass Failure Crash ]
617
webkit.org/b/79203 fast/mediastream/RTCPeerConnection-media-setup-two-dialogs.html [ Pass Failure Crash ]
619
webkit.org/b/79203 fast/mediastream/MediaStream-video-element.html [ Pass Crash Failure ]
618
webkit.org/b/79203 fast/mediastream/MediaStream-video-element.html [ Pass Crash Failure ]
Lines 625-631 webkit.org/b/79203 fast/mediastream/RTCPeerConnection-ice.html [ Failure Timeout a/LayoutTests/platform/gtk/TestExpectations_sec2
625
webkit.org/b/79203 fast/mediastream/RTCPeerConnection-inspect-answer.html [ Failure ]
624
webkit.org/b/79203 fast/mediastream/RTCPeerConnection-inspect-answer.html [ Failure ]
626
webkit.org/b/79203 fast/mediastream/RTCPeerConnection-inspect-offer-bundlePolicy-bundle-only.html [ Failure Crash ]
625
webkit.org/b/79203 fast/mediastream/RTCPeerConnection-inspect-offer-bundlePolicy-bundle-only.html [ Failure Crash ]
627
webkit.org/b/79203 fast/mediastream/RTCPeerConnection-inspect-offer.html [ Failure ]
626
webkit.org/b/79203 fast/mediastream/RTCPeerConnection-inspect-offer.html [ Failure ]
628
webkit.org/b/79203 fast/mediastream/RTCPeerConnection-legacy-stream-based-api.html [ Failure ]
629
webkit.org/b/79203 fast/mediastream/RTCPeerConnection-media-setup-callbacks-single-dialog.html [ Pass Crash Failure ]
627
webkit.org/b/79203 fast/mediastream/RTCPeerConnection-media-setup-callbacks-single-dialog.html [ Pass Crash Failure ]
630
webkit.org/b/79203 webaudio/mediastreamaudiosourcenode.html [ Failure ]
628
webkit.org/b/79203 webaudio/mediastreamaudiosourcenode.html [ Failure ]
631
webkit.org/b/79203 fast/mediastream/MediaStream-video-element-video-tracks-disabled-then-enabled.html [ Timeout Failure ]
629
webkit.org/b/79203 fast/mediastream/MediaStream-video-element-video-tracks-disabled-then-enabled.html [ Timeout Failure ]
Lines 639-645 webkit.org/b/151344 fast/mediastream/MediaStream-add-ended-tracks.html [ Timeout a/LayoutTests/platform/gtk/TestExpectations_sec3
639
webkit.org/b/160996 fast/mediastream/MediaStream-video-element-video-tracks-disabled.html [ ImageOnlyFailure Crash ]
637
webkit.org/b/160996 fast/mediastream/MediaStream-video-element-video-tracks-disabled.html [ ImageOnlyFailure Crash ]
640
webkit.org/b/172269 fast/mediastream/media-devices-enumerate-devices.html [ Failure ]
638
webkit.org/b/172269 fast/mediastream/media-devices-enumerate-devices.html [ Failure ]
641
webkit.org/b/173257 fast/mediastream/getUserMedia-grant-persistency3.html [ Pass Failure ]
639
webkit.org/b/173257 fast/mediastream/getUserMedia-grant-persistency3.html [ Pass Failure ]
642
webkit.org/b/176801 fast/mediastream/argument-types.html [ Crash Pass ]
643
640
644
# Canvas captureStream support is not implemented
641
# Canvas captureStream support is not implemented
645
webkit.org/b/169811 fast/mediacapturefromelement [ Skip ]
642
webkit.org/b/169811 fast/mediacapturefromelement [ Skip ]
- a/LayoutTests/platform/ios-wk1/TestExpectations -1 lines
Lines 19-25 imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy [ Skip ] a/LayoutTests/platform/ios-wk1/TestExpectations_sec1
19
# Skip WebRTC for now in WK1
19
# Skip WebRTC for now in WK1
20
imported/w3c/web-platform-tests/webrtc [ Skip ]
20
imported/w3c/web-platform-tests/webrtc [ Skip ]
21
webrtc [ Skip ]
21
webrtc [ Skip ]
22
fast/events/constructors/media-stream-event-constructor.html
23
22
24
# Not supported on WK1
23
# Not supported on WK1
25
media/no-fullscreen-when-hidden.html [ Skip ]
24
media/no-fullscreen-when-hidden.html [ Skip ]
- a/LayoutTests/platform/ios/TestExpectations -4 lines
Lines 1061-1075 css3/color-filters/color-filter-ignore-semantic.html [ Skip ] a/LayoutTests/platform/ios/TestExpectations_sec1
1061
1061
1062
# Run webrtc tests on iOS 11
1062
# Run webrtc tests on iOS 11
1063
imported/w3c/web-platform-tests/webrtc [ Pass ]
1063
imported/w3c/web-platform-tests/webrtc [ Pass ]
1064
fast/events/constructors/media-stream-event-constructor.html [ Pass ]
1065
fast/mediastream/RTCIceCandidate.html [ Pass ]
1064
fast/mediastream/RTCIceCandidate.html [ Pass ]
1066
fast/mediastream/RTCPeerConnection-add-removeTrack.html [ Pass ]
1065
fast/mediastream/RTCPeerConnection-add-removeTrack.html [ Pass ]
1067
fast/mediastream/RTCPeerConnection-addIceCandidate.html [ Pass ]
1066
fast/mediastream/RTCPeerConnection-addIceCandidate.html [ Pass ]
1068
fast/mediastream/RTCPeerConnection-AddRemoveStream.html [ Pass ]
1069
fast/mediastream/RTCPeerConnection-addTrack-reuse-sender.html [ Pass ]
1067
fast/mediastream/RTCPeerConnection-addTrack-reuse-sender.html [ Pass ]
1070
fast/mediastream/RTCPeerConnection-addTransceiver.html [ Pass ]
1068
fast/mediastream/RTCPeerConnection-addTransceiver.html [ Pass ]
1071
fast/mediastream/RTCPeerConnection-createAnswer.html [ Pass ]
1069
fast/mediastream/RTCPeerConnection-createAnswer.html [ Pass ]
1072
fast/mediastream/RTCPeerConnection-createOffer.html [ Pass ]
1073
fast/mediastream/RTCPeerConnection-datachannel.html [ Pass ]
1070
fast/mediastream/RTCPeerConnection-datachannel.html [ Pass ]
1074
fast/mediastream/RTCPeerConnection-have-local-offer.html [ Pass ]
1071
fast/mediastream/RTCPeerConnection-have-local-offer.html [ Pass ]
1075
fast/mediastream/RTCPeerConnection-have-local-pranswer.html [ Pass ]
1072
fast/mediastream/RTCPeerConnection-have-local-pranswer.html [ Pass ]
Lines 1077-1083 fast/mediastream/RTCPeerConnection-have-remote-offer.html [ Pass ] a/LayoutTests/platform/ios/TestExpectations_sec2
1077
fast/mediastream/RTCPeerConnection-have-remote-pranswer.html [ Pass ]
1074
fast/mediastream/RTCPeerConnection-have-remote-pranswer.html [ Pass ]
1078
fast/mediastream/RTCPeerConnection-inspect-answer.html [ Pass ]
1075
fast/mediastream/RTCPeerConnection-inspect-answer.html [ Pass ]
1079
fast/mediastream/RTCPeerConnection-inspect-offer.html [ Pass ]
1076
fast/mediastream/RTCPeerConnection-inspect-offer.html [ Pass ]
1080
fast/mediastream/RTCPeerConnection-legacy-stream-based-api.html [ Pass ]
1081
fast/mediastream/RTCPeerConnection-localDescription.html [ Pass ]
1077
fast/mediastream/RTCPeerConnection-localDescription.html [ Pass ]
1082
fast/mediastream/RTCPeerConnection-media-setup-single-dialog.html [ Pass ]
1078
fast/mediastream/RTCPeerConnection-media-setup-single-dialog.html [ Pass ]
1083
fast/mediastream/RTCPeerConnection-media-setup-two-dialogs.html [ Pass ]
1079
fast/mediastream/RTCPeerConnection-media-setup-two-dialogs.html [ Pass ]
- a/LayoutTests/platform/mac-wk1/TestExpectations -1 lines
Lines 138-144 fast/mediastream a/LayoutTests/platform/mac-wk1/TestExpectations_sec1
138
imported/w3c/web-platform-tests/mediacapture-streams
138
imported/w3c/web-platform-tests/mediacapture-streams
139
http/tests/media/media-stream
139
http/tests/media/media-stream
140
http/tests/ssl/media-stream
140
http/tests/ssl/media-stream
141
fast/events/constructors/media-stream-event-constructor.html
142
141
143
# WK1 does not filter response headers.
142
# WK1 does not filter response headers.
144
http/wpt/loading/redirect-headers.html [ Skip ]
143
http/wpt/loading/redirect-headers.html [ Skip ]
- a/LayoutTests/platform/mac/TestExpectations -1 lines
Lines 144-150 fast/forms/week a/LayoutTests/platform/mac/TestExpectations_sec1
144
# Media Stream API is not fully supported.
144
# Media Stream API is not fully supported.
145
fast/mediastream/MediaStream-add-ended-tracks.html
145
fast/mediastream/MediaStream-add-ended-tracks.html
146
146
147
fast/mediastream/RTCPeerConnection-dtmf.html [ Skip ]
148
fast/mediastream/RTCPeerConnection-ice.html [ Skip ]
147
fast/mediastream/RTCPeerConnection-ice.html [ Skip ]
149
fast/mediastream/RTCPeerConnection-media-setup-callbacks-single-dialog.html [ Skip ]
148
fast/mediastream/RTCPeerConnection-media-setup-callbacks-single-dialog.html [ Skip ]
150
fast/mediastream/RTCPeerConnection-stats.html [ Skip ]
149
fast/mediastream/RTCPeerConnection-stats.html [ Skip ]
- a/LayoutTests/platform/win/TestExpectations -1 lines
Lines 850-856 webkit.org/b/38376 media/media-document-audio-size.html [ Skip ] a/LayoutTests/platform/win/TestExpectations_sec1
850
# Media Stream API is not yet enabled.
850
# Media Stream API is not yet enabled.
851
fast/mediastream [ Skip ]
851
fast/mediastream [ Skip ]
852
imported/w3c/web-platform-tests/mediacapture-streams [ Skip ]
852
imported/w3c/web-platform-tests/mediacapture-streams [ Skip ]
853
fast/events/constructors/media-stream-event-constructor.html [ Skip ]
854
http/tests/media/media-stream [ Skip ]
853
http/tests/media/media-stream [ Skip ]
855
854
856
# needs enhanced eventSender.contextMenu() return value
855
# needs enhanced eventSender.contextMenu() return value
- a/LayoutTests/webrtc/legacy-api-expected.txt -2 / +2 lines
Lines 8-14 Found 1 tests a/LayoutTests/webrtc/legacy-api-expected.txt_sec1
8
Details
8
Details
9
9
10
Result	Test Name	Message
10
Result	Test Name	Message
11
Pass	Testing legacy API is not defined when legacy flag is turned off	
11
Pass	Testing legacy API is not defined	
12
12
13
PASS Testing legacy API is not defined when legacy flag is turned off 
13
PASS Testing legacy API is not defined 
14
14
- a/LayoutTests/webrtc/legacy-api.html -4 / +1 lines
Lines 5-13 a/LayoutTests/webrtc/legacy-api.html_sec1
5
    </head>
5
    </head>
6
    <body>
6
    <body>
7
        <script>
7
        <script>
8
if (window.testRunner)
9
    testRunner.setWebRTCLegacyAPIEnabled(false);
10
11
promise_test(function() {
8
promise_test(function() {
12
    var pc1 = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
9
    var pc1 = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
13
    var pc2 = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
10
    var pc2 = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
Lines 26-32 promise_test(function() { a/LayoutTests/webrtc/legacy-api.html_sec2
26
    }).then(() => {
23
    }).then(() => {
27
        return pc2.createAnswer({ }, assert_unreached, assert_unreached);
24
        return pc2.createAnswer({ }, assert_unreached, assert_unreached);
28
    });
25
    });
29
}, "Testing legacy API is not defined when legacy flag is turned off");
26
}, "Testing legacy API is not defined");
30
        </script>
27
        </script>
31
        <script src="../resources/testharnessreport.js"></script>
28
        <script src="../resources/testharnessreport.js"></script>
32
    </body>
29
    </body>

Return to Bug 189040