Index: LayoutTests/fast/speech/speech-input-scripting.html |
diff --git a/LayoutTests/fast/speech/speech-input-scripting.html b/LayoutTests/fast/speech/speech-input-scripting.html |
deleted file mode 100644 |
index f81f620d9f7f414cc03b05a34f350ab115fc1988..0000000000000000000000000000000000000000 |
--- a/LayoutTests/fast/speech/speech-input-scripting.html |
+++ /dev/null |
@@ -1,74 +0,0 @@ |
-<!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 enabling and disabling speech input via script.'); |
- |
-var speechInputCreatedByScript = false; |
- |
-function onWebkitSpeechChange() { |
- shouldBeEqualToString('document.getElementById("speechInput").value', 'Pictures of the moon'); |
- |
- // Disable speech input now, just to verify this doesn't result in any crashes. |
- var input = document.getElementById('speechInput'); |
- input.removeAttribute('x-webkit-speech'); |
- |
- // If the test has only been done with a type='text' field, repeat the same with a |
- // type='search' field since that takes a slightly different code path. |
- if (input.type != 'search') { |
- input.type = 'search'; |
- testSetAttributeAndClick(); |
- return; |
- } |
- |
- // If the test has only been done with a statically declared element, now repeat the same |
- // with a dynamically created/inserted element. |
- if (!speechInputCreatedByScript) { |
- document.body.removeChild(input); |
- input = document.createElement('input'); |
- input.id = 'speechInput'; |
- document.body.appendChild(input); |
- speechInputCreatedByScript = true; |
- testSetAttributeAndClick(); |
- return; |
- } |
- |
- finishJSTest(); |
-} |
- |
-function testSetAttributeAndClick() { |
- // Enable speech input and test that clicking the speech button fills in mock speech-recognized text. |
- var input = document.getElementById('speechInput'); |
- input.setAttribute('x-webkit-speech', ''); |
- 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(); |
-} |
- |
-function run() { |
- if (!window.testRunner || !window.eventSender) |
- return; |
- |
- testRunner.addMockSpeechInputResult('Pictures of the moon', 1.0, ''); |
- |
- // Try disabling speech with an input tag which has the attribute set in HTML and |
- // verify that doesn't result in any crashes. |
- document.getElementById('inputWithAttribute').removeAttribute('x-webkit-speech'); |
- |
- testSetAttributeAndClick(); |
-} |
- |
-window.onload = run; |
-window.jsTestIsAsync = true; |
-</script> |
-<input id='speechInput'> |
-<input id='inputWithAttribute' x-webkit-speech> |
-</body> |
-</html> |