Changeset 195060 in webkit
- Timestamp:
- Jan 14, 2016 10:18:19 AM (8 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 1 added
- 1 deleted
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r195059 r195060 1 2016-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 1 13 2016-01-14 Commit Queue <commit-queue@webkit.org> 2 14 -
trunk/LayoutTests/fast/mediastream/webkitGetUserMedia-shadowing-then.html
r195059 r195060 6 6 </head> 7 7 <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 <!-- 9 This test verifies that the implementation of navigator.webkitGetUserMedia does not use public promise APIs. 10 --> 9 11 <p id="output"></p> 10 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 11 23 // Shadow Promise.prototype.then 12 24 Promise.prototype.then = (function () { 13 25 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()"); 17 28 } 18 29 })(); 19 30 20 31 function gotUserMedia(mediaStream) { 21 console.log("Got user media");32 endTest("FAIL: Got user media"); 22 33 } 23 34 24 35 function userMediaError(error) { 25 console.log(error);36 endTest("PASS"); 26 37 } 27 38 28 var options = { audio: false, video: true };39 var options = { audio: false, video: false }; 29 40 navigator.webkitGetUserMedia(options, gotUserMedia, userMediaError); 30 41 31 if (window.testRunner) {32 testRunner.dumpAsText();33 }34 42 </script> 35 43 </body>
Note: See TracChangeset
for help on using the changeset viewer.