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

Unified Diff: LayoutTests/fast/speech/scripted/start-exception.html

Issue 1117383002: Changing serviceuri param to be url from string in Blink and tagging requests to speech recognizer Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Modifying tests to add better examples and removing the unnecessary comment Created 5 years, 7 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: LayoutTests/fast/speech/scripted/start-exception.html
diff --git a/LayoutTests/fast/speech/scripted/start-exception.html b/LayoutTests/fast/speech/scripted/start-exception.html
index c21ff433696c6281b4c1c99a2548cdb2e5b66819..4b5d1b850e7f97c9bde0d828f09a0f8517a9a44c 100644
--- a/LayoutTests/fast/speech/scripted/start-exception.html
+++ b/LayoutTests/fast/speech/scripted/start-exception.html
@@ -31,7 +31,7 @@ function doubleStart() {
r.onend = function() {
debug('onend');
- finishJSTest();
+ serviceURIInvalid();
}
} else {
shouldThrow("r.start()", '"InvalidStateError: Failed to execute \'start\' on \'SpeechRecognition\': recognition has already started."');
@@ -44,9 +44,18 @@ function doubleStart() {
shouldThrow("r.start()", '"InvalidStateError: Failed to execute \'start\' on \'SpeechRecognition\': recognition has already started."');
}
+function serviceURIInvalid() {
+ debug('\nserviceURIInvalid():');
+ evalAndLog("window.r = new webkitSpeechRecognition()");
+ evalAndLog("r.serviceURI = 'http:/:/:/badurl'");
+
+ shouldThrow("r.start()", '"SyntaxError: Failed to execute \'start\' on \'SpeechRecognition\': serviceURI is neither empty nor a valid URL."');
+ evalAndLog("r.abort()");
+ finishJSTest();
+}
+
window.onload = run;
window.jsTestIsAsync = true;
</script>
</body>
</html>
-

Powered by Google App Engine
This is Rietveld 408576698