Revision: 809
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=809&view=rev
Author: jevonwright
Date: 2009-06-01 23:03:34 +0000 (Mon, 01 Jun 2009)
Log Message:
-----------
adding missing test case file
Added Paths:
-----------
branches/bug-2791025/jwebunit-commons-tests/src/main/resources/testcases/JavaScriptTest/prototype-alert.html
Added:
branches/bug-2791025/jwebunit-commons-tests/src/main/resources/testcases/JavaScriptTest/prototype-alert.html
===================================================================
---
branches/bug-2791025/jwebunit-commons-tests/src/main/resources/testcases/JavaScriptTest/prototype-alert.html
(rev 0)
+++
branches/bug-2791025/jwebunit-commons-tests/src/main/resources/testcases/JavaScriptTest/prototype-alert.html
2009-06-01 23:03:34 UTC (rev 809)
@@ -0,0 +1,49 @@
+<html>
+ <head>
+ <title>prototype.js test</title>
+ <script src="prototype-1.6.0.3.js"></script>
+ <script language="Javascript">
+
+/**
+ * Define an exception class.
+ */
+function MyException(message) {
+ this.message = message;
+ this.getMessage = function() {
+ return message;
+ }
+
+ this.toString = function() {
+ return "MyException: " + message;
+ }
+
+}
+
+function getFromServer() {
+ $('target').innerHTML = "loading...";
+ new Ajax.Request('../response.jsp',
+ {
+ method:'get',
+ onSuccess: function(transport){
+ var response = transport.responseText || "no response text";
+ $('target').innerHTML = response;
+
+ // we are testing that we can actually get an alert box
+ // from out of here
+ alert("Alert box from Ajax response");
+ throw new MyException("oh noes!");
+ },
+ onFailure: function(transport){ $('target').innerHTML = "something
went wrong..." + transport.responseText; }
+ });
+}
+
+ </script>
+ </head>
+<body>
+
+ <input id="button_press" type="button" value="do ajax"
onClick="getFromServer()" />
+
+ <div id="target">not loaded</div>
+
+</body>
+</html>
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
JWebUnit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development