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

Unified Diff: third_party/WebKit/Source/modules/speech/testing/PlatformSpeechSynthesizerMock.cpp

Issue 1861323003: Have the mock PlatformSpeechSynthesizer ignore pause/resume sometimes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « third_party/WebKit/LayoutTests/fast/speechsynthesis/speech-synthesis-mock-no-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/speech/testing/PlatformSpeechSynthesizerMock.cpp
diff --git a/third_party/WebKit/Source/modules/speech/testing/PlatformSpeechSynthesizerMock.cpp b/third_party/WebKit/Source/modules/speech/testing/PlatformSpeechSynthesizerMock.cpp
index 956b8601070ef732b858a642ec384566d2137526..6722528048a346b2d73681ea1793e617d0aba3db 100644
--- a/third_party/WebKit/Source/modules/speech/testing/PlatformSpeechSynthesizerMock.cpp
+++ b/third_party/WebKit/Source/modules/speech/testing/PlatformSpeechSynthesizerMock.cpp
@@ -121,11 +121,17 @@ void PlatformSpeechSynthesizerMock::cancel()
void PlatformSpeechSynthesizerMock::pause()
{
+ if (!m_currentUtterance)
+ return;
+
client()->didPauseSpeaking(m_currentUtterance);
}
void PlatformSpeechSynthesizerMock::resume()
{
+ if (!m_currentUtterance)
+ return;
+
client()->didResumeSpeaking(m_currentUtterance);
}
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/speechsynthesis/speech-synthesis-mock-no-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698