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

Side by Side Diff: LayoutTests/fast/speech/input-readonly-and-disabled.html

Issue 264973003: Remove layout tests for the legacy x-webkit-speech API (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <script type="text/javascript">
8 description('Tests for speech button click with readonly and disabled input fiel ds.');
9
10 function onWebkitSpeechChange() {
11 testFailed('Received unexpected onwebkitspeechchange callback.');
12 finishJSTest();
13 }
14
15 function testField(index) {
16 // Clicking the speech button should fill in mock speech-recognized text.
17 var allInputFields = document.getElementsByTagName('input');
18 var input = allInputFields[index];
19 var x = input.offsetLeft + input.offsetWidth - 4;
20 var y = input.offsetTop + input.offsetHeight / 2;
21 eventSender.mouseMoveTo(x, y);
22 eventSender.mouseDown();
23 eventSender.mouseUp();
24 setTimeout(function() {
25 if (index < allInputFields.length - 1) {
26 testField(index +1);
27 } else {
28 finishJSTest();
29 }
30 }, 50);
31 }
32
33 function run() {
34 if (window.testRunner && window.eventSender) {
35 testRunner.addMockSpeechInputResult('Test', 1.0, '');
36 testField(0);
37 }
38 }
39
40 window.onload = run;
41 window.jsTestIsAsync = true;
42 </script>
43 <input id='readonlyInput' x-webkit-speech onwebkitspeechchange="onWebkitSpeechCh ange()" readonly>
44 <input id='disabledInput' x-webkit-speech onwebkitspeechchange="onWebkitSpeechCh ange()" disabled>
45 </body>
46 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698