Changeset 195060 in webkit


Ignore:
Timestamp:
Jan 14, 2016 10:18:19 AM (8 years ago)
Author:
youenn.fablet@crf.canon.fr
Message:

Move streams/webkitGetUserMedia-shadowing-then.html to fast/mediastream
https://bugs.webkit.org/show_bug.cgi?id=152973

Reviewed by Brent Fulgham.

Moved the test, made it asynchronous to ensure that the error callback is called.

  • fast/mediastream/webkitGetUserMedia-shadowing-then-expected.txt: Renamed from LayoutTests/streams/webkitGetUserMedia-shadowing-then-expected.txt.
  • fast/mediastream/webkitGetUserMedia-shadowing-then.html: Renamed from LayoutTests/streams/webkitGetUserMedia-shadowing-then.html.
Location:
trunk/LayoutTests
Files:
1 added
1 deleted
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r195059 r195060  
     12016-01-14  Youenn Fablet  <youenn.fablet@crf.canon.fr>
     2
     3        Move streams/webkitGetUserMedia-shadowing-then.html to fast/mediastream
     4        https://bugs.webkit.org/show_bug.cgi?id=152973
     5
     6        Reviewed by Brent Fulgham.
     7
     8        Moved the test, made it asynchronous to ensure that the error callback is called.
     9
     10        * fast/mediastream/webkitGetUserMedia-shadowing-then-expected.txt: Renamed from LayoutTests/streams/webkitGetUserMedia-shadowing-then-expected.txt.
     11        * fast/mediastream/webkitGetUserMedia-shadowing-then.html: Renamed from LayoutTests/streams/webkitGetUserMedia-shadowing-then.html.
     12
    1132016-01-14  Commit Queue  <commit-queue@webkit.org>
    214
  • trunk/LayoutTests/fast/mediastream/webkitGetUserMedia-shadowing-then.html

    r195059 r195060  
    66</head>
    77<body>
    8 This test verifies that the implementation of navigator.webkitGetUserMedia does not use public promise APIs. Test passes if no message about a shadowed public .then() is printed.
     8<!--
     9This test verifies that the implementation of navigator.webkitGetUserMedia does not use public promise APIs.
     10-->
    911<p id="output"></p>
    1012<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
    1123    // Shadow Promise.prototype.then
    1224    Promise.prototype.then = (function () {
    1325        const realThen = Promise.prototype.then;
    14         return function (successCallback, errorCallback) {
    15             document.getElementById("output").textContent = "Executed shadowed, public .then()";
    16             realThen.call(this, successCallback, errorCallback);
     26        return function () {
     27            endTest("FAIL: Executed shadowed, public .then()");
    1728        }
    1829    })();
    1930
    2031    function gotUserMedia(mediaStream) {
    21         console.log("Got user media");
     32        endTest("FAIL: Got user media");
    2233    }
    2334
    2435    function userMediaError(error) {
    25         console.log(error);
     36        endTest("PASS");
    2637    }
    2738
    28     var options = { audio: false, video: true };
     39    var options = { audio: false, video: false };
    2940    navigator.webkitGetUserMedia(options, gotUserMedia, userMediaError);
    3041
    31     if (window.testRunner) {
    32         testRunner.dumpAsText();
    33     }
    3442</script>
    3543</body>
Note: See TracChangeset for help on using the changeset viewer.