Stress test, for 64332.

git-svn-id: svn://10.0.0.236/trunk@95834 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
edburns%acm.org
2001-05-23 22:27:01 +00:00
parent a2084f364a
commit cbc47220cf
8 changed files with 271 additions and 61 deletions

View File

@@ -57,7 +57,7 @@ import java.io.FileInputStream;
* This is a test application for using the BrowserControl.
*
* @version $Id: EMWindow.java,v 1.29 2001-05-08 21:57:53 edburns%acm.org Exp $
* @version $Id: EMWindow.java,v 1.30 2001-05-23 22:26:51 edburns%acm.org Exp $
*
* @see org.mozilla.webclient.BrowserControlFactory
@@ -310,7 +310,6 @@ private UniversalDialog uniDialog = null;
"network.cookie.warnAboutCookies",
"This IS the Closure!");
prefs.setPref("network.cookie.warnAboutCookies", "true");
prefs.setPref("browser.cache.disk_cache_size", "0");
// pull out the proxies, and make java aware of them
Properties prefsProps = prefs.getPrefs();
@@ -418,6 +417,11 @@ public void delete()
currentDocument = null;
}
public BrowserControl getBrowserControl()
{
return browserControl;
}
public void actionPerformed (ActionEvent evt)
{

View File

@@ -38,69 +38,17 @@ import org.mozilla.util.Assert;
* This is a test application for using the BrowserControl.
*
* @version $Id: EmbeddedMozilla.java,v 1.5 2001-04-02 21:13:48 ashuk%eng.sun.com Exp $
* @version $Id: EmbeddedMozilla.java,v 1.6 2001-05-23 22:26:52 edburns%acm.org Exp $
*
* @see org.mozilla.webclient.BrowserControlFactory
*/
public class EmbeddedMozilla
public interface EmbeddedMozilla
{
public static String binDir;
public static String url;
public static int count = 0;
public EMWindow[] EMWindow_Arr;
public static void printUsage()
{
System.out.println("usage: java org.mozilla.webclient.test.EmbeddedMozilla <path> [url]");
System.out.println(" <path> is the absolute path to the native browser bin directory, ");
System.out.println(" including the bin.");
}
public EmbeddedMozilla()
{
CreateEMWindow();
}
public void CreateEMWindow()
{
System.out.println("Creating new EmbeddedMozilla window");
EMWindow aEMWindow ;
aEMWindow = new EMWindow("EmbeddedMozila#" + (int)(count+1),
binDir, url, count, this);
count++;
}
public void DestroyEMWindow(int winNumber) {
count--;
if (count == 0) {
System.out.println("closing application");
try {
BrowserControlFactory.appTerminate();
}
catch(Exception e) {
System.out.println("got Exception on exit: " + e.getMessage());
}
System.exit(0);
}
}
public static void main(String [] arg)
{
if (1 > arg.length) {
printUsage();
System.exit(-1);
}
String urlArg =(2 == arg.length) ? arg[1] : "http://www.mozilla.org/projects/blackwood/webclient/";
// set class vars used in EmbeddedMozilla ctor
binDir = arg[0];
url = urlArg;
EmbeddedMozilla em = new EmbeddedMozilla();
}
public void CreateEMWindow();
public void DestroyEMWindow(int winNumber);
}

View File

@@ -0,0 +1,107 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (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.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is RaptorCanvas.
*
* The Initial Developer of the Original Code is Kirk Baker and
* Ian Wilkinson. Portions created by Kirk Baker and Ian Wilkinson are
* Copyright (C) 1999 Kirk Baker and Ian Wilkinson. All
* Rights Reserved.
*
* Contributor(s): Kirk Baker <kbaker@eb.com>
* Ian Wilkinson <iw@ennoble.com>
* Mark Goddard
* Ed Burns <edburns@acm.org>
*/
package org.mozilla.webclient.test;
/*
* EmbeddedMozillaImpl.java
*/
import org.mozilla.webclient.*;
import org.mozilla.util.Assert;
/**
*
* This is a test application for using the BrowserControl.
*
* @version $Id: EmbeddedMozillaImpl.java,v 1.1 2001-05-23 22:26:53 edburns%acm.org Exp $
*
* @see org.mozilla.webclient.BrowserControlFactory
*/
public class EmbeddedMozillaImpl implements EmbeddedMozilla
{
public static String binDir;
public static String url;
public static int count = 0;
public EMWindow[] EMWindow_Arr;
public static void printUsage()
{
System.out.println("usage: java org.mozilla.webclient.test.EmbeddedMozillaImpl <path> [url]");
System.out.println(" <path> is the absolute path to the native browser bin directory, ");
System.out.println(" including the bin.");
}
public EmbeddedMozillaImpl()
{
CreateEMWindow();
}
public void CreateEMWindow()
{
System.out.println("Creating new EmbeddedMozillaImpl window");
EMWindow aEMWindow ;
aEMWindow = new EMWindow("EmbeddedMozila#" + (int)(count+1),
binDir, url, count, this);
count++;
}
public void DestroyEMWindow(int winNumber) {
count--;
if (count == 0) {
System.out.println("closing application");
try {
BrowserControlFactory.appTerminate();
}
catch(Exception e) {
System.out.println("got Exception on exit: " + e.getMessage());
}
System.exit(0);
}
}
public static void main(String [] arg)
{
if (1 > arg.length) {
printUsage();
System.exit(-1);
}
String urlArg =(2 == arg.length) ? arg[1] : "http://www.mozilla.org/projects/blackwood/webclient/";
// set class vars used in EmbeddedMozillaImpl ctor
binDir = arg[0];
url = urlArg;
EmbeddedMozillaImpl em = new EmbeddedMozillaImpl();
}
}
// EOF