Title: [198181] trunk/LayoutTests
Revision
198181
Author
[email protected]
Date
2016-03-14 17:59:57 -0700 (Mon, 14 Mar 2016)

Log Message

REGRESSION (r197114): Crash in WebCore::MediaDevicesRequest::didCompletePermissionCheck
https://bugs.webkit.org/show_bug.cgi?id=155453

Reviewed by Eric Carlson.
<rdar://problem/24879447>

Reviewed by Dan Bates.

Further refinement to test case: Remove use of 'setTimeout', and ensure the code gets
called by using 'testRunner.waitUntilDone()'/'testRunner.notifyDone()'.

* fast/mediastream/enumerating-crash.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (198180 => 198181)


--- trunk/LayoutTests/ChangeLog	2016-03-15 00:48:40 UTC (rev 198180)
+++ trunk/LayoutTests/ChangeLog	2016-03-15 00:59:57 UTC (rev 198181)
@@ -1,3 +1,18 @@
+2016-03-14  Brent Fulgham  <[email protected]>
+
+        REGRESSION (r197114): Crash in WebCore::MediaDevicesRequest::didCompletePermissionCheck
+        https://bugs.webkit.org/show_bug.cgi?id=155453
+
+        Reviewed by Eric Carlson.
+        <rdar://problem/24879447>
+
+        Reviewed by Dan Bates.
+
+        Further refinement to test case: Remove use of 'setTimeout', and ensure the code gets
+        called by using 'testRunner.waitUntilDone()'/'testRunner.notifyDone()'.
+
+        * fast/mediastream/enumerating-crash.html:
+
 2016-03-14  Daniel Bates  <[email protected]>
 
         Web Inspector: Display Content Security Policy hash in details sidebar for script and style elements

Modified: trunk/LayoutTests/fast/mediastream/enumerating-crash.html (198180 => 198181)


--- trunk/LayoutTests/fast/mediastream/enumerating-crash.html	2016-03-15 00:48:40 UTC (rev 198180)
+++ trunk/LayoutTests/fast/mediastream/enumerating-crash.html	2016-03-15 00:59:57 UTC (rev 198181)
@@ -1,3 +1,4 @@
+<!DOCTYPE html>
 <html>
 <head>
 </head>
@@ -4,28 +5,25 @@
 <body>
 <p>Test to ensure we don't crash when enumerating media devices. The test passes if it does not crash.</p>
 <script>
-    if (window.testRunner)
+    if (window.testRunner) {
         testRunner.dumpAsText();
+        testRunner.waitUntilDone();
+    }
 </script>
 </body>
 <script>
 function shouldNotCrash() {
-    try {
-        document.addEventListener("webglcontextlost", function () {
-            var x = window.navigator.mediaDevices;
-            x.enumerateDevices();
-            x.getUserMediaFromJS(123456789.);
-        }, true);
+    document.addEventListener("webglcontextlost", function () {
+        var mediaDevices = window.navigator.mediaDevices;
+        mediaDevices.enumerateDevices();
+        mediaDevices.getUserMedia(123456789.);
+        if (window.testRunner)
+            testRunner.notifyDone();
+    }, true);
 
-        var dispatch_fn = function() {
-            var evt = document.createEvent("Event");
-            evt.initEvent("webglcontextlost", false, false);
-            document.dispatchEvent(evt);
-        }
-        window.setInterval(dispatch_fn, 202);
-    } catch(e) {
-        document.write("Errlog shouldNotCrash: " + e.name + ": " + e.message + "<br>");
-    }
+    var event = document.createEvent("Event");
+    event.initEvent("webglcontextlost", false, false);
+    document.dispatchEvent(event);
 }
 shouldNotCrash();
 </script>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to