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

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
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..9b93e4e52f5ee7e037af2c0e489c356d4ec2bdd2 100644
--- a/content/test/data/media/webrtc_test_utilities.js
+++ b/content/test/data/media/webrtc_test_utilities.js
@@ -26,7 +26,14 @@ function setAllEventsOccuredHandler(handler) {
// Tells the C++ code we succeeded, which will generally exit the test.
function reportTestSuccess() {
- window.domAutomationController.send('OK');
+// If a test is reported to succeed and later a crash occurs
phoglund_chromium 2015/04/10 09:47:58 Well, it's not "in the scope of the timer", it's r
perkj_chrome 2015/04/10 09:57:29 Done.
+// after the reporting JavaScript has completed, the test will pass.
+// By completing the test in the scope of a timer, the reporting
+// JavaScript will finish and if that leads to a crash, it happens
+// before the test is reported to pass.
+ setTimeout(function () {
+ window.domAutomationController.send('OK');
+ }, 0);
}
// Returns a custom return value to the test.
@@ -228,4 +235,4 @@ function hasVideoInputDeviceOnSystem() {
else
sendValueToTest('no-video-input-devices');
});
-}
+}
« content/test/data/media/getusermedia.html ('K') | « content/test/data/media/getusermedia.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698