[pypy-svn] r28418 - pypy/dist/pypy/translator/js2/test/html

fijal at codespeak.net fijal at codespeak.net
Wed Jun 7 10:59:54 CEST 2006


Author: fijal
Date: Wed Jun  7 10:59:53 2006
New Revision: 28418

Added:
   pypy/dist/pypy/translator/js2/test/html/anim.html
Log:
Added test-base html file.


Added: pypy/dist/pypy/translator/js2/test/html/anim.html
==============================================================================
--- (empty file)
+++ pypy/dist/pypy/translator/js2/test/html/anim.html	Wed Jun  7 10:59:53 2006
@@ -0,0 +1,36 @@
+<html>
+<head>
+<script type="text/javascript">
+%(jscode)s
+function runTest() {
+    var result = undefined;
+    try {
+        result = %(jstestcase)s;
+    } catch (e) {
+        try {
+            result = "throw '" + e.toSource() + "'";
+        } catch (dummy) {
+            result = "throw 'unknown javascript exception'";
+        }
+    }
+
+   if (result != undefined) {  // if valid result (no timeout)
+        handle_result(result);
+   }
+}
+function handle_result(result) {
+   var resultform = document.forms['resultform'];
+   resultform.result.value = result;
+   %(isinteractive)s
+};
+</script>
+</head>
+<body onLoad="runTest()">
+<img id="anim_img" src="http://codespeak.net/~ericvrp/stressjs/gfx/BubBob.gif"/>
+<img id="anim_img2" src="http://codespeak.net/~ericvrp/stressjs/gfx/BubBob.gif"/>
+<form method="post" name="resultform" id="resultform">
+<input name="result" type="test" value="UNKNOWN" />
+<input name="ok" value="OK" type="submit"/> <input name="notok" value="Not OK" type="submit"/>
+</form>
+</body>
+</html>



More information about the Pypy-commit mailing list