Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(501)

Unified Diff: content/test/data/media/webrtc_test_utilities.js

Issue 1073783003: Add tests for closing a frame within the scope of a getusermedia callback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/test/data/media/getusermedia.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/data/media/webrtc_test_utilities.js
diff --git a/content/test/data/media/webrtc_test_utilities.js b/content/test/data/media/webrtc_test_utilities.js
index 5fd38113882b7c6bf7f9db219850291da9e4d2c6..befc1dc7ee4c5062f370e6170920811f794db016 100644
--- a/content/test/data/media/webrtc_test_utilities.js
+++ b/content/test/data/media/webrtc_test_utilities.js
@@ -26,7 +26,12 @@ function setAllEventsOccuredHandler(handler) {
// Tells the C++ code we succeeded, which will generally exit the test.
function reportTestSuccess() {
- window.domAutomationController.send('OK');
+// This function enqueues sending an OK back to the test, rather than doing
phoglund_chromium 2015/04/10 09:58:40 Nit: indent comments 2 steps.
+// it directly. We do this so we catch crashes that occur in the current
+// execution context, but after reportTestSuccess is invoked.
+ setTimeout(function () {
+ window.domAutomationController.send('OK');
+ }, 0);
}
// Returns a custom return value to the test.
@@ -228,4 +233,4 @@ function hasVideoInputDeviceOnSystem() {
else
sendValueToTest('no-video-input-devices');
});
-}
+}
« no previous file with comments | « content/test/data/media/getusermedia.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698