summaryrefslogtreecommitdiffstats
path: root/stoc/test/javavm/testapplet
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
commited5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch)
tree7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /stoc/test/javavm/testapplet
parentInitial commit. (diff)
downloadlibreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.tar.xz
libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.zip
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--stoc/test/javavm/testapplet/TestApplet.html19
-rw-r--r--stoc/test/javavm/testapplet/TestApplet.java53
-rw-r--r--stoc/test/javavm/testapplet/makefile.mk43
3 files changed, 115 insertions, 0 deletions
diff --git a/stoc/test/javavm/testapplet/TestApplet.html b/stoc/test/javavm/testapplet/TestApplet.html
new file mode 100644
index 000000000..e83d2ffe7
--- /dev/null
+++ b/stoc/test/javavm/testapplet/TestApplet.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
+ <TITLE>A Clock (1.1)</TITLE>
+ <META NAME="GENERATOR" CONTENT="StarOffice 6.0 (Win32)">
+ <META NAME="CREATED" CONTENT="20011119;12262427">
+ <META NAME="CHANGED" CONTENT="16010101;0">
+</HEAD>
+<BODY LANG="de-DE">
+<H1>TestApplet</H1>
+<HR>
+<P>
+<APPLET CODE="TestApplet.class" ALIGN=BOTTOM WIDTH=170 HEIGHT=150>
+</APPLET>
+</P>
+
+</BODY>
+</HTML> \ No newline at end of file
diff --git a/stoc/test/javavm/testapplet/TestApplet.java b/stoc/test/javavm/testapplet/TestApplet.java
new file mode 100644
index 000000000..e271f4dd1
--- /dev/null
+++ b/stoc/test/javavm/testapplet/TestApplet.java
@@ -0,0 +1,53 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+import java.awt.Color;
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.net.MalformedURLException;
+
+public class TestApplet extends java.applet.Applet {
+
+ /** Initialization method that will be called after the applet is loaded
+ * into the browser.
+ */
+ @Override
+ public void init () {
+ setBackground( Color.green);
+ resize( 300, 300);
+
+ // Security tests.
+ File f= new File("d:\\temp\\javasecurity.txt");
+ try {
+ f.createNewFile();
+
+ // local connection
+ URL url= new URL("http://localhost:8080/index.html");
+ url.openStream();
+ // remote connection
+ url= new URL("http://www.w3.org/index.html");
+ url.openStream();
+ }catch( MalformedURLException mue) {
+ }catch( IOException e) {
+ String s= e.getMessage();
+ System.out.println(s);
+ }
+
+ }
+}
diff --git a/stoc/test/javavm/testapplet/makefile.mk b/stoc/test/javavm/testapplet/makefile.mk
new file mode 100644
index 000000000..c2b5a2001
--- /dev/null
+++ b/stoc/test/javavm/testapplet/makefile.mk
@@ -0,0 +1,43 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to you under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.apache.org/licenses/LICENSE-2.0 .
+#
+
+PRJ=..$/..$/..
+
+PRJNAME = testapplet
+PACKAGE =
+TARGET = TestApplet
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+
+# Files --------------------------------------------------------
+
+JARFILES = ridl.jar jurt.jar unoil.jar
+
+JAVAFILES= $(subst,$(CLASSDIR)$/$(PACKAGE)$/, $(subst,.class,.java $(JAVACLASSFILES)))
+
+
+JAVACLASSFILES= \
+ $(CLASSDIR)$/$(PACKAGE)$/TestApplet.class
+
+JARCLASSDIRS= .
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk