Index: chrome_frame/test/data/keyevent.html |
=================================================================== |
--- chrome_frame/test/data/keyevent.html (revision 38776) |
+++ chrome_frame/test/data/keyevent.html (working copy) |
@@ -6,31 +6,26 @@ |
src="chrome_frame_tester_helpers.js"></script> |
<script type="text/javascript"> |
- function ValidateUserAgent() { |
- if (isRunningInMSIE()) { |
- onFailure("FullTab_KeyboardTest", 1, "Failed"); |
- } |
- } |
- |
- var key_count = 0; |
var input_string = ""; |
function OnKeyPress() { |
- if (key_count <= 6) { |
- input_string += String.fromCharCode(event.keyCode).toString(); |
- } |
+ appendStatus("Key pressed: " + |
+ String.fromCharCode(event.keyCode).toString()); |
+ input_string += String.fromCharCode(event.keyCode).toString(); |
- if (input_string == "Chrome") { |
- onSuccess("FullTab_KeyboardTest", 1); |
- } else if (key_count >= 6) { |
- onFailure("FullTab_KeyboardTest", 1, "Invalid input string"); |
+ if (input_string.length >= 6) { |
+ appendStatus("Sending message: " + input_string); |
+ window.externalHost.postMessage(input_string); |
} |
} |
</script> |
</head> |
- <body onLoad="setTimeout(ValidateUserAgent, 100);" onkeypress="OnKeyPress()"> |
+ <body onkeypress="OnKeyPress()"> |
ChromeFrame full tab mode keyboard test. Verifies that keypress events make |
it correctly into ChromeFrame. |
+ <div id="statusPanel" style="border: 1px solid red; width: 100%"> |
+ Keyboard test running.... |
+ </div> |
</body> |
</html> |