velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cbris...@apache.org
Subject svn commit: r1768182 - in /velocity/tools/trunk: velocity-tools-examples/velocity-tools-examples-showcase/ velocity-tools-examples/velocity-tools-examples-showcase/src/test/java/org/apache/velocity/examples/showcase/ velocity-tools-generic/src/main/jav...
Date Sat, 05 Nov 2016 10:22:02 GMT
Author: cbrisson
Date: Sat Nov  5 10:22:01 2016
New Revision: 1768182

URL: http://svn.apache.org/viewvc?rev=1768182&view=rev
Log:
[tools] blackbox tests debugging in progress

Modified:
    velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/pom.xml
    velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/src/test/java/org/apache/velocity/examples/showcase/ViewToolsIT.java
    velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/ConfigurationUtils.java
    velocity/tools/trunk/velocity-tools-view/pom.xml
    velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/BrowserTool.java

Modified: velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/pom.xml
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/pom.xml?rev=1768182&r1=1768181&r2=1768182&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/pom.xml
(original)
+++ velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/pom.xml
Sat Nov  5 10:22:01 2016
@@ -57,6 +57,20 @@
                 <groupId>org.codehaus.cargo</groupId>
                 <artifactId>cargo-maven2-plugin</artifactId>
                 <version>1.6.0</version>
+                <!-- enable remote debugging
+                <configuration>
+                    <configuration>
+                        <properties>
+                            <cargo.jvmargs>
+                                -Xdebug
+                                -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
+                                -Xnoagent
+                                -Djava.compiler=NONE
+                            </cargo.jvmargs>
+                        </properties>
+                    </configuration>
+                </configuration>
+                -->
                 <executions>
                     <execution>
                         <configuration>
@@ -116,12 +130,6 @@
         	<version>${project.version}</version>
         	<scope>runtime</scope>
         </dependency>
-        <dependency>
-        	<groupId>org.apache.velocity</groupId>
-        	<artifactId>velocity-tools-browser</artifactId>
-        	<version>${project.version}</version>
-        	<scope>runtime</scope>
-        </dependency>
         <dependency>
         	<groupId>org.apache.velocity</groupId>
         	<artifactId>velocity-tools-view-jsp</artifactId>

Modified: velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/src/test/java/org/apache/velocity/examples/showcase/ViewToolsIT.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/src/test/java/org/apache/velocity/examples/showcase/ViewToolsIT.java?rev=1768182&r1=1768181&r2=1768182&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/src/test/java/org/apache/velocity/examples/showcase/ViewToolsIT.java
(original)
+++ velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/src/test/java/org/apache/velocity/examples/showcase/ViewToolsIT.java
Sat Nov  5 10:22:01 2016
@@ -165,7 +165,7 @@ public class ViewToolsIT {
 
     /******* Tests **********/
 
-    public @Test void testBrowserSnifferTool() throws Exception {
+    public @Test void testBrowserTool() throws Exception {
         /* check we are identified as a Java (HttpUnit) client */
         WebConversation conv = new WebConversation();
         WebRequest req = new GetMethodWebRequest(ROOT_URL+"browser.vm");

Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/ConfigurationUtils.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/ConfigurationUtils.java?rev=1768182&r1=1768181&r2=1768182&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/ConfigurationUtils.java
(original)
+++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/ConfigurationUtils.java
Sat Nov  5 10:22:01 2016
@@ -46,8 +46,6 @@ public class ConfigurationUtils
         "/org/apache/velocity/tools/xml/tools.xml";
     public static final String VIEW_DEFAULTS_PATH =
         "/org/apache/velocity/tools/view/tools.xml";
-    public static final String BROWSER_DEFAULTS_PATH =
-        "/org/apache/velocity/tools/browser/tools.xml";
     public static final String STRUTS_DEFAULTS_PATH =
         "/org/apache/velocity/tools/struts/tools.xml";
 
@@ -85,7 +83,6 @@ public class ConfigurationUtils
         // xml tools, view tools and struts tools may not be available
         config.read(XML_DEFAULTS_PATH, false);
         config.read(VIEW_DEFAULTS_PATH, false);
-        config.read(BROWSER_DEFAULTS_PATH, false);
         config.read(STRUTS_DEFAULTS_PATH, false);
 
         // defaults should *always* be clean!

Modified: velocity/tools/trunk/velocity-tools-view/pom.xml
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/pom.xml?rev=1768182&r1=1768181&r2=1768182&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/pom.xml (original)
+++ velocity/tools/trunk/velocity-tools-view/pom.xml Sat Nov  5 10:22:01 2016
@@ -92,48 +92,3 @@
         </dependency>
     </dependencies>
 </project>
-
-
-  <build>
-    <defaultGoal>install</defaultGoal>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <version>${surefire.plugin.version}</version>
-        <configuration>
-          <skip>${maven.test.skip}</skip>
-          <systemProperties>
-            <property>
-              <name>test</name>
-              <value>${test}</value>
-            </property>
-            <property>
-              <name>test.output.dir</name>
-              <value>${project.build.testOutputDirectory}</value>
-            </property>
-            <property>
-              <name>test.result.dir</name>
-              <value>${project.build.directory}/results</value>
-            </property>
-            <property>
-              <name>org.slf4j.simpleLogger.defaultLogLevel</name>
-              <value>warn</value>
-              </property>
-          </systemProperties>
-        </configuration>
-        <executions>
-          <execution>
-            <id>integration-test</id>
-            <phase>integration-test</phase>
-            <goals>
-              <goal>test</goal>
-            </goals>
-            <configuration>
-              <skip>false</skip>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>

Modified: velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/BrowserTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/BrowserTool.java?rev=1768182&r1=1768181&r2=1768182&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/BrowserTool.java
(original)
+++ velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/BrowserTool.java
Sat Nov  5 10:22:01 2016
@@ -36,19 +36,19 @@ import org.apache.velocity.tools.config.
 import javax.servlet.http.HttpServletRequest;
 
 /**
- *  <p>userAgent.getBrowser()-sniffing tool (session or request scope requested, session
scope advised).</p>
+ *  <p>Browser sniffing tool (session or request scope requested, session scope advised).</p>
  *  <p></p>
  * <p><b>Usage:</b></p>
- * <p>BrowserTool defines properties that are used to test the client userAgent.getBrowser(),
operating system, device, language...</p>
+ * <p>BrowserTool defines properties that are used to test the client browser, operating
system, device, language...</p>
  * <p>All properties are boolean, excpet those in italic which are strings (and major/minor
versions which are integers)</p>
  * <p>The following properties are available:</p>
  * <ul>
  * <li><b>Device: </b><i>device</i> robot mobile tablet desktop
tv</li>
  * <li><b>Features:</b>css3 dom3</li>
- * <li><b>Browser:</b><i>userAgent.getBrowser().name userAgent.getBrowser().majorVersion
userAgent.getBrowser().minorVersion</i></li>
+ * <li><b>Browser:</b><i>browser.name browser.majorVersion browser.minorVersion</i></li>
  * <li><b>Rendering engine: </b><i>renderingEngine.name renderingEngine.minorVersion
renderingEngine.majorVersion</i></li>
  * <li><b>Operating system: </b><i>operatingsystem.name operatingsystem.majorVersion
operatingsystem.minorVersion</i></li>
- * <li><b>Specific userAgent.getBrowser() tests:</b>netscape firefox safari
MSIE opera links mozilla konqueror chrome</li>
+ * <li><b>Specific browser tests:</b>netscape firefox safari MSIE opera
links mozilla konqueror chrome</li>
  * <li><b>Specific rendering engine tests:</b>gecko webKit KHTML trident
blink edgeHTML presto</li>
  * <li><b>Specific OS tests:</b>windows OSX linux unix BSD android iOS
symbian</li>
  * <li><b>Languages</b>: <i>preferredLanguageTag</i> (a string
like 'en', 'da', 'en-US', ...), <i>preferredLocale</i> (a java Locale)</li>
@@ -72,7 +72,7 @@ import javax.servlet.http.HttpServletReq
  * <p>Thanks to Lee Semel (lee@semel.net), the author of the HTTP::BrowserDetect Perl
module.</p>
  * <p>See also:
  * <ul>
- *   <li>http://www.zytrax.com/tech/web/userAgent.getBrowser()_ids.htm</li>
+ *   <li>http://www.zytrax.com/tech/web/browser_ids.htm</li>
  *   <li>http://en.wikipedia.org/wiki/User_agent</li>
  *   <li>http://www.user-agents.org/</li>
  *   <li>https://github.com/OpenDDR</li>
@@ -96,7 +96,7 @@ import javax.servlet.http.HttpServletReq
  * @since VelocityTools 2.0
  * @version $Revision$ $Date$
  */
-@DefaultKey("userAgent.getBrowser()")
+@DefaultKey("browser")
 @InvalidScope(Scope.APPLICATION)
 public class BrowserTool extends BrowserToolDeprecatedMethods implements java.io.Serializable
 {
@@ -348,7 +348,7 @@ public class BrowserTool extends Browser
         return getRenderingEngine() != null && "Presto".equals(getRenderingEngine().getName());
     }
 
-    /* Specific userAgent.getBrowser()s */
+    /* Specific browsers */
 
     public boolean isChrome()
     {



Mime
View raw message