[MediaStream] 'get' prefix is missing for capabilities and constraints.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Jun 2014 16:33:42 +0000 (16:33 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Jun 2014 16:33:42 +0000 (16:33 +0000)
https://bugs.webkit.org/show_bug.cgi?id=133573

Patch by Kiran <kiran.guduru@samsung.com> on 2014-06-06
Reviewed by Eric Carlson.

Source/WebCore:
Modified the existing MediaStreamTrack.html to test the changes.

As per the Media Capture and Streams spec method names constreaints and
capabilities should be prefixed by 'get'. So updated the method names.

* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::getConstraints):
(WebCore::MediaStreamTrack::getCapabilities):
(WebCore::MediaStreamTrack::constraints): Deleted.
(WebCore::MediaStreamTrack::capabilities): Deleted.
* Modules/mediastream/MediaStreamTrack.h:
* Modules/mediastream/MediaStreamTrack.idl:

LayoutTests:
* fast/mediastream/MediaStreamTrack-expected.txt:
* fast/mediastream/MediaStreamTrack.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@169648 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/mediastream/MediaStreamTrack-expected.txt
LayoutTests/fast/mediastream/MediaStreamTrack.html
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp
Source/WebCore/Modules/mediastream/MediaStreamTrack.h
Source/WebCore/Modules/mediastream/MediaStreamTrack.idl

index 2ad9e65..dd5ddde 100644 (file)
@@ -1,3 +1,13 @@
+2014-06-06  Kiran  <kiran.guduru@samsung.com>
+
+        [MediaStream] 'get' prefix is missing for capabilities and constraints.
+        https://bugs.webkit.org/show_bug.cgi?id=133573
+
+        Reviewed by Eric Carlson.
+
+        * fast/mediastream/MediaStreamTrack-expected.txt:
+        * fast/mediastream/MediaStreamTrack.html:
+
 2014-06-06  Mario Sanchez Prada  <mario.prada@samsung.com>
 
         [GTK] Layout Test accessibility/table-fallback-roles-expose-element-attributes.html is failing
index 1d4ce21..4f17d62 100644 (file)
@@ -7,7 +7,7 @@ PASS getUserMedia succeeded.
 
 videoTrack = mediaStream.getVideoTracks()[0]
 PASS track.readyState is "live"
-checking track.capabilities()
+checking track.getCapabilities()
   sourceId
     0 : 239c24b0-2b15-11e3-8224-0800200c9a66
   sourceType
@@ -43,10 +43,11 @@ PASS states.sourceType is "camera"
   states.volume = undefined
   states.sourceType = camera
   states.sourceId = 239c24b0-2b15-11e3-8224-0800200c9a66
+PASS track.getConstraints(); did not throw exception.
 
 audioTrack = mediaStream.getAudioTracks()[0]
 PASS track.readyState is "live"
-checking track.capabilities()
+checking track.getCapabilities()
   sourceId
     0 : 239c24b1-2b15-11e3-8224-0800200c9a66
   volume
@@ -64,10 +65,11 @@ PASS states.sourceType is "microphone"
   states.volume = 50
   states.sourceType = microphone
   states.sourceId = 239c24b1-2b15-11e3-8224-0800200c9a66
+PASS track.getConstraints(); did not throw exception.
 
 videoTrack2 = videoTrack.clone()
 PASS track.readyState is "live"
-checking track.capabilities()
+checking track.getCapabilities()
   sourceId
     0 : 239c24b0-2b15-11e3-8224-0800200c9a66
   sourceType
@@ -103,6 +105,7 @@ PASS states.sourceType is "camera"
   states.volume = undefined
   states.sourceType = camera
   states.sourceId = 239c24b0-2b15-11e3-8224-0800200c9a66
+PASS track.getConstraints(); did not throw exception.
 PASS videoTrack.id is not videoTrack2.id
 PASS videoTrack.kind is videoTrack2.kind
 PASS videoTrack.label is videoTrack2.label
index 58e045a..8ebe8ec 100644 (file)
@@ -83,8 +83,8 @@
 
             function checkCapabilities(track)
             {
-                debug("checking track.capabilities()");
-                capabilities = track.capabilities();
+                debug("checking track.getCapabilities()");
+                capabilities = track.getCapabilities();
                 logCapabilityList("sourceId", capabilities.sourceId);
                 if (track.kind == "video") {
                     logCapabilityList("sourceType", capabilities.sourceType);
             function checkStates(track)
             {
                 debug("checking track.states()");
-                capabilities = track.capabilities();
+                capabilities = track.getCapabilities();
                 states = track.states();
                 shouldBe('states.sourceId', 'capabilities.sourceId[0]');
                 if (track.kind == "video")
                 shouldBeEqualToString('track.readyState', 'live');
                 checkCapabilities(track);
                 checkStates(track);
+                shouldNotThrow('track.getConstraints();');
             }
 
             function gotStream(stream)
index 64cdf65..9fe4555 100644 (file)
@@ -1,3 +1,23 @@
+2014-06-06  Kiran  <kiran.guduru@samsung.com>
+
+        [MediaStream] 'get' prefix is missing for capabilities and constraints.
+        https://bugs.webkit.org/show_bug.cgi?id=133573
+
+        Reviewed by Eric Carlson.
+
+        Modified the existing MediaStreamTrack.html to test the changes.
+
+        As per the Media Capture and Streams spec method names constreaints and
+        capabilities should be prefixed by 'get'. So updated the method names.
+
+        * Modules/mediastream/MediaStreamTrack.cpp:
+        (WebCore::MediaStreamTrack::getConstraints):
+        (WebCore::MediaStreamTrack::getCapabilities):
+        (WebCore::MediaStreamTrack::constraints): Deleted.
+        (WebCore::MediaStreamTrack::capabilities): Deleted.
+        * Modules/mediastream/MediaStreamTrack.h:
+        * Modules/mediastream/MediaStreamTrack.idl:
+
 2014-06-05  Brent Fulgham  <bfulgham@apple.com>
 
         REGRESSION(169440): Repro crash when playing a video with captions
index 476dec1..1ba5d11 100644 (file)
@@ -155,7 +155,7 @@ void MediaStreamTrack::getSources(ScriptExecutionContext* context, PassRefPtr<Me
         ec = NOT_SUPPORTED_ERR;
 }
 
-RefPtr<MediaTrackConstraints> MediaStreamTrack::constraints() const
+RefPtr<MediaTrackConstraints> MediaStreamTrack::getConstraints() const
 {
     // FIXME: https://bugs.webkit.org/show_bug.cgi?id=122428
     notImplemented();
@@ -167,7 +167,7 @@ RefPtr<MediaSourceStates> MediaStreamTrack::states() const
     return MediaSourceStates::create(m_privateTrack->states());
 }
 
-RefPtr<MediaStreamCapabilities> MediaStreamTrack::capabilities() const
+RefPtr<MediaStreamCapabilities> MediaStreamTrack::getCapabilities() const
 {
     // The source may be shared by multiple tracks, so its states is not necessarily
     // in sync with the track state. A track that is new or has ended always has a source
index 64ea32d..ba6e657 100644 (file)
@@ -75,9 +75,9 @@ public:
 
     static void getSources(ScriptExecutionContext*, PassRefPtr<MediaStreamTrackSourcesCallback>, ExceptionCode&);
 
-    RefPtr<MediaTrackConstraints> constraints() const;
+    RefPtr<MediaTrackConstraints> getConstraints() const;
     RefPtr<MediaSourceStates> states() const;
-    RefPtr<MediaStreamCapabilities> capabilities() const;
+    RefPtr<MediaStreamCapabilities> getCapabilities() const;
     void applyConstraints(const Dictionary&);
     void applyConstraints(PassRefPtr<MediaConstraints>);
 
index 68d5fb9..2edf3b4 100644 (file)
@@ -46,11 +46,11 @@ enum MediaStreamTrackState { "new", "live", "ended" };
 
     [CallWith=ScriptExecutionContext, RaisesException] static void getSources(MediaStreamTrackSourcesCallback callback);
 
-    MediaTrackConstraints constraints();
+    MediaTrackConstraints getConstraints();
 
     MediaSourceStates states();
 
-    MediaStreamCapabilities capabilities(); // returns either AllVideoCapabilities or AllAudioCapabilities
+    MediaStreamCapabilities getCapabilities(); // returns either AllVideoCapabilities or AllAudioCapabilities
 
     void applyConstraints(Dictionary constraints);