blob: 696a4caea9c28beda5d36cbc3c5810ff1439fc91 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test.js"></script>
</head>
<body>
<script type="text/javascript">
description('Tests for SpeechInputResultList\' behavior with too few arguments.');
var speechInputCreatedByScript = false;
function onWebkitSpeechChange() {
shouldThrow('window.event.results.item()');
finishJSTest();
}
function run() {
if (!window.testRunner || !window.eventSender)
return;
testRunner.addMockSpeechInputResult('Pictures of the moon', 1.0, '');
var input = document.getElementById('speechInput');
input.addEventListener('webkitspeechchange', onWebkitSpeechChange);
var x = input.offsetLeft + input.offsetWidth - 8;
var y = input.offsetTop + input.offsetHeight / 2;
eventSender.mouseMoveTo(x, y);
eventSender.mouseDown();
eventSender.mouseUp();
}
window.onload = run;
window.jsTestIsAsync = true;
</script>
<input id='speechInput' x-webkit-speech>
</body>
</html>
|