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

Unified Diff: LayoutTests/fast/speechsynthesis/speech-synthesis-gc-utterance-crash.html

Issue 228133002: Fix crash if utterance is garbage-collected before speech ends. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added comment Created 6 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 | « no previous file | LayoutTests/fast/speechsynthesis/speech-synthesis-gc-utterance-crash-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/speechsynthesis/speech-synthesis-gc-utterance-crash.html
diff --git a/LayoutTests/fast/speechsynthesis/speech-synthesis-gc-utterance-crash.html b/LayoutTests/fast/speechsynthesis/speech-synthesis-gc-utterance-crash.html
new file mode 100644
index 0000000000000000000000000000000000000000..17127222fb3fde6cfe154a802a3a6f40aa35769b
--- /dev/null
+++ b/LayoutTests/fast/speechsynthesis/speech-synthesis-gc-utterance-crash.html
@@ -0,0 +1,33 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+</head>
+<body id="body">
+
+<div id="console"></div>
+
+<script>
+
+ if (window.internals)
+ window.internals.enableMockSpeechSynthesizer(document);
+
+ description("This tests that there isn't a crash if the utterance object is garbage-collected before speaking finishes.");
+
+ if (window.testRunner)
+ testRunner.waitUntilDone();
+
+ window.jsTestIsAsync = true;
+
+ speechSynthesis.speak(new SpeechSynthesisUtterance(" "));
+ gc();
+
+ window.setInterval(function() {
+ if (!speechSynthesis.speaking)
+ finishJSTest();
+ }, 10);
+
+</script>
+
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/speechsynthesis/speech-synthesis-gc-utterance-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698