Chromium Code Reviews| Index: chrome/test/remoting/http_server/clientpage.html |
| diff --git a/chrome/test/remoting/http_server/clientpage.html b/chrome/test/remoting/http_server/clientpage.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b12c97d2d3b7b1ecdd15ac1525a9a55a99d8314a |
| --- /dev/null |
| +++ b/chrome/test/remoting/http_server/clientpage.html |
| @@ -0,0 +1,35 @@ |
| +<html> |
| +<head> |
| + <title>Client Page</title> |
| + <link rel="stylesheet" href="//yui.yahooapis.com/pure/0.4.2/pure-min.css"> |
|
Jamie
2014/03/03 20:56:16
Is this CSS essential for the test? If not, I woul
chaitali
2014/03/04 19:33:45
Done.
|
| + <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> |
| +</head> |
| +<body> |
| + <script> |
|
Jamie
2014/03/03 20:56:16
Please pull this script out into a separate .js fi
chaitali
2014/03/04 19:33:45
Done.
|
| + // Set some global variables |
| + var keypressSucceeded = false; |
| + var keypressText = ""; |
|
anandc
2014/03/03 21:10:03
Single-braces for strings.
http://dev.chromium.org
chaitali
2014/03/04 19:33:45
Done.
|
| + |
| + (function poll(){ |
|
anandc
2014/03/03 21:10:03
pollForKeyPress()
Also, space before opening-brace
chaitali
2014/03/04 19:33:45
Added a TODO for myself. I would like it to poll f
|
| + $.ajax({ |
| + url: "/poll?test=keytest", |
| + type: "GET", |
| + success: function(data){ |
| + console.log(data); |
| + |
| + // If keypress succeeded then |
| + // update relevant vars and stop polling. |
| + if (data.keypressSucceeded == true) { |
| + keypressSucceeded = data.keypressSucceeded; |
| + keypressText = data.keypressText; |
| + } else { |
| + // If keypress did not succeed we should |
| + // continue polling. |
| + setTimeout(poll, 3000); |
| + } |
| + }, |
| + dataType: "json"}); |
| + })(); |
|
Jamie
2014/03/03 20:56:16
I don't think there's much value in using this dec
chaitali
2014/03/04 19:33:45
Done.
|
| + </script> |
| +</body> |
| +</html> |