From 4b3f15474f9cbc94f27eb05e686cc75d95a7a005 Mon Sep 17 00:00:00 2001 From: "edburns%acm.org" Date: Fri, 4 May 2007 17:10:35 +0000 Subject: [PATCH] M dist/build.xml - do Alpha 8 release - Copy artifacts to local www for dist via CVS. A dist/webclient-pom.xml - Create Maven POM for error free artifact resolution M dist/mcp-test/src/test/java/cardemo/CarDemoTest.java - Update clientIds - Use new package for WebclientTestCase M dist/mcp-test/src/test/java/jsf_jmaki/JsfjMakiTest.java - Use new timeout mechanism. - Use new package for WebclientTestCase M dist/netbeans/build.xml M dist/netbeans/nbproject/project.properties - alpha 8 M webclient/build-tests.xml - remove cardemo from automated test run M webclient/classes_spec/org/mozilla/mcp/MCP.java A webclient/classes_spec/org/mozilla/mcp/TimeoutHandler.java - Generalized timeout mechanism A webclient/classes_spec/org/mozilla/mcp/CompareFiles.java A webclient/classes_spec/org/mozilla/mcp/THTTPD.java A webclient/classes_spec/org/mozilla/mcp/junit/TestLogStrings.properties A webclient/classes_spec/org/mozilla/mcp/junit/WebclientTestCase.java A webclient/classes_spec/org/mozilla/mcp/junit/package.html R webclient/test/automated/src/classes/org/mozilla/util/THTTPD.java R webclient/test/automated/src/classes/org/mozilla/webclient/CompareFiles.java R webclient/test/automated/src/classes/org/mozilla/webclient/TestLogStrings.properties R webclient/test/automated/src/classes/org/mozilla/webclient/WebclientTestCase.java M webclient/test/automated/src/classes/org/mozilla/webclient/BookmarksTest.java M webclient/test/automated/src/classes/org/mozilla/webclient/BrowserControlFactoryTest.java M webclient/test/automated/src/classes/org/mozilla/webclient/CurrentPageTest.java M webclient/test/automated/src/classes/org/mozilla/webclient/DOMTest.java M webclient/test/automated/src/classes/org/mozilla/webclient/DocumentLoadListenerTest.java M webclient/test/automated/src/classes/org/mozilla/webclient/HistoryTest.java M webclient/test/automated/src/classes/org/mozilla/webclient/KeyListenerTest.java M webclient/test/automated/src/classes/org/mozilla/webclient/MouseListenerTest.java M webclient/test/automated/src/classes/org/mozilla/webclient/NavigationTest.java M webclient/test/automated/src/classes/org/mozilla/webclient/PreferencesTest.java M webclient/test/automated/src/classes/org/mozilla/webclient/ProfileManagerTest.java M webclient/test/automated/src/classes/org/mozilla/webclient/WindowCreatorTest.java M webclient/test/automated/src/classes/org/mozilla/webclient/impl/WebclientFactoryImplTest.java M webclient/test/automated/src/classes/org/mozilla/webclient/impl/wrapper_native/TestGtkBrowserControlCanvas.java M webclient/test/automated/src/classes/org/mozilla/webclient/impl/wrapper_native/WrapperFactoryImplTest.java - New package for mcp JUnit support git-svn-id: svn://10.0.0.236/trunk@225589 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/java/dist/build.xml | 54 +++++- .../src/test/java/cardemo/CarDemoTest.java | 12 +- .../src/test/java/jsf_jmaki/JsfjMakiTest.java | 60 +++--- mozilla/java/dist/netbeans/build.xml | 4 +- .../netbeans/nbproject/project.properties | 8 +- mozilla/java/dist/webclient-pom.xml | 60 ++++++ mozilla/java/webclient/build-tests.xml | 1 - .../org/mozilla/mcp}/CompareFiles.java | 4 +- .../classes_spec/org/mozilla/mcp/MCP.java | 171 +++++++++++++++++- .../org/mozilla/mcp}/THTTPD.java | 4 +- .../org/mozilla/mcp/TimeoutHandler.java | 125 +++++++++++++ .../mcp/junit}/TestLogStrings.properties | 0 .../mozilla/mcp/junit}/WebclientTestCase.java | 27 ++- .../org/mozilla/mcp/junit/package.html | 43 +++++ .../org/mozilla/webclient/BookmarksTest.java | 3 +- .../webclient/BrowserControlFactoryTest.java | 3 +- .../mozilla/webclient/CurrentPageTest.java | 3 +- .../org/mozilla/webclient/DOMTest.java | 3 +- .../webclient/DocumentLoadListenerTest.java | 3 +- .../org/mozilla/webclient/HistoryTest.java | 3 +- .../mozilla/webclient/KeyListenerTest.java | 3 +- .../mozilla/webclient/MouseListenerTest.java | 3 +- .../org/mozilla/webclient/NavigationTest.java | 3 +- .../mozilla/webclient/PreferencesTest.java | 3 +- .../mozilla/webclient/ProfileManagerTest.java | 3 +- .../mozilla/webclient/WindowCreatorTest.java | 3 +- .../impl/WebclientFactoryImplTest.java | 4 +- .../TestGtkBrowserControlCanvas.java | 6 +- .../WrapperFactoryImplTest.java | 4 +- 29 files changed, 541 insertions(+), 82 deletions(-) create mode 100755 mozilla/java/dist/webclient-pom.xml rename mozilla/java/webclient/{test/automated/src/classes/org/mozilla/webclient => classes_spec/org/mozilla/mcp}/CompareFiles.java (98%) mode change 100644 => 100755 rename mozilla/java/webclient/{test/automated/src/classes/org/mozilla/util => classes_spec/org/mozilla/mcp}/THTTPD.java (98%) mode change 100644 => 100755 create mode 100755 mozilla/java/webclient/classes_spec/org/mozilla/mcp/TimeoutHandler.java rename mozilla/java/webclient/{test/automated/src/classes/org/mozilla/webclient => classes_spec/org/mozilla/mcp/junit}/TestLogStrings.properties (100%) mode change 100644 => 100755 rename mozilla/java/webclient/{test/automated/src/classes/org/mozilla/webclient => classes_spec/org/mozilla/mcp/junit}/WebclientTestCase.java (86%) mode change 100644 => 100755 create mode 100755 mozilla/java/webclient/classes_spec/org/mozilla/mcp/junit/package.html diff --git a/mozilla/java/dist/build.xml b/mozilla/java/dist/build.xml index 09bc6074cbe..dee133df08b 100644 --- a/mozilla/java/dist/build.xml +++ b/mozilla/java/dist/build.xml @@ -32,11 +32,12 @@ - - + + + @@ -54,7 +55,8 @@ - + @@ -64,6 +66,7 @@ + @@ -134,6 +137,10 @@ + + + + @@ -148,9 +155,13 @@ targetfile="${dist.javadocs}/index.html" > + + + + @@ -160,7 +171,7 @@ - + @@ -169,13 +180,21 @@ + excludes="**/test/**"> + + + + + + @@ -239,6 +258,11 @@ + + + + + @@ -252,13 +276,25 @@ + + + + + + + + + + unless="javadocs.uptodate"> @@ -278,9 +314,11 @@ bottom="Copyright © 2002-2007 Mozilla.org All Rights Reserved."> + + @@ -288,6 +326,8 @@ + + diff --git a/mozilla/java/dist/mcp-test/src/test/java/cardemo/CarDemoTest.java b/mozilla/java/dist/mcp-test/src/test/java/cardemo/CarDemoTest.java index 3728e80c52d..dc6c451fec6 100755 --- a/mozilla/java/dist/mcp-test/src/test/java/cardemo/CarDemoTest.java +++ b/mozilla/java/dist/mcp-test/src/test/java/cardemo/CarDemoTest.java @@ -1,5 +1,5 @@ /* - * $Id: CarDemoTest.java,v 1.7 2007-03-15 00:33:10 edburns%acm.org Exp $ + * $Id: CarDemoTest.java,v 1.8 2007-05-04 17:10:16 edburns%acm.org Exp $ */ /* @@ -30,7 +30,7 @@ import java.util.Map; import junit.framework.TestFailure; import org.mozilla.mcp.AjaxListener; import org.mozilla.mcp.MCP; -import org.mozilla.webclient.WebclientTestCase; +import org.mozilla.mcp.junit.WebclientTestCase; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.Document; @@ -121,13 +121,13 @@ public class CarDemoTest extends WebclientTestCase { mcp.addAjaxListener(listener); // Load the main page of the app - mcp.blockingLoad("http://javaserver.org/jsf-ajax-cardemo/faces/chooseLocale.jsp"); + mcp.blockingLoad("http://webdev1.sun.com/jsf-ajax-cardemo/faces/chooseLocale.jsp"); // Choose the "German" language button mcp.blockingClickElement("j_id_id73:Germany"); // Choose the roadster mcp.blockingClickElement("j_id_id18:j_id_id43"); // Sample the Basis-Preis and Ihr Preis before the ajax transaction - Element pricePanel = mcp.findElement("j_id_id10:zone1"); + Element pricePanel = mcp.findElement("j_id_id21:zone1"); assertNotNull(pricePanel); String pricePanelText = pricePanel.getTextContent(); @@ -137,7 +137,7 @@ public class CarDemoTest extends WebclientTestCase { // Choose the "Tempomat" checkbox bitSet.clear(); - mcp.clickElement("j_id_id10:j_id_id63j_id_1"); + mcp.clickElement("j_id_id21:j_id_id67j_id_1"); while (!bitSet.get(TestFeature.STOP_WAITING.ordinal())) { Thread.currentThread().sleep(5000); @@ -152,7 +152,7 @@ public class CarDemoTest extends WebclientTestCase { bitSet.clear(); // Sample the Basis-Preis and Ihr-Preis after the ajax transaction - pricePanel = mcp.findElement("j_id_id10:zone1"); + pricePanel = mcp.findElement("j_id_id21:zone1"); assertNotNull(pricePanel); pricePanelText = pricePanel.getTextContent(); diff --git a/mozilla/java/dist/mcp-test/src/test/java/jsf_jmaki/JsfjMakiTest.java b/mozilla/java/dist/mcp-test/src/test/java/jsf_jmaki/JsfjMakiTest.java index a97a6c30c6b..85c1bcafcfd 100644 --- a/mozilla/java/dist/mcp-test/src/test/java/jsf_jmaki/JsfjMakiTest.java +++ b/mozilla/java/dist/mcp-test/src/test/java/jsf_jmaki/JsfjMakiTest.java @@ -1,5 +1,5 @@ /* - * $Id: JsfjMakiTest.java,v 1.1 2007-04-21 03:25:36 edburns%acm.org Exp $ + * $Id: JsfjMakiTest.java,v 1.2 2007-05-04 17:10:16 edburns%acm.org Exp $ */ /* @@ -31,7 +31,8 @@ import java.util.Map; import junit.framework.TestFailure; import org.mozilla.mcp.AjaxListener; import org.mozilla.mcp.MCP; -import org.mozilla.webclient.WebclientTestCase; +import org.mozilla.mcp.TimeoutHandler; +import org.mozilla.mcp.junit.WebclientTestCase; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.Document; @@ -48,9 +49,7 @@ public class JsfjMakiTest extends WebclientTestCase { super(testName); } - private int ajaxTimeOut = 60000; - - private int ajaxWaitInterval = 5000; + private TimeoutHandler timeoutHandler = null; public void setUp() { super.setUp(); @@ -76,8 +75,25 @@ public class JsfjMakiTest extends WebclientTestCase { public void testInplace() throws Exception { mcp.getRealizedVisibleBrowserWindow(); + final Thread testThread = Thread.currentThread(); + timeoutHandler = new TimeoutHandler() { + public void timeout() { + super.timeout(); + testThread.interrupt(); + fail("Action timed out"); + } + }; + mcp.setTimeoutHandler(timeoutHandler); + final BitSet bitSet = new BitSet(); AjaxListener listener = new AjaxListener() { + + public void timedOut() { + fail("Timed out waiting for ajax transaction to complete."); + } + public void errorAjax(Map eventMap) { + fail("Received error on Ajax transaction"); + } public void endAjax(Map eventMap) { bitSet.flip(TestFeature.RECEIVED_END_AJAX_EVENT.ordinal()); if (null != eventMap) { @@ -126,7 +142,11 @@ public class JsfjMakiTest extends WebclientTestCase { mcp.addAjaxListener(listener); // Load the main page of the app - mcp.blockingLoad("http://localhost:8080/jsf-jmaki/index-demo.jsf"); + mcp.blockingLoad("http://webdev2.sun.com/jsf-jmaki/index-demo.jsf"); + + if (timeoutHandler.isDidTimeout()) { + fail("timed out waiting for load"); + } // Choose the inplace test mcp.blockingClickElement("inplace-test"); @@ -174,18 +194,19 @@ public class JsfjMakiTest extends WebclientTestCase { Thread.currentThread().sleep(10000); mcp.deleteBrowserControl(); + } private void makeAjaxAssertions(BitSet bitSet) throws Exception { // Artifically wait for the ajax transaction to complete, or the timeout to be reached. int i = 0; - while (!bitSet.get(TestFeature.STOP_WAITING.ordinal()) || - ((i * getAjaxWaitInterval()) > getAjaxTimeOut())) { + while (true) { + if (bitSet.get(TestFeature.STOP_WAITING.ordinal())) { + break; + } i++; - Thread.currentThread().sleep(getAjaxWaitInterval()); + Thread.currentThread().sleep(mcp.getTimeoutWaitInterval()); } - // Ensure the timeout was not reached - assertFalse(((i * getAjaxWaitInterval()) > getAjaxTimeOut())); // assert that the ajax transaction succeeded assertTrue(bitSet.get(TestFeature.RECEIVED_END_AJAX_EVENT.ordinal())); @@ -255,22 +276,5 @@ public class JsfjMakiTest extends WebclientTestCase { makeAjaxAssertions(bitSet); } - - public int getAjaxTimeOut() { - return ajaxTimeOut; - } - - public void setAjaxTimeOut(int ajaxTimeOut) { - this.ajaxTimeOut = ajaxTimeOut; - } - - public int getAjaxWaitInterval() { - return ajaxWaitInterval; - } - - public void setAjaxWaitInterval(int ajaxWaitInterval) { - this.ajaxWaitInterval = ajaxWaitInterval; - } - } diff --git a/mozilla/java/dist/netbeans/build.xml b/mozilla/java/dist/netbeans/build.xml index c3313b8706a..ad5e9be84b3 100755 --- a/mozilla/java/dist/netbeans/build.xml +++ b/mozilla/java/dist/netbeans/build.xml @@ -210,7 +210,7 @@ ${so.prefix}xul.${so.extension}. + value="${basedir}/../2_0_alpha_8.html" /> @@ -340,7 +340,7 @@ ${so.prefix}xul.${so.extension}. org.mozilla.webclient.impl.WebclientFactoryImpl org.mozilla.webclient.impl.wrapper_native.WrapperFactoryImpl - diff --git a/mozilla/java/dist/netbeans/nbproject/project.properties b/mozilla/java/dist/netbeans/nbproject/project.properties index 3797f115149..f10d4d579b0 100755 --- a/mozilla/java/dist/netbeans/nbproject/project.properties +++ b/mozilla/java/dist/netbeans/nbproject/project.properties @@ -19,15 +19,15 @@ dist.javadoc.dir=${dist.dir}/javadoc file.reference.main-java=../test/manual/src/main/java file.reference.main-java-1=../test/automated/src/main/java file.reference.main-java-2=../src/main/java -file.reference.webclient-2_0_a6.jar=../lib/webclient-2_0_a6.jar +file.reference.webclient-2_0_a8.jar=../lib/webclient-2_0_a8.jar jar.compress=false javac.classpath=\ - ${file.reference.webclient-2_0_a6.jar} + ${file.reference.webclient-2_0_a8.jar} # Space-separated list of extra javac options javac.compilerargs= javac.deprecation=false -javac.source=1.6 -javac.target=1.6 +javac.source=1.5 +javac.target=1.5 javac.test.classpath=\ ${javac.classpath}:\ ${build.classes.dir}:\ diff --git a/mozilla/java/dist/webclient-pom.xml b/mozilla/java/dist/webclient-pom.xml new file mode 100755 index 00000000000..bf3a4472e3a --- /dev/null +++ b/mozilla/java/dist/webclient-pom.xml @@ -0,0 +1,60 @@ + + 4.0.0 + org.mozilla.webclient + webclient + pom + Mozilla Webclient + 2.0-SNAPSHOT + + Artifacts for non-native portion of Mozilla Webclient + spec and implementation. + + http://www.mozilla.org/projects/blackwood/webclient/ + + bugzilla + https://bugzilla.mozilla.org/ + + + + Mozilla Java Webclient Newsgroup + http://groups.google.com/group/mozilla.dev.embedding/post + http://groups.google.com/group/mozilla.dev.embedding/ + + + + + edburns + Ed Burns + edburns@acm.org + Sun Microsystems, Inc. + + project-owner + + -6 + + + + + + + Mozilla Public License 1.1 + http://www.mozilla.org/MPL/MPL-1.1.html + manual + + Due to Webclient's current dependency on native code, it + is not possible to distribute Webclient entirely via Maven. The + Jar portion of Webclient can be distributed via Maven, + however. + + + + + scm:cvs:pserver:anonymous:@cvs-mirror.mozilla.org:/cvsroot:Blackwood + scm:cvs:ext:username:@cvs.mozilla.org:/cvsroot:Blackwood + http://bonsai.mozilla.org/rview.cgi?dir=mozilla/java&cvsroot=/cvsroot&module=default + + + Mozilla Organization + http://www.mozilla.org/ + + diff --git a/mozilla/java/webclient/build-tests.xml b/mozilla/java/webclient/build-tests.xml index bb842649574..9c44ca1478e 100644 --- a/mozilla/java/webclient/build-tests.xml +++ b/mozilla/java/webclient/build-tests.xml @@ -191,7 +191,6 @@ PENDING(edburns): 20070130 XULRunner has no bookmarks - diff --git a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/CompareFiles.java b/mozilla/java/webclient/classes_spec/org/mozilla/mcp/CompareFiles.java old mode 100644 new mode 100755 similarity index 98% rename from mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/CompareFiles.java rename to mozilla/java/webclient/classes_spec/org/mozilla/mcp/CompareFiles.java index 5f5f419fbdd..fba3909fdde --- a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/CompareFiles.java +++ b/mozilla/java/webclient/classes_spec/org/mozilla/mcp/CompareFiles.java @@ -1,5 +1,5 @@ /* - * $Id: CompareFiles.java,v 1.4 2004-04-23 14:52:20 edburns%acm.org Exp $ + * $Id: CompareFiles.java,v 1.1 2007-05-04 17:10:17 edburns%acm.org Exp $ */ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- @@ -24,7 +24,7 @@ * Contributor(s): Ed Burns <edburns@acm.org> */ -package org.mozilla.webclient; +package org.mozilla.mcp; import java.io.*; diff --git a/mozilla/java/webclient/classes_spec/org/mozilla/mcp/MCP.java b/mozilla/java/webclient/classes_spec/org/mozilla/mcp/MCP.java index a9a8bfd84d6..44a91c01ffe 100755 --- a/mozilla/java/webclient/classes_spec/org/mozilla/mcp/MCP.java +++ b/mozilla/java/webclient/classes_spec/org/mozilla/mcp/MCP.java @@ -1,5 +1,5 @@ /* - * $Id: MCP.java,v 1.9 2007-04-21 03:25:37 edburns%acm.org Exp $ + * $Id: MCP.java,v 1.10 2007-05-04 17:10:17 edburns%acm.org Exp $ */ /* @@ -91,6 +91,8 @@ public class MCP { private Robot robot; private DOMTreeDumper treeDumper = null; private CountDownLatch latch = null; + private TimeoutHandler timeoutHandler = null; + private long Timeout = 30000L; private void createLatch() { if (null != latch) { @@ -528,6 +530,7 @@ public class MCP { robot.mouseMove(x, y); robot.mousePress(InputEvent.BUTTON1_MASK); robot.mouseRelease(InputEvent.BUTTON1_MASK); + startTimeoutCheckIfNecessary(); } catch (NumberFormatException ex) { LOGGER.throwing(this.getClass().getName(), "clickElementGivenId", @@ -612,6 +615,7 @@ public class MCP { Navigation2 nav = getNavigation(); synchronized (this) { nav.loadURL(url); + startTimeoutCheckIfNecessary(); createLatch(); try { lockLatch(); @@ -652,6 +656,10 @@ public class MCP { case ((int) DocumentLoadEvent.END_AJAX_EVENT_MASK): case ((int) DocumentLoadEvent.END_DOCUMENT_LOAD_EVENT_MASK): openLatch(); + if (null != MCP.this.timeoutThread) { + MCP.this.abortTimeoutCheck(); + } + break; case ((int) DocumentLoadEvent.START_URL_LOAD_EVENT_MASK): String method = (String) eventData.get("method"); @@ -683,4 +691,165 @@ public class MCP { } + + private void startTimeoutCheckIfNecessary() { + // If we are already tracking a timeout... + if (null != timeoutThread) { + abortTimeoutCheck(); + } + if (null != getTimeoutHandler()) { + timeoutRunnable = new TimeoutRunnable(); + timeoutThread = new Thread(timeoutRunnable, + "TimeoutThread-" + getTimeoutHandler().toString()); + timeoutThread.start(); + } + } + + private void abortTimeoutCheck() { + assert(null != timeoutThread); + assert(null != timeoutRunnable); + timeoutRunnable.setRunning(false); + timeoutThread.interrupt(); + timeoutRunnable = null; + timeoutThread = null; + } + + private Thread timeoutThread = null; + private TimeoutRunnable timeoutRunnable = null; + + /** + *

Return the currently installed {@link TimeoutHandler}, if + * any.

+ */ + + public TimeoutHandler getTimeoutHandler() { + return timeoutHandler; + } + + /** + *

Install an instance of {@link TimeoutHandler} that will be + * used for all subsequent browser interactions (clicks, loads, Ajax + * transactions, etc). To remove the TimeoutHandler, + * pass null to this method. If a handler is + * installed, the timer is automatically started when a browser + * interaction commences. If the browser interaction does not + * complete within {@link #getTimeout} milliseconds, the {@link + * TimeoutHandler#timeout} method is called on the argument + * TimeoutHandler instance.

+ */ + + public void setTimeoutHandler(TimeoutHandler timeoutHandler) { + if (null != timeoutThread) { + abortTimeoutCheck(); + } + this.timeoutHandler = timeoutHandler; + } + + /** + *

Return the number of milliseconds that must elapse before the + * {@link TimeoutHandler} is called. Note that a + * TimeoutHandler is only called if the user has + * installed one by calling {@link #setTimeoutHandler}.

+ */ + + public long getTimeout() { + return Timeout; + } + + /** + *

Set the number of milliseconds that must elapse before the + * {@link TimeoutHandler} is called, if such an instance has been + * installed via a previous call to {@link @setTimeoutHandler}.

+ */ + + public void setTimeout(long Timeout) { + this.Timeout = Timeout; + } + + private long waitInterval = 5000L; + + /** + *

Return the number of milliseconds to wait between timeout + * checks.

+ */ + + public long getTimeoutWaitInterval() { + return waitInterval; + } + + /** + *

Set the number of milliseconds to wait between timeout + * checks.

+ */ + + public void setTimeoutWaitInterval(long waitInterval) { + this.waitInterval = waitInterval; + } + + + + private class TimeoutRunnable implements Runnable { + + public void run() { + setRunning(true); + + while (isRunning()) { + try { + Thread.currentThread().sleep(MCP.this.getTimeoutWaitInterval()); + } catch (InterruptedException ex) { + if (LOGGER.isLoggable(Level.WARNING)) { + LOGGER.log(Level.WARNING, "Thread " + + Thread.currentThread().getName() + + " interrupted while sleeping.", ex); + } + setRunning(false); + return; + } + if (isTimedout()) { + setRunning(false); + if (null != MCP.this.getTimeoutHandler()) { + MCP.this.getTimeoutHandler().timeout(); + } + } + } + + } + + private long startTime = -1L; + + private boolean running = false; + + public boolean isRunning() { + return running; + } + + public void setRunning(boolean newValue) { + if (newValue) { + startTime = System.currentTimeMillis(); + } + else { + startTime = -1L; + } + + this.running = newValue; + } + + /** + *

Returns true if {@link isTiming} returns true + * and the elapsed time between when timing commenced and + * the current time is greater than the value returned by {@link getTimeout}. + * Otherwise, returns false. This method need not be called + * by the user. + */ + + public boolean isTimedout() { + boolean result = false; + if (isRunning()) { + result = (MCP.this.getTimeout() < (System.currentTimeMillis() - startTime)); + } + return result; + } + + } + } diff --git a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/util/THTTPD.java b/mozilla/java/webclient/classes_spec/org/mozilla/mcp/THTTPD.java old mode 100644 new mode 100755 similarity index 98% rename from mozilla/java/webclient/test/automated/src/classes/org/mozilla/util/THTTPD.java rename to mozilla/java/webclient/classes_spec/org/mozilla/mcp/THTTPD.java index b34b309071b..3104ccfe08f --- a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/util/THTTPD.java +++ b/mozilla/java/webclient/classes_spec/org/mozilla/mcp/THTTPD.java @@ -1,5 +1,5 @@ /* - * $Id: THTTPD.java,v 1.6 2005-03-13 17:56:16 edburns%acm.org Exp $ + * $Id: THTTPD.java,v 1.1 2007-05-04 17:10:17 edburns%acm.org Exp $ */ /* @@ -24,7 +24,7 @@ * Contributor(s): Ed Burns <edburns@acm.org> */ -package org.mozilla.util; +package org.mozilla.mcp; import java.io.File; import java.net.ServerSocket; diff --git a/mozilla/java/webclient/classes_spec/org/mozilla/mcp/TimeoutHandler.java b/mozilla/java/webclient/classes_spec/org/mozilla/mcp/TimeoutHandler.java new file mode 100755 index 00000000000..0c3aa4f808c --- /dev/null +++ b/mozilla/java/webclient/classes_spec/org/mozilla/mcp/TimeoutHandler.java @@ -0,0 +1,125 @@ +/* + * $Id: TimeoutHandler.java,v 1.1 2007-05-04 17:10:17 edburns%acm.org Exp $ + */ + +/* + * + * 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 mozilla.org code. + * + * The Initial Developer of the Original Code is Sun + * Microsystems, Inc. Portions created by Sun are + * Copyright (C) 1999 Sun Microsystems, Inc. All + * Rights Reserved. + * + * Contributor(s): Ed Burns <edburns@acm.org> + */ + +package org.mozilla.mcp; + +/** + *

This class provides a simple facility for placing a time bound on + * browser interactions (clicks, Ajax transactions, etc).

+ * + *

Usage

+ * + *

A useful pattern is to use this as an inner class within a JUnit + * testscase:

+

+        final Thread testThread = Thread.currentThread();
+        timeoutHandler = new TimeoutHandler() {
+            public void timeout() {
+                super.timeout();
+                testThread.interrupt();
+                fail("Action timed out");
+            }
+        };        
+        mcp.setTimeoutHandler(timeoutHandler);
+
+ * + *

TimeoutHandler has a boolean JavaBeans property + * called didTimeout that can be used after blocking + * operations to test if a timeout happened.

+ +

+        if (timeoutHandler.isDidTimeout()) {
+            fail("timed out waiting for load");
+        }
+
+ + * + *

Another useful pattern is to combine the previous inner class + * approach with having the browser perform a non-blocking operation, + * and then causing the main thread to enter a loop until either a + * condition is met, or the timeout occurs:

+ * +

+        bitSet.clear();
+        mcp.clickElement(inplaceFields.get(1));
+        makeAjaxAssertions(bitSet);
+//...
+    private void makeAjaxAssertions(BitSet bitSet) throws Exception {
+        // Artifically wait for the ajax transaction to complete, or the timeout to be reached.
+        int i = 0;
+        while (true) {
+            if (bitSet.get(TestFeature.STOP_WAITING.ordinal())) {
+                break;
+            }
+            i++;
+            Thread.currentThread().sleep(mcp.getTimeoutWaitInterval());
+        }
+
+        // assert that the ajax transaction succeeded
+        assertTrue(bitSet.get(TestFeature.RECEIVED_END_AJAX_EVENT.ordinal()));
+    }
+
+
+ * + *

The above code will either exit normally, by virtuo of the + * AjaxListener being called and it setting the STOP_WAITING bit in the + * bitset, or it will terminate due to timeout, in which case the inner + * class timeout method will be called.

+ * + * @author edburns + */ +public class TimeoutHandler { + + /** + *

The default implementation sets the value of the + * didTimeout JavaBeans property to + * true.

+ */ + public void timeout() { + setDidTimeout(true); + } + + private boolean didTimeout = false; + + /** + *

Getter for boolean JavaBeans property + * didTimeout.

+ */ + + public boolean isDidTimeout() { + return didTimeout; + } + + /** + *

Setter for boolean JavaBeans property + * didTimeout.

+ */ + + public void setDidTimeout(boolean didTimeout) { + this.didTimeout = didTimeout; + } + +} diff --git a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/TestLogStrings.properties b/mozilla/java/webclient/classes_spec/org/mozilla/mcp/junit/TestLogStrings.properties old mode 100644 new mode 100755 similarity index 100% rename from mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/TestLogStrings.properties rename to mozilla/java/webclient/classes_spec/org/mozilla/mcp/junit/TestLogStrings.properties diff --git a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/WebclientTestCase.java b/mozilla/java/webclient/classes_spec/org/mozilla/mcp/junit/WebclientTestCase.java old mode 100644 new mode 100755 similarity index 86% rename from mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/WebclientTestCase.java rename to mozilla/java/webclient/classes_spec/org/mozilla/mcp/junit/WebclientTestCase.java index 97477feed06..53dfb9feb7d --- a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/WebclientTestCase.java +++ b/mozilla/java/webclient/classes_spec/org/mozilla/mcp/junit/WebclientTestCase.java @@ -1,5 +1,5 @@ /* - * $Id: WebclientTestCase.java,v 1.15 2007-03-03 20:35:14 edburns%acm.org Exp $ + * $Id: WebclientTestCase.java,v 1.1 2007-05-04 17:10:17 edburns%acm.org Exp $ */ /* @@ -24,7 +24,7 @@ * Contributor(s): Ed Burns <edburns@acm.org> */ -package org.mozilla.webclient; +package org.mozilla.mcp.junit; // WebclientTestCase.java @@ -38,19 +38,26 @@ import java.util.logging.Logger; import junit.framework.TestCase; import junit.framework.TestSuite; import junit.framework.TestResult; +import org.mozilla.mcp.CompareFiles; -import org.mozilla.util.THTTPD; +import org.mozilla.mcp.THTTPD; +import org.mozilla.webclient.BrowserControlFactory; /** * - * WebclientTestCase is a class ... + *

WebclientTestCase extends junit.framework.TestCase + * and allows using MCP from a JUnit test. It makes assertions that + * verify preconditions for running MCP.

* - * Lifetime And Scope

+ *

This class currently has a number of undocumented and unsupported + * features that can be useful if you take the time to look at the + * source. Specifically, it has the ability to capture output from + * running the testcase, compare that output with a golden file, and it + * has a trivial HTTP server built in so webclient automated tests can + * run without any extra server baggage.

* - * @version $Id: WebclientTestCase.java,v 1.15 2007-03-03 20:35:14 edburns%acm.org Exp $ + * @version $Id: WebclientTestCase.java,v 1.1 2007-05-04 17:10:17 edburns%acm.org Exp $ * - * @see Blah - * @see Bloo * */ @@ -63,8 +70,8 @@ public abstract class WebclientTestCase extends TestCase public static final String WEBCLIENTSTUB_LOG_MODULE = "webclientstub"; public static final String WEBCLIENT_LOG_MODULE = "webclient"; public static String OUTPUT_FILE_ROOT = null; -public static final String TEST_LOG = "org.mozilla.webclient.test"; -public static final String TEST_LOG_STRINGS = "org.mozilla.webclient.TestLogStrings"; +public static final String TEST_LOG = "org.mozilla.mcp.junit"; +public static final String TEST_LOG_STRINGS = "org.mozilla.mcp.junit.TestLogStrings"; public static final Logger LOGGER = getLogger(TEST_LOG); diff --git a/mozilla/java/webclient/classes_spec/org/mozilla/mcp/junit/package.html b/mozilla/java/webclient/classes_spec/org/mozilla/mcp/junit/package.html new file mode 100755 index 00000000000..7cff3fa6671 --- /dev/null +++ b/mozilla/java/webclient/classes_spec/org/mozilla/mcp/junit/package.html @@ -0,0 +1,43 @@ + + + + + + + + org.mozilla.mcp.junit + + + + +

JUnit Support for Mozilla Control Program

+ + Master Control Program, from TRON + +

This class extends JUnit TestCase for use with MCP.

+ + + diff --git a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/BookmarksTest.java b/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/BookmarksTest.java index 781b0d02420..384bcf3298a 100644 --- a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/BookmarksTest.java +++ b/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/BookmarksTest.java @@ -1,5 +1,5 @@ /* - * $Id: BookmarksTest.java,v 1.1 2003-09-28 06:29:18 edburns%acm.org Exp $ + * $Id: BookmarksTest.java,v 1.2 2007-05-04 17:10:18 edburns%acm.org Exp $ */ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- @@ -32,6 +32,7 @@ import junit.framework.Test; import java.util.Enumeration; import javax.swing.tree.TreeModel; import javax.swing.tree.TreeNode; +import org.mozilla.mcp.junit.WebclientTestCase; // BookmarksTest.java diff --git a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/BrowserControlFactoryTest.java b/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/BrowserControlFactoryTest.java index 1fc3889aed7..9d513abf8a3 100644 --- a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/BrowserControlFactoryTest.java +++ b/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/BrowserControlFactoryTest.java @@ -1,5 +1,5 @@ /* - * $Id: BrowserControlFactoryTest.java,v 1.4 2006-03-05 03:53:26 edburns%acm.org Exp $ + * $Id: BrowserControlFactoryTest.java,v 1.5 2007-05-04 17:10:18 edburns%acm.org Exp $ */ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- @@ -28,6 +28,7 @@ package org.mozilla.webclient; import junit.framework.TestSuite; import junit.framework.Test; +import org.mozilla.mcp.junit.WebclientTestCase; // BrowserControlFactoryTest.java diff --git a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/CurrentPageTest.java b/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/CurrentPageTest.java index 923f5b1077f..e1288d556b8 100644 --- a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/CurrentPageTest.java +++ b/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/CurrentPageTest.java @@ -1,5 +1,5 @@ /* - * $Id: CurrentPageTest.java,v 1.16 2007-02-26 21:32:35 edburns%acm.org Exp $ + * $Id: CurrentPageTest.java,v 1.17 2007-05-04 17:10:35 edburns%acm.org Exp $ */ /* @@ -43,6 +43,7 @@ import java.awt.datatransfer.DataFlavor; import java.io.File; import java.io.FileInputStream; import java.io.BufferedReader; +import org.mozilla.mcp.junit.WebclientTestCase; import org.w3c.dom.Document; import org.w3c.dom.Node; diff --git a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/DOMTest.java b/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/DOMTest.java index facf4ba3fea..535357c781d 100644 --- a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/DOMTest.java +++ b/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/DOMTest.java @@ -1,5 +1,5 @@ /* - * $Id: DOMTest.java,v 1.3 2007-03-06 03:28:47 edburns%acm.org Exp $ + * $Id: DOMTest.java,v 1.4 2007-05-04 17:10:35 edburns%acm.org Exp $ */ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- @@ -37,6 +37,7 @@ import java.awt.Robot; import java.io.File; import java.io.FileInputStream; +import org.mozilla.mcp.junit.WebclientTestCase; import org.w3c.dom.Document; import org.w3c.dom.Element; diff --git a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/DocumentLoadListenerTest.java b/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/DocumentLoadListenerTest.java index c0dc752a506..ae465881fac 100644 --- a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/DocumentLoadListenerTest.java +++ b/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/DocumentLoadListenerTest.java @@ -1,5 +1,5 @@ /* - * $Id: DocumentLoadListenerTest.java,v 1.5 2006-03-17 00:26:02 edburns%acm.org Exp $ + * $Id: DocumentLoadListenerTest.java,v 1.6 2007-05-04 17:10:35 edburns%acm.org Exp $ */ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- @@ -42,6 +42,7 @@ import java.io.InputStream; import java.awt.Robot; import java.awt.event.InputEvent; +import org.mozilla.mcp.junit.WebclientTestCase; // DocumentLoadListenerTest.java diff --git a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/HistoryTest.java b/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/HistoryTest.java index 2bc8049130f..937258d5e89 100644 --- a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/HistoryTest.java +++ b/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/HistoryTest.java @@ -1,5 +1,5 @@ /* - * $Id: HistoryTest.java,v 1.3 2004-10-26 19:33:15 edburns%acm.org Exp $ + * $Id: HistoryTest.java,v 1.4 2007-05-04 17:10:35 edburns%acm.org Exp $ */ /* @@ -37,6 +37,7 @@ import java.awt.BorderLayout; import java.io.File; import java.io.FileInputStream; +import org.mozilla.mcp.junit.WebclientTestCase; // HistoryTest.java diff --git a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/KeyListenerTest.java b/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/KeyListenerTest.java index 6d0e70f4ba8..f7d599c69c5 100644 --- a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/KeyListenerTest.java +++ b/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/KeyListenerTest.java @@ -1,5 +1,5 @@ /* - * $Id: KeyListenerTest.java,v 1.4 2007-02-15 04:59:50 edburns%acm.org Exp $ + * $Id: KeyListenerTest.java,v 1.5 2007-05-04 17:10:35 edburns%acm.org Exp $ */ /* @@ -36,6 +36,7 @@ import java.awt.event.KeyListener; import java.awt.event.KeyEvent; import java.awt.event.InputEvent; import java.awt.BorderLayout; +import org.mozilla.mcp.junit.WebclientTestCase; import org.w3c.dom.Element; import org.w3c.dom.Node; diff --git a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/MouseListenerTest.java b/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/MouseListenerTest.java index 3937a07fecb..5dccdb36335 100644 --- a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/MouseListenerTest.java +++ b/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/MouseListenerTest.java @@ -1,5 +1,5 @@ /* - * $Id: MouseListenerTest.java,v 1.3 2005-08-20 19:25:52 edburns%acm.org Exp $ + * $Id: MouseListenerTest.java,v 1.4 2007-05-04 17:10:35 edburns%acm.org Exp $ */ /* @@ -37,6 +37,7 @@ import java.awt.event.MouseListener; import java.awt.event.MouseEvent; import java.awt.event.InputEvent; import java.awt.BorderLayout; +import org.mozilla.mcp.junit.WebclientTestCase; import org.w3c.dom.Element; import org.w3c.dom.Node; diff --git a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/NavigationTest.java b/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/NavigationTest.java index 8b290316581..68f5617b81a 100644 --- a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/NavigationTest.java +++ b/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/NavigationTest.java @@ -1,5 +1,5 @@ /* - * $Id: NavigationTest.java,v 1.21 2007-02-23 19:03:12 edburns%acm.org Exp $ + * $Id: NavigationTest.java,v 1.22 2007-05-04 17:10:35 edburns%acm.org Exp $ */ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- @@ -36,6 +36,7 @@ import java.awt.BorderLayout; import java.io.File; import java.io.FileInputStream; +import org.mozilla.mcp.junit.WebclientTestCase; // NavigationTest.java diff --git a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/PreferencesTest.java b/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/PreferencesTest.java index 538d72c6008..bab3bf335cf 100644 --- a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/PreferencesTest.java +++ b/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/PreferencesTest.java @@ -1,5 +1,5 @@ /* - * $Id: PreferencesTest.java,v 1.2 2004-04-01 14:54:57 edburns%acm.org Exp $ + * $Id: PreferencesTest.java,v 1.3 2007-05-04 17:10:35 edburns%acm.org Exp $ */ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- @@ -31,6 +31,7 @@ import junit.framework.Test; import java.util.Properties; import java.util.Iterator; +import org.mozilla.mcp.junit.WebclientTestCase; // PreferencesTest.java diff --git a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/ProfileManagerTest.java b/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/ProfileManagerTest.java index 342ceb5616c..17f2bfd047d 100644 --- a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/ProfileManagerTest.java +++ b/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/ProfileManagerTest.java @@ -1,5 +1,5 @@ /* - * $Id: ProfileManagerTest.java,v 1.3 2004-11-05 06:40:27 edburns%acm.org Exp $ + * $Id: ProfileManagerTest.java,v 1.4 2007-05-04 17:10:35 edburns%acm.org Exp $ */ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- @@ -28,6 +28,7 @@ package org.mozilla.webclient; import junit.framework.TestSuite; import junit.framework.Test; +import org.mozilla.mcp.junit.WebclientTestCase; // ProfileManagerTest.java diff --git a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/WindowCreatorTest.java b/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/WindowCreatorTest.java index e0777b38fd3..2e48eb8b442 100644 --- a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/WindowCreatorTest.java +++ b/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/WindowCreatorTest.java @@ -1,5 +1,5 @@ /* - * $Id: WindowCreatorTest.java,v 1.4 2007-01-22 12:35:14 edburns%acm.org Exp $ + * $Id: WindowCreatorTest.java,v 1.5 2007-05-04 17:10:35 edburns%acm.org Exp $ */ /* @@ -43,6 +43,7 @@ import java.awt.BorderLayout; import java.io.File; import java.io.FileInputStream; +import org.mozilla.mcp.junit.WebclientTestCase; // WindowCreatorTest.java diff --git a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/impl/WebclientFactoryImplTest.java b/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/impl/WebclientFactoryImplTest.java index 5cb613494ac..1e0f08a71f0 100644 --- a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/impl/WebclientFactoryImplTest.java +++ b/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/impl/WebclientFactoryImplTest.java @@ -1,5 +1,5 @@ /* - * $Id: WebclientFactoryImplTest.java,v 1.1 2003-09-28 06:29:19 edburns%acm.org Exp $ + * $Id: WebclientFactoryImplTest.java,v 1.2 2007-05-04 17:10:35 edburns%acm.org Exp $ */ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- @@ -29,7 +29,7 @@ package org.mozilla.webclient.impl; import junit.framework.TestSuite; import junit.framework.Test; -import org.mozilla.webclient.WebclientTestCase; +import org.mozilla.mcp.junit.WebclientTestCase; // WebclientFactoryImplTest.java diff --git a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/impl/wrapper_native/TestGtkBrowserControlCanvas.java b/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/impl/wrapper_native/TestGtkBrowserControlCanvas.java index 1d1fb16dc8d..20b15455bca 100644 --- a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/impl/wrapper_native/TestGtkBrowserControlCanvas.java +++ b/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/impl/wrapper_native/TestGtkBrowserControlCanvas.java @@ -1,5 +1,5 @@ /* - * $Id: TestGtkBrowserControlCanvas.java,v 1.1 2004-04-23 14:52:21 edburns%acm.org Exp $ + * $Id: TestGtkBrowserControlCanvas.java,v 1.2 2007-05-04 17:10:35 edburns%acm.org Exp $ */ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- @@ -31,7 +31,7 @@ package org.mozilla.webclient.impl.wrapper_native; import org.mozilla.util.Assert; import org.mozilla.util.ParameterCheck; -import org.mozilla.webclient.WebclientTestCase; +import org.mozilla.mcp.junit.WebclientTestCase; /** * @@ -39,7 +39,7 @@ import org.mozilla.webclient.WebclientTestCase; * * Lifetime And Scope

* - * @version $Id: TestGtkBrowserControlCanvas.java,v 1.1 2004-04-23 14:52:21 edburns%acm.org Exp $ + * @version $Id: TestGtkBrowserControlCanvas.java,v 1.2 2007-05-04 17:10:35 edburns%acm.org Exp $ * * @see Blah * @see Bloo diff --git a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/impl/wrapper_native/WrapperFactoryImplTest.java b/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/impl/wrapper_native/WrapperFactoryImplTest.java index c1f4265db9a..5d2af728a99 100644 --- a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/impl/wrapper_native/WrapperFactoryImplTest.java +++ b/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/impl/wrapper_native/WrapperFactoryImplTest.java @@ -1,5 +1,5 @@ /* - * $Id: WrapperFactoryImplTest.java,v 1.4 2004-04-20 16:17:43 edburns%acm.org Exp $ + * $Id: WrapperFactoryImplTest.java,v 1.5 2007-05-04 17:10:35 edburns%acm.org Exp $ */ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- @@ -31,7 +31,7 @@ import junit.framework.Test; import org.mozilla.webclient.BrowserControl; import org.mozilla.webclient.BrowserControlFactory; -import org.mozilla.webclient.WebclientTestCase; +import org.mozilla.mcp.junit.WebclientTestCase; import org.mozilla.webclient.impl.BrowserControlImpl; // WrapperFactoryImplTest.java