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

Unified Diff: Source/modules/speech/testing/PlatformSpeechSynthesizerMock.h

Issue 884973003: Extend PlatformSpeechSynthesizerMock with an utterance queue. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: minor test tidying Created 5 years, 11 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: Source/modules/speech/testing/PlatformSpeechSynthesizerMock.h
diff --git a/Source/modules/speech/testing/PlatformSpeechSynthesizerMock.h b/Source/modules/speech/testing/PlatformSpeechSynthesizerMock.h
index 8c36f9b53bb0fa85b529611ea017c83497c65fdf..5d4d36dd7edd0189ecf0d161b5569a4a11c8eec5 100644
--- a/Source/modules/speech/testing/PlatformSpeechSynthesizerMock.h
+++ b/Source/modules/speech/testing/PlatformSpeechSynthesizerMock.h
@@ -36,23 +36,30 @@ class PlatformSpeechSynthesizerMock final : public PlatformSpeechSynthesizer {
public:
static PlatformSpeechSynthesizerMock* create(PlatformSpeechSynthesizerClient*);
- virtual ~PlatformSpeechSynthesizerMock();
- virtual void speak(PlatformSpeechSynthesisUtterance*) override;
- virtual void pause() override;
- virtual void resume() override;
- virtual void cancel() override;
+ ~PlatformSpeechSynthesizerMock() override;
+ void speak(PlatformSpeechSynthesisUtterance*) override;
+ void pause() override;
+ void resume() override;
+ void cancel() override;
- virtual void trace(Visitor*) override;
+ void trace(Visitor*) override;
private:
explicit PlatformSpeechSynthesizerMock(PlatformSpeechSynthesizerClient*);
- virtual void initializeVoiceList() override;
- void speakingFinished(Timer<PlatformSpeechSynthesizerMock>*);
+
+ void initializeVoiceList() override;
+
+ void speakNext();
+ void speakNow();
+
void speakingErrorOccurred(Timer<PlatformSpeechSynthesizerMock>*);
+ void speakingFinished(Timer<PlatformSpeechSynthesizerMock>*);
- Timer<PlatformSpeechSynthesizerMock> m_speakingFinishedTimer;
Timer<PlatformSpeechSynthesizerMock> m_speakingErrorOccurredTimer;
- Member<PlatformSpeechSynthesisUtterance> m_utterance;
+ Timer<PlatformSpeechSynthesizerMock> m_speakingFinishedTimer;
+
+ Member<PlatformSpeechSynthesisUtterance> m_currentUtterance;
+ HeapDeque<Member<PlatformSpeechSynthesisUtterance>> m_queuedUtterances;
};
} // namespace blink
« no previous file with comments | « Source/modules/speech/SpeechSynthesisUtterance.cpp ('k') | Source/modules/speech/testing/PlatformSpeechSynthesizerMock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698