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

Unified Diff: chrome_frame/test/data/keyevent.html

Issue 604014: First batch of context menu tests... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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 side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698