Fix flaky test added with r192954.
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Dec 2015 23:04:47 +0000 (23:04 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Dec 2015 23:04:47 +0000 (23:04 +0000)
Unreviewed.

* fast/mediastream/MediaStreamTrack-getSettings.html:

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

LayoutTests/ChangeLog
LayoutTests/fast/mediastream/MediaStreamTrack-getSettings.html

index d20c3a8..9a61166 100644 (file)
@@ -1,3 +1,11 @@
+2015-12-02  Eric Carlson  <eric.carlson@apple.com>
+
+        Fix flaky test added with r192954.
+
+        Unreviewed.
+
+        * fast/mediastream/MediaStreamTrack-getSettings.html:
+
 2015-12-02  Commit Queue  <commit-queue@webkit.org>
 
         Unreviewed, rolling out r192955.
index 01c065d..83cbf21 100644 (file)
                     return value.toFixed(precision);
                 return value;
             }
+            
+            function listTrackProperties(track)
+            {
+                debug(`${track.kind} track:`);
+                settings = track.getSettings();
+                for (var property in settings) {
+                    if (settings.hasOwnProperty(property) || settings.__proto__.hasOwnProperty(property))
+                        if (property == "deviceId")
+                            value = "&lt;UUID>";
+                        else
+                            value = limitPrecision(settings[property], 2);
+                        debug(`  settings.${property} = ${value}`);
+                }
+                debug("");
+            }
 
             function gotStream(stream)
             {
                 mediaStream = stream;
-                mediaStream.getTracks().forEach(function(track) {
-                    debug(`${track.kind} track:`);
-                    settings = track.getSettings();
-                    for (var property in settings) {
-                        if (settings.hasOwnProperty(property) || settings.__proto__.hasOwnProperty(property))
-                            if (property == "deviceId")
-                                value = "&lt;UUID>";
-                            else
-                                value = limitPrecision(settings[property], 2);
-                            debug(`  settings.${property} = ${value}`);
-                    }
-                    debug("");
-                });
+                listTrackProperties(mediaStream.getVideoTracks()[0]);
+                listTrackProperties(mediaStream.getAudioTracks()[0]);
                 finishJSTest();
             }