Lines Matching refs:evt

18 function isErrorEvent(evt) {
19 return (evt.type == 'error' ||
20 evt.type == 'interrupted' ||
21 evt.type == 'cancelled');
24 function logEvent(callTime, testRunName, evt) {
29 console.log(elapsed + ' ' + testRunName + ': ' + JSON.stringify(evt));
63 onEvent: function(evt) {
64 logEvent(callTime, testRunName, evt);
65 if (isErrorEvent(evt)) {
67 } else if (evt.type == 'start') {
69 if (evt.charIndex != 0) {
72 } else if (evt.type == 'end') {
77 if (evt.charIndex != 30) {
111 onEvent: function(evt) {
112 logEvent(callTime, testRunName, evt);
113 if (isErrorEvent(evt)) {
115 } else if (evt.type == 'start') {
117 } else if (evt.type == 'end') {
146 onEvent: function(evt) {
147 logEvent(callTime, testRunName, evt);
148 if (isErrorEvent(evt)) {
150 } else if (evt.type == 'start') {
152 } else if (evt.type == 'end') {
184 onEvent: function(evt) {
185 logEvent(callTime, testRunName, evt);
191 onEvent: function(evt) {
192 logEvent(callTime, testRunName, evt);
193 if (isErrorEvent(evt)) {
195 } else if (evt.type == 'start') {
197 } else if (evt.type == 'end') {
225 onEvent: function(evt) {
226 logEvent(callTime, testRunName, evt);
227 if (isErrorEvent(evt)) {
229 } else if (evt.type == 'end') {
247 onEvent: function(evt) {
248 logEvent(callTime, testRunName, evt);
249 if (isErrorEvent(evt)) {
251 } else if (evt.type == 'end') {
269 onEvent: function(evt) {
270 logEvent(callTime, testRunName, evt);
271 if (isErrorEvent(evt)) {
273 } else if (evt.type == 'end') {
308 onEvent: function(evt) {
309 logEvent(callTime, testRunName, evt);
310 if (isErrorEvent(evt)) {
312 } else if (evt.type == 'start') {
316 } else if (evt.type == 'word') {
317 if (evt.charIndex > 0 && evt.charIndex < 62) {
320 if (evt.charIndex < min || evt.charIndex > max) {
321 errors.push('Got word at charIndex ' + evt.charIndex + ', ' +
328 errors.push('Word at charIndex ' + evt.charIndex +
332 errors.push('Word at charIndex ' + evt.charIndex +
340 } else if (evt.type == 'sentence') {
341 if (evt.charIndex > 0 && evt.charIndex < 62) {
344 if (evt.charIndex < min || evt.charIndex > max) {
345 errors.push('Got sentence at charIndex ' + evt.charIndex +
351 errors.push('Sentence at charIndex ' + evt.charIndex +
355 errors.push('Sentence at charIndex ' + evt.charIndex +
362 } else if (evt.type == 'end') {
407 onEvent: function(evt) {
408 logEvent(callTime, testRunName, evt);
409 if (isErrorEvent(evt)) {
411 } else if (evt.type == 'start') {
419 onEvent: function(evt) {
420 logEvent(callTime, testRunName, evt);
421 if (isErrorEvent(evt)) {
429 onEvent: function(evt) {
430 logEvent(callTime, testRunName, evt);
431 if (isErrorEvent(evt)) {
433 } else if (evt.type == 'end') {
475 onEvent: function(evt) {
476 logEvent(callTime, testRunName, evt);
477 if (isErrorEvent(evt)) {
479 } else if (evt.type == 'start') {
487 onEvent: function(evt) {
488 logEvent(callTime, testRunName, evt);
489 if (isErrorEvent(evt)) {
497 onEvent: function(evt) {
498 logEvent(callTime, testRunName, evt);
499 if (isErrorEvent(evt)) {
501 } else if (evt.type == 'end') {