summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2011-06-29 13:57:27 +0200
committerMarc-André Lureau <marcandre.lureau@redhat.com>2011-09-28 15:08:30 +0200
commit40e929d99621f036ee0ac5dc90f6ccb844fac1a0 (patch)
tree8e98b2c3822c268531c6201ec618e3650d9cabc1
parentfa8d34d207b5dad0d1eb0ec9ef93ed101deddd88 (diff)
data: add test.html page
Originally provided by Alon Levy and Peter Hatina.
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac1
-rw-r--r--data/Makefile.am3
-rw-r--r--data/test.html84
4 files changed, 89 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 06330b2..b811df8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = SpiceXPI
+SUBDIRS = SpiceXPI data
EXTRA_DIST = \
m4
diff --git a/configure.ac b/configure.ac
index 79ea17d..6978182 100644
--- a/configure.ac
+++ b/configure.ac
@@ -77,6 +77,7 @@ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AC_OUTPUT([
Makefile
+data/Makefile
SpiceXPI/Makefile
SpiceXPI/src/Makefile
SpiceXPI/src/plugin/Makefile
diff --git a/data/Makefile.am b/data/Makefile.am
new file mode 100644
index 0000000..b47e0c0
--- /dev/null
+++ b/data/Makefile.am
@@ -0,0 +1,3 @@
+NULL =
+
+EXTRA_DIST = test.html
diff --git a/data/test.html b/data/test.html
new file mode 100644
index 0000000..ce94acd
--- /dev/null
+++ b/data/test.html
@@ -0,0 +1,84 @@
+<HTML>
+<HEAD>
+<TITLE>SPICE xpi test page</TITLE>
+</HEAD>
+<BODY onload='BodyLoad()' onunload='BodyUnload()'>
+
+<center>
+<h1>SPICE xpi test page</h1>
+</center>
+
+SPICE xpi test page.
+<br><br>
+
+<center>
+
+<embed type="application/x-spice" width=0 height=0><br>
+
+<script>
+
+var embed = document.embeds[0];
+
+function BodyLoad() {
+ document.getElementById("log").innerHTML += "BodyLoad<br>";
+}
+
+function BodyUnload() {
+ document.getElementById("log").innerHTML += "BodyUnload<br>";
+}
+
+function Execute()
+{
+ document.getElementById("log").innerHTML += "Execute<br>";
+ embed.hostIP = document.all["Host"].value;
+ embed.port = document.all["Port"].value;
+ embed.SecurePort = document.all["SecurePort"].value;
+ embed.Password = document.all["Password"].value;
+ embed.HostSubject = document.all["HostSubject"].value;
+ embed.TrustStore = document.all["TrustStore"].value;
+ embed.fullScreen = false;
+ embed.AdminConsole = (document.all["AdminConsole"].value == "1");
+ embed.HotKeys = document.all["HotKeys"].value;
+ embed.fAudio = true;
+ embed.connect();
+}
+
+function Status()
+{
+ var status = embed.ConnectedStatus();
+ document.getElementById("log").innerHTML += "ConnectedStatus = " + status + "<br>";
+}
+
+function Show()
+{
+ embed.show();
+ document.getElementById("log").innerHTML += "Show was called<br>";
+}
+
+</script>
+
+
+<br>
+Host: <input id="Host" type="text" size="13"> </input>
+Port: <input id="Port" type="text" size="13"> </input> <BR>
+SecurePort: <input id="SecurePort" type="text" size="13"> </input> <BR>
+Password: <input id="Password" type="text" size="13"> </input>
+HotKeys: <input id="HotKeys" type="text" size="13" value="release-cursor=ctrl+alt"> </input>
+AdminConsole: <input id="AdminConsole" type="text" size="5" value="1"> </input>
+<BR>
+HostSubject: <input id="HostSubject" type="text" size="60"> </input></br>
+TrustStore: <textarea id="TrustStore" type="text" cols="65" rows="15"> </textarea> <BR>
+
+<input type=button value="Exec" onclick='Execute()'/>
+<input type=button value="Check Status" onclick='Status()'> </input>
+<input type=button value="Show" onclick='Show()'> </input>
+
+</center>
+
+
+---<br>
+<div id="log">
+</div>
+---<br>
+</BODY>
+</HTML>