Revision: 6166
Author: [email protected]
Date: Sun Sep 20 08:43:57 2009
Log: Checkpoint working state or JUnitShell changes, plus remove  
platform-specific
directories that are no longer needed.

http://code.google.com/p/google-web-toolkit/source/detail?r=6166

Deleted:
  /changes/jat/noswt/dev/core/src-dummy
  /changes/jat/noswt/dev/linux
  /changes/jat/noswt/dev/mac
  /changes/jat/noswt/dev/windows
Modified:
  /changes/jat/noswt/build.xml
  /changes/jat/noswt/common.ant.xml
  /changes/jat/noswt/dev/build.xml
  /changes/jat/noswt/dev/core/src/com/google/gwt/dev/HostedModeBase.java
   
/changes/jat/noswt/dev/core/src/com/google/gwt/dev/shell/GWTShellServlet.java
   
/changes/jat/noswt/dev/oophm/src/com/google/gwt/dev/OophmHostedModeBase.java
   
/changes/jat/noswt/dev/oophm/src/com/google/gwt/dev/shell/BrowserListener.java
  /changes/jat/noswt/eclipse/build-tools/doctool/.project
  /changes/jat/noswt/eclipse/dev/.classpath
  /changes/jat/noswt/eclipse/dev/linux/.project
  /changes/jat/noswt/eclipse/doc/.project
  /changes/jat/noswt/eclipse/samples/I18N/.project
  /changes/jat/noswt/eclipse/samples/Showcase/Showcase-gwtc.launch
  /changes/jat/noswt/eclipse/servlet/.classpath
  /changes/jat/noswt/eclipse/servlet/.project
  /changes/jat/noswt/user/src/com/google/gwt/junit/JUnitShell.java
  /changes/jat/noswt/user/src/com/google/gwt/junit/RunStyle.java
   
/changes/jat/noswt/user/src/com/google/gwt/junit/RunStyleExternalBrowser.java
  /changes/jat/noswt/user/src/com/google/gwt/junit/RunStyleHtmlUnit.java
   
/changes/jat/noswt/user/src/com/google/gwt/junit/RunStyleHtmlUnitHosted.java
  /changes/jat/noswt/user/src/com/google/gwt/junit/RunStyleManual.java
  /changes/jat/noswt/user/src/com/google/gwt/junit/RunStyleRemote.java
  /changes/jat/noswt/user/src/com/google/gwt/junit/RunStyleRemoteWeb.java
  /changes/jat/noswt/user/src/com/google/gwt/junit/RunStyleSelenium.java

=======================================
--- /changes/jat/noswt/build.xml        Thu Sep 17 16:17:20 2009
+++ /changes/jat/noswt/build.xml        Sun Sep 20 08:43:57 2009
@@ -45,7 +45,7 @@
    </target>

    <target name="dist-dev" depends="buildonly" description="[action] Make  
this platform's distribution, minus doc and samples">
-    <gwt.ant dir="distro-source" target="${build.host.platform}" />
+    <gwt.ant dir="distro-source" target="build" />
    </target>

    <target name="dev" description="[subdir] Builds (or runs ${target} if  
set) all the dev libraries">
=======================================
--- /changes/jat/noswt/common.ant.xml   Thu Sep 17 16:17:20 2009
+++ /changes/jat/noswt/common.ant.xml   Sun Sep 20 08:43:57 2009
@@ -100,7 +100,7 @@
    </condition>

    <!-- JUnit support -->
-  <property name="gwt.dev.staging.jar"  
location="${gwt.build.staging}/gwt-dev-${gwt.version}/gwt-dev.jar" />
+  <property name="gwt.dev.staging.jar"  
location="${gwt.build.staging}/gwt-${gwt.version}/gwt-dev.jar" />
    <property name="gwt.junit.port" value="8888" />
    <property name="gwt.junit.testcase.includes" value="**/*Suite.class"/>

=======================================
--- /changes/jat/noswt/dev/build.xml    Thu Sep 17 16:17:20 2009
+++ /changes/jat/noswt/dev/build.xml    Sun Sep 20 08:43:57 2009
@@ -215,23 +215,15 @@
          <filename name="org/eclipse/**/*.java" negate="yes" />
          <filename name="org/apache/**/*.java" negate="yes" />
        </fileset>
-    </gwt.checkstyle>
-
-    <gwt.checkstyle>
-      <fileset dir="core/super/com/google/gwt/dev/jjs/intrinsic" />
-    </gwt.checkstyle>
-
-    <gwt.checkstyle>
        <fileset dir="oophm/src" />
-    </gwt.checkstyle>
-
-    <gwt.checkstyle>
        <fileset dir="oophm/overlay" />
+      <fileset dir="oophm/test" />
      </gwt.checkstyle>

      <gwt.checkstyle>
-      <fileset dir="oophm/test" />
+      <fileset dir="core/super/com/google/gwt/dev/jjs/intrinsic" />
      </gwt.checkstyle>
+
    </target>

    <target name="test" depends="build, compile.tests" description="Run unit  
tests for this project.">
=======================================
--- /changes/jat/noswt/dev/core/src/com/google/gwt/dev/HostedModeBase.java      
 
Wed Sep 16 16:30:53 2009
+++ /changes/jat/noswt/dev/core/src/com/google/gwt/dev/HostedModeBase.java      
 
Sun Sep 20 08:43:57 2009
@@ -462,8 +462,6 @@
    protected abstract void doShutDownServer();

    protected boolean doStartup() {
-    loadRequiredNativeLibs();
-
      // Create the main app window.
      openAppWindow();

@@ -536,8 +534,6 @@
      assert (moduleDef != null) : "Required module state is absent";
      return moduleDef;
    }
-
-  protected abstract void loadRequiredNativeLibs();

    protected abstract boolean notDone();

=======================================
---  
/changes/jat/noswt/dev/core/src/com/google/gwt/dev/shell/GWTShellServlet.java   
 
Thu Aug 27 21:33:04 2009
+++  
/changes/jat/noswt/dev/core/src/com/google/gwt/dev/shell/GWTShellServlet.java   
 
Sun Sep 20 08:43:57 2009
@@ -310,7 +310,8 @@

      if (partialPath.equals(moduleName + ".nocache.js")) {
        // If the '?compiled' request property is specified, don't  
auto-generate.
-      if (request.getParameter("compiled") == null) {
+      String compiledParam = request.getParameter("compiled");
+      if (compiledParam == null) {
          // Generate the .js file.
          try {
            String js = genSelectionScript(logger, moduleName);
=======================================
---  
/changes/jat/noswt/dev/oophm/src/com/google/gwt/dev/OophmHostedModeBase.java    
 
Wed Sep 16 16:30:53 2009
+++  
/changes/jat/noswt/dev/oophm/src/com/google/gwt/dev/OophmHostedModeBase.java    
 
Sun Sep 20 08:43:57 2009
@@ -102,7 +102,7 @@
      }
    }

-  interface OptionPortHosted {
+  protected interface OptionPortHosted {
      int getPortHosted();

      void setPortHosted(int portHosted);
@@ -111,7 +111,7 @@
    /**
     * Handles the -portHosted command line flag.
     */
-  private static class ArgHandlerPortHosted extends ArgHandlerString {
+  protected static class ArgHandlerPortHosted extends ArgHandlerString {

      private final OptionPortHosted options;

@@ -343,6 +343,8 @@

    private AbstractTreeLogger topLogger;

+  protected int codeServerPort;
+
    public OophmHostedModeBase() {
      super();
    }
@@ -470,11 +472,6 @@
       */
      return false;
    }
-
-  @Override
-  protected void loadRequiredNativeLibs() {
-    // no native libraries are needed with OOPHM
-  }

    @Override
    protected synchronized boolean notDone() {
@@ -483,6 +480,9 @@

    @Override
    protected void openAppWindow() {
+    if (isHeadless()) {
+      return;
+    }
      ImageIcon gwtIcon = loadImageIcon("icon24.png");
      frame = new JFrame("GWT Development Mode");
      tabs = new JTabbedPane();
@@ -525,9 +525,16 @@

    private void ensureOophmListener() {
      if (listener == null) {
-      listener = new BrowserListener(getTopLogger(),  
options.getPortHosted(),
+      codeServerPort = options.getPortHosted();
+      listener = new BrowserListener(getTopLogger(), codeServerPort,
            new OophmSessionHandler(browserHost));
        listener.start();
+      try {
+        // save the port we actually used if it was auto
+        codeServerPort = listener.getSocketPort();
+      } catch (UnableToCompleteException e) {
+        // ignore errors listening, we will catch them later
+      }
      }
    }
  }
=======================================
---  
/changes/jat/noswt/dev/oophm/src/com/google/gwt/dev/shell/BrowserListener.java  
 
Tue Mar 17 22:05:42 2009
+++  
/changes/jat/noswt/dev/oophm/src/com/google/gwt/dev/shell/BrowserListener.java  
 
Sun Sep 20 08:43:57 2009
@@ -101,6 +101,14 @@
        throw new RuntimeException("Unable to determine my ip", e);
      }
    }
+
+  public int getSocketPort() throws UnableToCompleteException {
+    if (listenSocket == null) {
+      // If we failed to initialize our socket, just bail here.
+      throw new UnableToCompleteException();
+    }
+    return listenSocket.getLocalPort();
+  }

    public void start() {
      if (listenThread != null) {
=======================================
--- /changes/jat/noswt/eclipse/build-tools/doctool/.project     Mon Mar 12  
12:49:01 2007
+++ /changes/jat/noswt/eclipse/build-tools/doctool/.project     Sun Sep 20  
08:43:57 2009
@@ -24,7 +24,7 @@
                <link>
                        <name>core</name>
                        <type>2</type>
-                       <location>GWT_ROOT/build-tools/doctool</location>
+                       <locationURI>GWT_ROOT/build-tools/doctool</locationURI>
                </link>
        </linkedResources>
  </projectDescription>
=======================================
--- /changes/jat/noswt/eclipse/dev/.classpath   Wed Sep 16 16:30:53 2009
+++ /changes/jat/noswt/eclipse/dev/.classpath   Sun Sep 20 08:43:57 2009
@@ -36,7 +36,7 @@
        <classpathentry kind="var"  
path="GWT_TOOLS/lib/tomcat/servlets-default-1.0.jar"/>
        <classpathentry kind="var"  
path="GWT_TOOLS/lib/tomcat/servlets-invoker-1.0.jar"/>
        <classpathentry kind="var"  
path="GWT_TOOLS/lib/tomcat/tomcat-coyote-1.0.jar"/>
-       <classpathentry kind="var"  
path="GWT_TOOLS/lib/tomcat/tomcat-http11-1.0.jar"/>
+       <classpathentry kind="var"  
path="GWT_TOOLS/lib/tomcat/tomcat-http11-1.0.jar"  
sourcepath="/GWT_TOOLS/lib/tomcat/tomcat-http11-1.0.jar"/>
        <classpathentry kind="var"  
path="GWT_TOOLS/lib/tomcat/tomcat-jk2-2.1.jar"/>
        <classpathentry kind="var"  
path="GWT_TOOLS/lib/tomcat/tomcat-util-5.1.jar"/>
        <classpathentry kind="var"  
path="GWT_TOOLS/lib/sun/swingworker/swing-worker-1.1.jar"/>
=======================================
--- /changes/jat/noswt/eclipse/dev/linux/.project       Mon Mar 12 12:49:01 2007
+++ /changes/jat/noswt/eclipse/dev/linux/.project       Sun Sep 20 08:43:57 2009
@@ -24,12 +24,12 @@
                <link>
                        <name>linux</name>
                        <type>2</type>
-                       <location>GWT_ROOT/dev/linux</location>
+                       <locationURI>GWT_ROOT/dev/linux</locationURI>
                </link>
                <link>
                        <name>core</name>
                        <type>2</type>
-                       <location>GWT_ROOT/dev/core</location>
+                       <locationURI>GWT_ROOT/dev/core</locationURI>
                </link>
        </linkedResources>
  </projectDescription>
=======================================
--- /changes/jat/noswt/eclipse/doc/.project     Mon Mar 12 12:49:01 2007
+++ /changes/jat/noswt/eclipse/doc/.project     Sun Sep 20 08:43:57 2009
@@ -18,7 +18,7 @@
                <link>
                        <name>core</name>
                        <type>2</type>
-                       <location>GWT_ROOT/doc</location>
+                       <locationURI>GWT_ROOT/doc</locationURI>
                </link>
        </linkedResources>
  </projectDescription>
=======================================
--- /changes/jat/noswt/eclipse/samples/I18N/.project    Mon Mar 12 12:49:01  
2007
+++ /changes/jat/noswt/eclipse/samples/I18N/.project    Sun Sep 20 08:43:57  
2009
@@ -24,7 +24,7 @@
                <link>
                        <name>core</name>
                        <type>2</type>
-                       <location>GWT_ROOT/samples/i18n</location>
+                       <locationURI>GWT_ROOT/samples/i18n</locationURI>
                </link>
        </linkedResources>
  </projectDescription>
=======================================
--- /changes/jat/noswt/eclipse/samples/Showcase/Showcase-gwtc.launch    Fri  
Jan 16 11:50:20 2009
+++ /changes/jat/noswt/eclipse/samples/Showcase/Showcase-gwtc.launch    Sun  
Sep 20 08:43:57 2009
@@ -1,5 +1,11 @@
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  <launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry  
value="/gwt-dev-linux/core/src/com/google/gwt/dev/Compiler.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
  <booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables"  
value="true"/>
  <listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
  <listEntry value="&lt;?xml version=&quot;1.0&quot;  
encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry  
containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER&quot;  
javaProject=&quot;Showcase&quot; path=&quot;1&quot;  
type=&quot;4&quot;/&gt;&#10;"/>
=======================================
--- /changes/jat/noswt/eclipse/servlet/.classpath       Wed Jan 30 18:16:33 2008
+++ /changes/jat/noswt/eclipse/servlet/.classpath       Sun Sep 20 08:43:57 2009
@@ -4,5 +4,7 @@
        <classpathentry excluding="**/rebind/|**/tools/|com/google/gwt/json/| 
com/google/gwt/junit/*.java|com/google/gwt/junit/benchmarks/| 
com/google/gwt/junit/client/Benchmark.java| 
com/google/gwt/junit/client/GWTTestCase.java|com/google/gwt/junit/remote/| 
com/google/gwt/junit/server/" kind="src" path="core/src"/>
        <classpathentry kind="var" path="GWT_TOOLS/lib/junit/junit-3.8.1.jar"  
sourcepath="/GWT_TOOLS/lib/junit/junit-3.8.1-src.zip"/>
        <classpathentry kind="var"  
path="GWT_TOOLS/lib/tomcat/servlet-api-2.4.jar"/>
+       <classpathentry combineaccessrules="false" kind="src"  
path="/gwt-dev-linux"/>
+       <classpathentry combineaccessrules="false" kind="src" path="/gwt-user"/>
        <classpathentry kind="output" path="bin"/>
  </classpath>
=======================================
--- /changes/jat/noswt/eclipse/servlet/.project Mon Mar 12 12:49:01 2007
+++ /changes/jat/noswt/eclipse/servlet/.project Sun Sep 20 08:43:57 2009
@@ -18,7 +18,7 @@
                <link>
                        <name>core</name>
                        <type>2</type>
-                       <location>GWT_ROOT/user</location>
+                       <locationURI>GWT_ROOT/user</locationURI>
                </link>
        </linkedResources>
  </projectDescription>
=======================================
--- /changes/jat/noswt/user/src/com/google/gwt/junit/JUnitShell.java    Wed  
Sep 16 16:30:53 2009
+++ /changes/jat/noswt/user/src/com/google/gwt/junit/JUnitShell.java    Sun  
Sep 20 08:43:57 2009
@@ -43,8 +43,9 @@
  import junit.framework.TestCase;
  import junit.framework.TestResult;

-import java.awt.GraphicsEnvironment;
  import java.lang.reflect.Method;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
  import java.util.ArrayList;
  import java.util.Arrays;
  import java.util.EnumSet;
@@ -98,6 +99,7 @@
      void processResult(TestCase testCase, JUnitResult result);
    }

+  @SuppressWarnings("deprecation")
    class ArgProcessor extends GWTShell.ArgProcessor {

      public ArgProcessor() {
@@ -111,6 +113,14 @@
          }
        });

+      // Override port to set auto by default.
+      registerHandler(new ArgHandlerPortHosted(options) {
+        @Override
+        public String[] getDefaultArgs() {
+          return new String[] {"-portHosted", "auto"};
+        }
+      });
+
        // Override log level to set WARN by default..
        registerHandler(new ArgHandlerLogLevel(options) {
          @Override
@@ -151,7 +161,7 @@

          @Override
          public boolean setFlag() {
-          hostedMode = false;
+          developmentMode = false;
            numClients = 1;
            return true;
          }
@@ -183,7 +193,7 @@
          public boolean setString(String str) {
            String[] urls = str.split(",");
            // TODO(jat): support hosted mode here
-          hostedMode = false;
+          developmentMode = false;
            runStyle = RunStyleRemoteWeb.create(JUnitShell.this, urls);
            numClients = urls.length;
            return runStyle != null;
@@ -212,7 +222,7 @@
            String[] targets = str.split(",");
            numClients = targets.length;
            // TODO(jat): support hosted mode here
-          hostedMode = false;
+          developmentMode = false;
            runStyle = RunStyleSelenium.create(JUnitShell.this, targets);
            return runStyle != null;
          }
@@ -266,7 +276,7 @@
            String[] targets = str.split(",");
            try {
              // TODO(jat): merge with above
-            hostedMode = false;
+            developmentMode = false;
              runStyle = new RunStyleHtmlUnit(JUnitShell.this, targets);
              numClients = ((RunStyleHtmlUnit) runStyle).numBrowsers();
              return true;
@@ -380,6 +390,7 @@

          public void setInt(int value) {
            runStyle = new RunStyleManual(JUnitShell.this, value);
+          developmentMode = false;
            numClients = value;
          }
        });
@@ -593,7 +604,7 @@
    /**
     * True if we are running the test in hosted mode
     */
-  private boolean hostedMode = true;
+  private boolean developmentMode = true;

    /**
     * The time the test actually began.
@@ -622,8 +633,22 @@
     */
    private JUnitShell() {
      setRunTomcat(true);
-    setHeadless(false);
-    setHeadless(GraphicsEnvironment.isHeadless());
+    setHeadless(true);
+//    setHeadless(GraphicsEnvironment.isHeadless());
+  }
+
+  public String getModuleUrl(String moduleName) {
+    try {
+      String localhost = InetAddress.getLocalHost().getHostAddress();
+      String url = "http://"; + localhost + ":" + getPort() + "/"
+          + moduleName + "/junit.html";
+      if (developmentMode) {
+        url += "?gwt.hosted=localhost:" + codeServerPort;
+      }
+      return url;
+    } catch (UnknownHostException e) {
+      throw new RuntimeException("Unable to determine my ip address", e);
+    }
    }

    @Override
@@ -642,6 +667,21 @@
    protected long checkForUpdatesInterval() {
      return CheckForUpdates.ONE_MINUTE;
    }
+
+  @Override
+  protected boolean doStartup() {
+    // TODO(jat): refactor so we can avoid startup up the OOPHM listener  
if we
+    //    aren't running in development mode
+    if (!super.doStartup()) {
+      return false;
+    }
+    if (!runStyle.supportsMode(developmentMode)) {
+      getTopLogger().log(TreeLogger.ERROR, "Run style does not support "
+          + (developmentMode ? "development" : "production") + " mode");
+      return false;
+    }
+    return true;
+  }

    @Override
    protected void initializeLogger() {
@@ -860,7 +900,7 @@
        ConfigurationProperty moduleNameProp =  
currentModule.getProperties().createConfiguration(
            "junit.moduleName", false);
        moduleNameProp.setValue(moduleName);
-      if (!hostedMode) {
+      if (!developmentMode) {
          compileForWebMode(syntheticModuleName);
        }
      }
=======================================
--- /changes/jat/noswt/user/src/com/google/gwt/junit/RunStyle.java      Fri Mar 
 
27 07:58:53 2009
+++ /changes/jat/noswt/user/src/com/google/gwt/junit/RunStyle.java      Sun Sep 
 
20 08:43:57 2009
@@ -50,15 +50,6 @@
    public abstract void launchModule(String moduleName)
        throws UnableToCompleteException;

-  /**
-   * Possibly causes a compilation on the specified module.
-   *
-   * @param moduleName the module to compile
-   * @throws UnableToCompleteException
-   */
-  public abstract void maybeCompileModule(String moduleName)
-      throws UnableToCompleteException;
-
    /**
     * Whether the embedded server should ever generate resources.  Hosted  
mode
     * needs this, but not noserver hosted.  TODO(spoon) does web mode get
@@ -67,6 +58,21 @@
    public boolean shouldAutoGenerateResources() {
      return true;
    }
+
+  /**
+   * Return true if this runstyle supports the requested mode.
+   *
+   * <br>This runstyle should also do any setup work specific to the  
particular
+   * mode at this point.
+   *
+   * @param developmentMode true if we are running in development mode
+   *     rather that web/production mode
+   * @return false if we should abort processing due to an unsupported mode
+   *     or an error setting up for that mode
+   */
+  public boolean supportsMode(boolean developmentMode) {
+    return true;
+  }

    /**
     * Tests whether the test was interrupted.
@@ -84,13 +90,4 @@
      return shell.getTopLogger();
    }

-  /**
-   * Gets the suffix of the URL to load.
-   *
-   * @param moduleName the module to run
-   * @return a URL suffix that should be loaded
-   */
-  protected String getUrlSuffix(String moduleName) {
-    return moduleName + "/junit.html";
-  }
-}
+}
=======================================
---  
/changes/jat/noswt/user/src/com/google/gwt/junit/RunStyleExternalBrowser.java   
 
Wed Apr 30 08:09:25 2008
+++  
/changes/jat/noswt/user/src/com/google/gwt/junit/RunStyleExternalBrowser.java   
 
Sun Sep 20 08:43:57 2009
@@ -72,8 +72,7 @@
        throws UnableToCompleteException {
      String commandArray[] = new String[2];
      // construct the URL for the browser to hit
-    commandArray[1] = "http://"; + "localhost" + ":" + shell.getPort() + "/"
-        + getUrlSuffix(moduleName);
+    commandArray[1] = shell.getModuleUrl(moduleName);

      Process child = null;
      for (ExternalBrowser browser : externalBrowsers) {
@@ -129,11 +128,4 @@
        }
      }
    }
-
-  @Override
-  public void maybeCompileModule(String moduleName)
-      throws UnableToCompleteException {
-    shell.compileForWebMode(moduleName, null);
-  }
-
-}
+}
=======================================
--- /changes/jat/noswt/user/src/com/google/gwt/junit/RunStyleHtmlUnit.java      
 
Wed Sep 16 16:30:53 2009
+++ /changes/jat/noswt/user/src/com/google/gwt/junit/RunStyleHtmlUnit.java      
 
Sun Sep 20 08:43:57 2009
@@ -16,7 +16,6 @@
  package com.google.gwt.junit;

  import com.google.gwt.core.ext.TreeLogger;
-import com.google.gwt.core.ext.UnableToCompleteException;

  import com.gargoylesoftware.htmlunit.AlertHandler;
  import com.gargoylesoftware.htmlunit.BrowserVersion;
@@ -165,7 +164,7 @@
    @Override
    public void launchModule(String moduleName) {
      for (BrowserVersion browser : browsers) {
-      String url = getMyUrl(moduleName);
+      String url = shell.getModuleUrl(moduleName);
        HtmlUnitThread hut = createHtmlUnitThread(browser, url);
        shell.getTopLogger().log(TreeLogger.INFO,
            "Starting " + url + " on browser " + browser.getNickname());
@@ -177,12 +176,6 @@
        threads.add(hut);
      }
    }
-
-  @Override
-  public void maybeCompileModule(String moduleName)
-      throws UnableToCompleteException {
-    shell.compileForWebMode(moduleName, getUserAgents());
-  }

    public int numBrowsers() {
      return browsers.size();
=======================================
---  
/changes/jat/noswt/user/src/com/google/gwt/junit/RunStyleHtmlUnitHosted.java    
 
Wed Sep 16 16:30:53 2009
+++  
/changes/jat/noswt/user/src/com/google/gwt/junit/RunStyleHtmlUnitHosted.java    
 
Sun Sep 20 08:43:57 2009
@@ -93,11 +93,6 @@
    public RunStyleHtmlUnitHosted(JUnitShell unitShell, String... targets) {
      super(unitShell, targets);
    }
-
-  @Override
-  public void maybeCompileModule(String moduleName) {
-    // No compilation needed for hosted mode
-  }

    @Override
    protected HtmlUnitThread createHtmlUnitThread(BrowserVersion browser,
@@ -105,10 +100,4 @@
      return RunStyleHtmlUnitHosted.createHtmlUnitThread(browser, url,
          shell.getTopLogger());
    }
-
-  @Override
-  protected String getMyUrl(String moduleName) {
-    // TODO(jat): get the correct address/port
-    return super.getMyUrl(moduleName) + "?gwt.hosted=localhost:9997";
-  }
-}
+}
=======================================
--- /changes/jat/noswt/user/src/com/google/gwt/junit/RunStyleManual.java        
 
Wed Apr 30 08:09:25 2008
+++ /changes/jat/noswt/user/src/com/google/gwt/junit/RunStyleManual.java        
 
Sun Sep 20 08:43:57 2009
@@ -43,14 +43,6 @@
        System.out.println("Please navigate " + numClients
            + " browsers to this URL:");
      }
-    System.out.println(getMyUrl(moduleName));
-  }
-
-  @Override
-  public void maybeCompileModule(String moduleName)
-      throws UnableToCompleteException {
-    System.out.print("Compiling " + moduleName + "...");
-    super.maybeCompileModule(moduleName);
-    System.out.println(" success.");
+    System.out.println(shell.getModuleUrl(moduleName));
    }
  }
=======================================
--- /changes/jat/noswt/user/src/com/google/gwt/junit/RunStyleRemote.java        
 
Wed Sep 16 16:30:53 2009
+++ /changes/jat/noswt/user/src/com/google/gwt/junit/RunStyleRemote.java        
 
Sun Sep 20 08:43:57 2009
@@ -15,11 +15,6 @@
   */
  package com.google.gwt.junit;

-import com.google.gwt.core.ext.UnableToCompleteException;
-
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-
  /**
   * Runs remotely in web mode. This feature is experimental and is not  
officially
   * supported.
@@ -34,20 +29,4 @@
    public boolean isLocal() {
      return false;
    }
-
-  @Override
-  public void maybeCompileModule(String moduleName)
-      throws UnableToCompleteException {
-    shell.compileForWebMode(moduleName);
-  }
-
-  protected String getMyUrl(String moduleName) {
-    try {
-      String localhost = InetAddress.getLocalHost().getHostAddress();
-      return "http://"; + localhost + ":" + shell.getPort() + "/"
-          + getUrlSuffix(moduleName);
-    } catch (UnknownHostException e) {
-      throw new RuntimeException("Unable to determine my ip address", e);
-    }
-  }
-}
+}
=======================================
--- /changes/jat/noswt/user/src/com/google/gwt/junit/RunStyleRemoteWeb.java     
 
Thu May 22 17:07:51 2008
+++ /changes/jat/noswt/user/src/com/google/gwt/junit/RunStyleRemoteWeb.java     
 
Sun Sep 20 08:43:57 2009
@@ -204,7 +204,7 @@
    @Override
    public synchronized void launchModule(String moduleName)
        throws UnableToCompleteException {
-    String url = getMyUrl(moduleName);
+    String url = shell.getModuleUrl(moduleName);

      for (RemoteBrowser remoteBrowser : remoteBrowsers) {
        long callStart = System.currentTimeMillis();
=======================================
--- /changes/jat/noswt/user/src/com/google/gwt/junit/RunStyleSelenium.java      
 
Mon May 18 11:47:32 2009
+++ /changes/jat/noswt/user/src/com/google/gwt/junit/RunStyleSelenium.java      
 
Sun Sep 20 08:43:57 2009
@@ -138,11 +138,12 @@
      // Startup all the selenia and point them at the module url.
      for (RCSelenium remote : remotes) {
        try {
+        String url = shell.getModuleUrl(moduleName);
          shell.getTopLogger().log(TreeLogger.TRACE,
-            "Starting with domain: " + domain + " Opening URL: " +  
getMyUrl(moduleName));
+            "Starting with domain: " + domain + " Opening URL: " + url);
          remote.createSelenium(domain);
          remote.getSelenium().start();
-        remote.getSelenium().open(getMyUrl(moduleName));
+        remote.getSelenium().open(url);
        } catch (Exception e) {
          shell.getTopLogger().log(TreeLogger.ERROR,
              "Error launching browser via Selenium-RC at " +  
remote.getHost(), e);

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to