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

Unified Diff: LayoutTests/fast/speech/scripted/speechrecognition-basics.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: Removing the exception on invalid urls, adding chromium to client param of serviceURI, and changing… 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
« no previous file with comments | « no previous file | LayoutTests/fast/speech/scripted/speechrecognition-basics-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/speech/scripted/speechrecognition-basics.html
diff --git a/LayoutTests/fast/speech/scripted/speechrecognition-basics.html b/LayoutTests/fast/speech/scripted/speechrecognition-basics.html
index 95aaa44220f49b63b57cf169b4b5d8cd67ca51c0..551a0e30a0f448586b45ba9adc5d07f241cc6ba3 100644
--- a/LayoutTests/fast/speech/scripted/speechrecognition-basics.html
+++ b/LayoutTests/fast/speech/scripted/speechrecognition-basics.html
@@ -12,7 +12,45 @@ function run() {
shouldBeTrue("'webkitSpeechRecognition' in self");
shouldBeFalse("webkitSpeechRecognition == null");
- oneMatchTest();
+ nullServiceURI();
+}
+
+function nullServiceURI(){
+ debug('\nnullServiceURI():');
+ evalAndLog("window.r = new webkitSpeechRecognition()");
+
+ r.onend = function() {
+ debug('onend');
+ invalidServiceURI();
+ }
+
+ shouldNotThrow("r.start()");
+}
+
+function invalidServiceURI(){
+ debug('\ninvalidServiceURI():');
+ evalAndLog("window.r = new webkitSpeechRecognition()");
+ evalAndLog("r.serviceURI = 'http:/:/:/badurl'");
+
+ r.onend = function() {
+ debug('onend');
+ validServiceURI();
+ }
+
+ shouldNotThrow("r.start()");
+}
+
+function validServiceURI(){
+ debug('\nvalidServiceURI():');
+ evalAndLog("window.r = new webkitSpeechRecognition()");
+ evalAndLog("r.serviceURI = 'chrome://speech-recognition?foo=bar&client=com.example'");
+
+ r.onend = function() {
+ debug('onend');
+ oneMatchTest();
+ }
+
+ shouldNotThrow("r.start()");
}
function oneMatchTest() {
« no previous file with comments | « no previous file | LayoutTests/fast/speech/scripted/speechrecognition-basics-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698