[Spice-devel] [PATCH 2/2] data: add test.html page

Marc-André Lureau marcandre.lureau at gmail.com
Wed Jun 29 05:25:42 PDT 2011


Originally provided by Alon Leny and Peter Hatina.
---
 Makefile.am      |    2 +-
 configure.ac     |    1 +
 data/Makefile.am |    3 ++
 data/test.html   |   84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 89 insertions(+), 1 deletions(-)
 create mode 100644 data/Makefile.am
 create mode 100644 data/test.html

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..c1a35e0
--- /dev/null
+++ b/data/test.html
@@ -0,0 +1,84 @@
+<HTML>
+<HEAD>
+<TITLE>4x Scriptable Plug-in Test</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>
-- 
1.7.5.2



More information about the Spice-devel mailing list