EMBJOPR SVN: r836 - in trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util: hmlunit and 1 other directory.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-11-04 21:25:22 -0500 (Wed, 04 Nov 2009)
New Revision: 836
Added:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/hmlunit/
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/hmlunit/HtmlPageBumper.java
Log:
* Introducing HtmlPageBumper - to have a single point of HTMLUnit's incompatible changes friction point.
Note: Previous commit (RootNodeTest) was still compatible with HTMLUnit 2.3.
Added: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/hmlunit/HtmlPageBumper.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/hmlunit/HtmlPageBumper.java (rev 0)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/hmlunit/HtmlPageBumper.java 2009-11-05 02:25:22 UTC (rev 836)
@@ -0,0 +1,59 @@
+
+package org.jboss.jopr.jsfunit.util.hmlunit;
+
+import com.gargoylesoftware.htmlunit.ElementNotFoundException;
+import com.gargoylesoftware.htmlunit.WebResponse;
+import com.gargoylesoftware.htmlunit.WebWindow;
+import com.gargoylesoftware.htmlunit.html.HtmlElement;
+import com.gargoylesoftware.htmlunit.html.HtmlPage;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.List;
+import org.jboss.logging.Logger;
+
+/**
+ *
+ * @author Ondrej Zizka
+ */
+public class HtmlPageBumper extends HtmlPage {
+
+ public HtmlPageBumper(HtmlPage page) {
+ super( safeURL(page.getDocumentURI()), page.getWebResponse(), page.getEnclosingWindow());
+ }
+
+
+ public HtmlPageBumper(URL originatingUrl, WebResponse webResponse, WebWindow webWindow) {
+ super(originatingUrl, webResponse, webWindow);
+ }
+
+ @Override
+ public HtmlElement getHtmlElementById(String elementId) {
+ return super.getElementById(elementId);
+ }
+
+ public <E extends HtmlElement> E getHtmlElementByName(String name) throws ElementNotFoundException {
+ return super.getElementByName(name);
+ }
+
+ public List<HtmlElement> getHtmlElementsByName(String name) {
+ return super.getElementsByName(name);
+ }
+
+
+
+
+
+
+
+ private static URL safeURL( String url ){
+ try {
+ return new URL(url);
+ } catch (MalformedURLException ex) {
+ Logger.getLogger(HtmlPageBumper.class.getName()).error("Original page has invalid URL: "+url);
+ return null;
+ }
+ }
+
+
+}// class
+
15 years, 1 month
EMBJOPR SVN: r835 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-11-04 21:18:28 -0500 (Wed, 04 Nov 2009)
New Revision: 835
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/RootNodeTest.java
Log:
* RootNodeTest refactored - original pre-EJTT code dumped, EJTT used instead.
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/RootNodeTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/RootNodeTest.java 2009-11-05 01:33:44 UTC (rev 834)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/RootNodeTest.java 2009-11-05 02:18:28 UTC (rev 835)
@@ -1,17 +1,16 @@
package org.jboss.jopr.jsfunit.as5;
import org.jboss.jopr.jsfunit.exceptions.HtmlElementNotFoundException;
-import org.jboss.jopr.jsfunit.exceptions.ActionOutOfSyncException;
import com.gargoylesoftware.htmlunit.html.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.InetAddress;
-import java.net.URL;
import java.net.UnknownHostException;
import org.jboss.jopr.jsfunit.exceptions.EmbJoprTestException;
import org.jboss.jopr.jsfunit.EmbjoprTestCase;
+import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.TabContentBox;
/**
@@ -28,10 +27,10 @@
try{
- new NavTree().clickRootNode();
+ ejtt.navTree.clickRootNode();
//if( !tabMenu.isTabActive("Summary")) // we can click either
- tabMenu.clickTab("Summary");
+ ejtt.tabMenu.clickTab("Summary");
//HtmlElement box = tabMenu.getTabContentBox().getElement();
@@ -92,15 +91,15 @@
try{
- navTree.clickRootNode();
+ ejtt.navTree.clickRootNode();
- if( tabMenu.isTabDisabled("Control") )
+ if( ejtt.tabMenu.isTabDisabled("Control") )
fail("Root (server) node's Control tab is disabled.");
- tabMenu.clickTab("Control");
- TabContentBox box = tabMenu.getTabContentBox();
+ ejtt.tabMenu.clickTab("Control");
+ TabContentBox box = ejtt.tabMenu.getTabContentBox();
- HtmlButtonInput button = box.getButtonByLabel("Manual Autodiscovery");
+ HtmlButtonInput button = box.getButtonInputByLabel("Manual Autodiscovery");
button.click();
// TODO: check the result.
@@ -124,15 +123,15 @@
try{
- navTree.clickRootNode();
+ ejtt.navTree.clickRootNode();
- if( tabMenu.isTabDisabled("Control") )
+ if( ejtt.tabMenu.isTabDisabled("Control") )
fail("Root (server) node's Control tab is disabled.");
- tabMenu.clickTab("Control");
- TabContentBox box = tabMenu.getTabContentBox();
+ ejtt.tabMenu.clickTab("Control");
+ TabContentBox box = ejtt.tabMenu.getTabContentBox();
- HtmlButtonInput button = box.getButtonByLabel("View Process List");
+ HtmlButtonInput button = box.getButtonInputByLabel("View Process List");
button.click();
// TODO: check the result.
@@ -168,7 +167,7 @@
*/
private String getSummaryValue(String name) throws EmbJoprTestException{
- HtmlElement box = tabMenu.getTabContentBox().getElement();
+ HtmlElement box = ejtt.tabMenu.getTabContentBox().getElement();
String xPath = "//td//strong[contains(string(), '"+name+":')]/ancestor::td[1]";
HtmlElement tableCell = (HtmlElement) box.getFirstByXPath(xPath);
if( null == tableCell )
@@ -222,162 +221,4 @@
-
-
-
-
-
- // TODO: Move to EmbJopr base class? Or make some order there?
-
-
- private NavTree navTree = new NavTree();
-
- /**
- * Inner class to encapsulate navigation tree operations.
- */
- class NavTree {
-
- private void clickRootNode() throws IOException, EmbJoprTestException {
- DomElement element = (DomElement)client.getElement("navTreeForm");
- if( null == element )
- throw new HtmlElementNotFoundException("Can't find #navTreeForm.");
-
- // ID changes upon core build?
- //HtmlAnchor rootNodeLink = element.getFirstByXPath("//a[@id='navTreeForm:navTree:2::homeLink']");
-
- // javax.xml.transform.TransformerException: Can't find function: matches
- //HtmlAnchor rootNodeLink = element.getFirstByXPath(
- // "//a[matches(@id,'^navTreeForm:navTree:.+::homeLink$')]");
-
-
- String xPath = "//a[ starts-with( @id, 'navTreeForm:navTree:' ) " +
- " and contains( @id, '::homeLink' ) ]"; // XPath 2.0: ends-with( @id, '::homeLink' )
- HtmlAnchor rootNodeLink = element.getFirstByXPath(xPath);
-
- if( null == rootNodeLink )
- throw new HtmlElementNotFoundException("Root node not found using XPath: "+xPath);
-
- rootNodeLink.click();
- }
-
- }
-
-
-
-
-
- private final TabMenu tabMenu = new TabMenu();
-
- /**
- * Inner class to encapsulate tab menu operations.
- */
- class TabMenu {
-
- public TabContentBox getTabContentBox() throws EmbJoprTestException {
-
- HtmlElement contentElement = (HtmlElement) client.getElement("content");
- HtmlElement tabContentBox = (HtmlElement) contentElement.getFirstByXPath("div[@class='tabmenubox']");
- if( null == tabContentBox )
- throw new EmbJoprTestException("Tab content box not found using div[@class='tabmenubox'] XPath");
-
- return new TabContentBox(tabContentBox);
- }
-
- public StyledElement getTab( String label ) throws EmbJoprTestException {
-
- DomElement element = (DomElement)client.getElement("tabmenu");
- String xPath = "ul/li/span[normalize-space(string())='"+label+"'] | ul/li/a[normalize-space(string())='"+label+"']";
- StyledElement tabContent = element.getFirstByXPath(xPath);
-
- if( null == tabContent )
- throw new EmbJoprTestException("Tab '"+label+" not found using XPath '"+xPath+"'");
-
- return tabContent;
-
- }
-
- public boolean isTabActive( String label ) throws IOException, EmbJoprTestException {
-
- StyledElement tabContent = getTab(label);
- return "span".equals( tabContent.getTagName() )
- && tabContent.getClassAttribute().contains("active");
- }
-
-
- public boolean isTabDisabled( String label ) throws EmbJoprTestException {
- StyledElement tabContent = getTab(label);
- return "span".equals( tabContent.getTagName() )
- && tabContent.getClassAttribute().contains("disabled");
- }
-
- public void clickTab( String label ) throws IOException, EmbJoprTestException {
-
- StyledElement tabContent = getTab(label);
-
- //if( !"a".equals( tabContent.getTagName() ) )
- //if( !( tabContent instanceof HtmlAnchor ) )
- // throw new AssertException("Tab is not an anchor: "+label);
-
- if( !( tabContent instanceof ClickableElement ) )
- throw new EmbJoprTestException("Tab element <"+tabContent.getTagName()+"> is not clickable: "+label);
-
- ((ClickableElement)tabContent).click();
-
- }
-
- }
-
-
- /**
- * Inner class for manipulation with tab content box.
- */
- class TabContentBox {
-
- private HtmlElement box;
- private URL validForURL;
- private String validForDate;
-
- public HtmlElement getElement() { return box; }
-
-
-
- public TabContentBox(HtmlElement box) {
- this.box = box;
-
- // TODO: Check whether the page changed;
- this.validForDate = client.getContentPage().getWebResponse().getResponseHeaderValue("Date");
- this.validForURL = client.getContentPage().getWebResponse().getUrl();
- }
-
-
- public void checkIfStillValid() throws ActionOutOfSyncException {
-
- String validForDate = client.getContentPage().getWebResponse().getResponseHeaderValue("Date");
- URL validForURL = client.getContentPage().getWebResponse().getUrl();
-
- if( !validForDate.equals(this.validForDate) ||
- !validForURL.equals(this.validForURL) )
- {
- throw new ActionOutOfSyncException(
- "This tab content box was created from another page and is not valid now.");
- }
- }
-
- public HtmlButtonInput getButtonByLabel( String label )
- throws HtmlElementNotFoundException, ActionOutOfSyncException {
-
- checkIfStillValid();
-
- HtmlButtonInput button = this.box.getFirstByXPath("//input[@value='"+label+"']");
- if( null == button )
- throw new HtmlElementNotFoundException("Button labelled '"+label+"' not found.");
-
- return button;
-
- }
-
- }
-
-
-
}
15 years, 1 month
EMBJOPR SVN: r834 - tags.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-11-04 20:33:44 -0500 (Wed, 04 Nov 2009)
New Revision: 834
Added:
tags/EmbJopr_TS-r825-HTMLUnit_2_3/
Log:
Tagging EmbJopr TS before attempt to use HTMLUnit 2.6, which has an incompatible API.
Copied: tags/EmbJopr_TS-r825-HTMLUnit_2_3 (from rev 833, trunk)
15 years, 1 month
EMBJOPR SVN: r833 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-11-04 19:33:32 -0500 (Wed, 04 Nov 2009)
New Revision: 833
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java
Log:
* EmbJoprTestCase: minor updates (logging, htmlunit.browser prop val lower-cased)
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java 2009-11-04 23:31:32 UTC (rev 832)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java 2009-11-05 00:33:32 UTC (rev 833)
@@ -121,9 +121,8 @@
log.info("Java home: " +System.getProperty("java.home"));
// JBoss AS version
- String version = Package.getPackage("org.jboss.system.server")
- .getImplementationVersion();
- log.info("Detected AS version: " + version);
+ String version = Package.getPackage("org.jboss.system.server").getImplementationVersion();
+ log.info("Detected AS version: " + version + " // Package.getPackage(\"org.jboss.system.server\").getImplementationVersion();");
isJBoss4 = version.startsWith("4");
@@ -131,7 +130,8 @@
BrowserVersion browserVersion = BrowserVersion.FIREFOX_3;
- String browserProp = System.getProperty("htmlunit.browser");
+ String browserProp = System.getProperty("htmlunit.browser", "ff3").toLowerCase();
+
if( "ff3".equals(browserProp) || "firefox3".equals(browserProp) ){
browserVersion = BrowserVersion.FIREFOX_3;
}else
@@ -163,15 +163,18 @@
wcSpec.setInitialRequestStrategy(new JoprLoginStrategy( this.getLoginUser(), this.getLoginPass())); // logs in
this.webClient = wcSpec.getWebClient();
-
+
JSFSession jsfSession = new JSFSession(wcSpec);
this.client = jsfSession.getJSFClientSession();
- this.server = jsfSession.getJSFServerSession();
+ this.server = jsfSession.getJSFServerSession();
this.ejtt = new EmbJoprTestToolkit(client, server);
this.ejtt.setCurrentTest(this);
}
+
+
+ /** Tear down: Close all windows, clear cache, cookies. */
@Override
protected void tearDown() throws Exception {
15 years, 1 month
EMBJOPR SVN: r832 - trunk/jsfunit.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-11-04 18:31:32 -0500 (Wed, 04 Nov 2009)
New Revision: 832
Modified:
trunk/jsfunit/pom.xml
Log:
* POM: Fixed the excludes of <resources>: * --> **/*
* POM: Version conflicts fixed in dependencyManagement:
org.jboss:jboss-common-core:2.2.14.GA
sun-jaxb:jaxb-api:2.1.9
* POM: <mavenConflictResolvers>newest,nearest</mavenConflictResolvers>
Modified: trunk/jsfunit/pom.xml
===================================================================
--- trunk/jsfunit/pom.xml 2009-11-04 04:19:03 UTC (rev 831)
+++ trunk/jsfunit/pom.xml 2009-11-04 23:31:32 UTC (rev 832)
@@ -5,6 +5,9 @@
<modelVersion>4.0.0</modelVersion>
<properties>
+ <!-- Does not work in Maven 2.2.1 -->
+ <mavenConflictResolvers>newest,nearest</mavenConflictResolvers>
+
<jopr.version>1.2.0-SNAPSHOT</jopr.version>
<cargo.plugin.version>1.0.1-SNAPSHOT</cargo.plugin.version>
<jvm.args.debug></jvm.args.debug> <!-- Used by the -Pdebug profile. -->
@@ -68,6 +71,20 @@
</pluginRepositories>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-common-core</artifactId>
+ <version>2.2.14.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>sun-jaxb</groupId>
+ <artifactId>jaxb-api</artifactId>
+ <version>2.1.9</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
<dependencies>
@@ -811,7 +828,7 @@
<resources>
<resource>
<directory>${basedir}/testdata</directory>
- <excludes><exclude>*</exclude></excludes>
+ <excludes><exclude>**/*</exclude></excludes>
</resource>
</resources>
15 years, 1 month
EMBJOPR SVN: r831 - in trunk/core/src/main/webapp: js and 1 other directory.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-11-03 23:19:03 -0500 (Tue, 03 Nov 2009)
New Revision: 831
Added:
trunk/core/src/main/webapp/js/window-part.js
Modified:
trunk/core/src/main/webapp/WEB-INF/facelets/layout.xhtml
Log:
"WindowsUtilities not defined" JavaScript error fixed. (part of JBQA-2775)
Modified: trunk/core/src/main/webapp/WEB-INF/facelets/layout.xhtml
===================================================================
--- trunk/core/src/main/webapp/WEB-INF/facelets/layout.xhtml 2009-11-04 00:23:13 UTC (rev 830)
+++ trunk/core/src/main/webapp/WEB-INF/facelets/layout.xhtml 2009-11-04 04:19:03 UTC (rev 831)
@@ -46,6 +46,7 @@
<link rel="icon" type="image/png" href="images/favicon.png"/>
<link rel="apple-touch-icon" href="images/favicon.png"/>
+ <script type="text/javascript" src="js/window-part.js"></script>
<script type="text/javascript" src="js/embedded.js"></script>
<!--[if lt IE 7]>
Added: trunk/core/src/main/webapp/js/window-part.js
===================================================================
--- trunk/core/src/main/webapp/js/window-part.js (rev 0)
+++ trunk/core/src/main/webapp/js/window-part.js 2009-11-04 04:19:03 UTC (rev 831)
@@ -0,0 +1,270 @@
+/*
+ * This file is a copy of RHQ's window.js - see
+ * http://svn.rhq-project.org/repos/rhq/trunk/modules/enterprise/gui/portal-...
+ *
+ * Temporary solution for MyFaces.
+ */
+
+
+var WindowUtilities = {
+ // From dragdrop.js
+ getWindowScroll: function(parent) {
+ var T, L, W, H;
+ parent = parent || document.body;
+ if (parent != document.body) {
+ T = parent.scrollTop;
+ L = parent.scrollLeft;
+ W = parent.scrollWidth;
+ H = parent.scrollHeight;
+ }
+ else {
+ var w = window;
+ with (w.document) {
+ if (w.document.documentElement && documentElement.scrollTop) {
+ T = documentElement.scrollTop;
+ L = documentElement.scrollLeft;
+ } else if (w.document.body) {
+ T = body.scrollTop;
+ L = body.scrollLeft;
+ }
+ if (w.innerWidth) {
+ W = w.innerWidth;
+ H = w.innerHeight;
+ } else if (w.document.documentElement && documentElement.clientWidth) {
+ W = documentElement.clientWidth;
+ H = documentElement.clientHeight;
+ } else {
+ W = body.offsetWidth;
+ H = body.offsetHeight
+ }
+ }
+ }
+ return { top: T, left: L, width: W, height: H };
+ },
+ //
+ // getPageSize()
+ // Returns array with page width, height and window width, height
+ // Core code from - quirksmode.org
+ // Edit for Firefox by pHaez
+ //
+ getPageSize: function(parent){
+ parent = parent || document.body;
+ var windowWidth, windowHeight;
+ var pageHeight, pageWidth;
+ if (parent != document.body) {
+ windowWidth = parent.getWidth();
+ windowHeight = parent.getHeight();
+ pageWidth = parent.scrollWidth;
+ pageHeight = parent.scrollHeight;
+ }
+ else {
+ var xScroll, yScroll;
+
+ if (window.innerHeight && window.scrollMaxY) {
+ xScroll = document.body.scrollWidth;
+ yScroll = window.innerHeight + window.scrollMaxY;
+ } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
+ xScroll = document.body.scrollWidth;
+ yScroll = document.body.scrollHeight;
+ } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
+ xScroll = document.body.offsetWidth;
+ yScroll = document.body.offsetHeight;
+ }
+
+
+ if (self.innerHeight) { // all except Explorer
+ windowWidth = self.innerWidth;
+ windowHeight = self.innerHeight;
+ } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
+ windowWidth = document.documentElement.clientWidth;
+ windowHeight = document.documentElement.clientHeight;
+ } else if (document.body) { // other Explorers
+ windowWidth = document.body.clientWidth;
+ windowHeight = document.body.clientHeight;
+ }
+
+ // for small pages with total height less then height of the viewport
+ if(yScroll < windowHeight){
+ pageHeight = windowHeight;
+ } else {
+ pageHeight = yScroll;
+ }
+
+ // for small pages with total width less then width of the viewport
+ if(xScroll < windowWidth){
+ pageWidth = windowWidth;
+ } else {
+ pageWidth = xScroll;
+ }
+ }
+ return {pageWidth: pageWidth ,pageHeight: pageHeight , windowWidth: windowWidth, windowHeight: windowHeight};
+ },
+
+ disableScreen: function(className, overlayId, overlayOpacity, contentId, parent) {
+ WindowUtilities.initLightbox(overlayId, className, function() {this._disableScreen(className, overlayId, overlayOpacity, contentId)}.bind(this), parent || document.body);
+ },
+
+ _disableScreen: function(className, overlayId, overlayOpacity, contentId) {
+ // prep objects
+ var objOverlay = $(overlayId);
+
+ var pageSize = WindowUtilities.getPageSize(objOverlay.parentNode);
+
+ // Hide select boxes as they will 'peek' through the image in IE, store old value
+ if (contentId && Prototype.Browser.IE) {
+ WindowUtilities._hideSelect();
+ WindowUtilities._showSelect(contentId);
+ }
+
+ // set height of Overlay to take up whole page and show
+ objOverlay.style.height = (pageSize.pageHeight + 'px');
+ objOverlay.style.display = 'none';
+ if (overlayId == "overlay_modal" && Window.hasEffectLib && Windows.overlayShowEffectOptions) {
+ objOverlay.overlayOpacity = overlayOpacity;
+ new Effect.Appear(objOverlay, Object.extend({from: 0, to: overlayOpacity}, Windows.overlayShowEffectOptions));
+ }
+ else
+ objOverlay.style.display = "block";
+ },
+
+ enableScreen: function(id) {
+ id = id || 'overlay_modal';
+ var objOverlay = $(id);
+ if (objOverlay) {
+ // hide lightbox and overlay
+ if (id == "overlay_modal" && Window.hasEffectLib && Windows.overlayHideEffectOptions)
+ new Effect.Fade(objOverlay, Object.extend({from: objOverlay.overlayOpacity, to:0}, Windows.overlayHideEffectOptions));
+ else {
+ objOverlay.style.display = 'none';
+ objOverlay.parentNode.removeChild(objOverlay);
+ }
+
+ // make select boxes visible using old value
+ if (id != "__invisible__")
+ WindowUtilities._showSelect();
+ }
+ },
+
+ _hideSelect: function(id) {
+ if (Prototype.Browser.IE) {
+ id = id == null ? "" : "#" + id + " ";
+ $$(id + 'select').each(function(element) {
+ if (! WindowUtilities.isDefined(element.oldVisibility)) {
+ element.oldVisibility = element.style.visibility ? element.style.visibility : "visible";
+ element.style.visibility = "hidden";
+ }
+ });
+ }
+ },
+
+ _showSelect: function(id) {
+ if (Prototype.Browser.IE) {
+ id = id == null ? "" : "#" + id + " ";
+ $$(id + 'select').each(function(element) {
+ if (WindowUtilities.isDefined(element.oldVisibility)) {
+ // Why?? Ask IE
+ try {
+ element.style.visibility = element.oldVisibility;
+ } catch(e) {
+ element.style.visibility = "visible";
+ }
+ element.oldVisibility = null;
+ }
+ else {
+ if (element.style.visibility)
+ element.style.visibility = "visible";
+ }
+ });
+ }
+ },
+
+ isDefined: function(object) {
+ return typeof(object) != "undefined" && object != null;
+ },
+
+ // initLightbox()
+ // Function runs on window load, going through link tags looking for rel="lightbox".
+ // These links receive onclick events that enable the lightbox display for their targets.
+ // The function also inserts html markup at the top of the page which will be used as a
+ // container for the overlay pattern and the inline image.
+ initLightbox: function(id, className, doneHandler, parent) {
+ // Already done, just update zIndex
+ if ($(id)) {
+ Element.setStyle(id, {zIndex: Windows.maxZIndex + 1});
+ Windows.maxZIndex++;
+ doneHandler();
+ }
+ // create overlay div and hardcode some functional styles (aesthetic styles are in CSS file)
+ else {
+ var objOverlay = document.createElement("div");
+ objOverlay.setAttribute('id', id);
+ objOverlay.className = "overlay_" + className
+ objOverlay.style.display = 'none';
+ objOverlay.style.position = 'absolute';
+ objOverlay.style.top = '0';
+ objOverlay.style.left = '0';
+ objOverlay.style.zIndex = Windows.maxZIndex + 1;
+ Windows.maxZIndex++;
+ objOverlay.style.width = '100%';
+ parent.insertBefore(objOverlay, parent.firstChild);
+ if (Prototype.Browser.WebKit && id == "overlay_modal") {
+ setTimeout(function() {doneHandler()}, 10);
+ }
+ else
+ doneHandler();
+ }
+ },
+
+ setCookie: function(value, parameters) {
+ document.cookie= parameters[0] + "=" + escape(value) +
+ ((parameters[1]) ? "; expires=" + parameters[1].toGMTString() : "") +
+ ((parameters[2]) ? "; path=" + parameters[2] : "") +
+ ((parameters[3]) ? "; domain=" + parameters[3] : "") +
+ ((parameters[4]) ? "; secure" : "");
+ },
+
+ getCookie: function(name) {
+ var dc = document.cookie;
+ var prefix = name + "=";
+ var begin = dc.indexOf("; " + prefix);
+ if (begin == -1) {
+ begin = dc.indexOf(prefix);
+ if (begin != 0) return null;
+ } else {
+ begin += 2;
+ }
+ var end = document.cookie.indexOf(";", begin);
+ if (end == -1) {
+ end = dc.length;
+ }
+ return unescape(dc.substring(begin + prefix.length, end));
+ },
+
+ _computeSize: function(content, id, width, height, margin, className) {
+ var objBody = document.body;
+ var tmpObj = document.createElement("div");
+ tmpObj.setAttribute('id', id);
+ tmpObj.className = className + "_content";
+
+ if (height)
+ tmpObj.style.height = height + "px"
+ else
+ tmpObj.style.width = width + "px"
+
+ tmpObj.style.position = 'absolute';
+ tmpObj.style.top = '0';
+ tmpObj.style.left = '0';
+ tmpObj.style.display = 'none';
+
+ tmpObj.innerHTML = content;
+ objBody.insertBefore(tmpObj, objBody.firstChild);
+
+ var size;
+ if (height)
+ size = $(tmpObj).getDimensions().width + margin;
+ else
+ size = $(tmpObj).getDimensions().height + margin;
+ objBody.removeChild(tmpObj);
+ return size;
+ }
+}
15 years, 1 month
EMBJOPR SVN: r830 - trunk/jsfunit.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-11-03 19:23:13 -0500 (Tue, 03 Nov 2009)
New Revision: 830
Modified:
trunk/jsfunit/pom.xml
Log:
* POM: Added some metadata (CI, JIRA, testdata dir)
Modified: trunk/jsfunit/pom.xml
===================================================================
--- trunk/jsfunit/pom.xml 2009-11-02 22:43:44 UTC (rev 829)
+++ trunk/jsfunit/pom.xml 2009-11-04 00:23:13 UTC (rev 830)
@@ -31,6 +31,17 @@
<packaging>war</packaging>
<name>JSFUnit Tests for Embedded Admin Console</name>
+ <ciManagement>
+ <system>hudson</system>
+ <url>http://hudson.qa.jboss.com/hudson/view/EmbJopr/job/JBoss-EAP-head-EmbJopr...</url>
+ </ciManagement>
+
+ <issueManagement>
+ <system>jira</system>
+ <url>https://jira.jboss.org/jira/browse/JBQA</url>
+ </issueManagement>
+
+
<repositories>
<repository>
<id>jboss</id>
@@ -56,6 +67,8 @@
</pluginRepository>
</pluginRepositories>
+
+
<dependencies>
<!-- Test cases deps. -->
@@ -789,9 +802,20 @@
<build>
+ <finalName>admin-console-jsfunit</finalName>
+
<sourceDirectory>src/test/java</sourceDirectory>
<testSourceDirectory>src/test/java</testSourceDirectory>
- <finalName>admin-console-jsfunit</finalName>
+
+ <!-- To add the dir to IDEs nav tree. -->
+ <resources>
+ <resource>
+ <directory>${basedir}/testdata</directory>
+ <excludes><exclude>*</exclude></excludes>
+ </resource>
+ </resources>
+
+
<plugins>
<!-- WAR -->
15 years, 1 month
EMBJOPR SVN: r829 - branches/EmbJopr_1_3_3_MyFaces/jbas5.
by embjopr-commits@lists.jboss.org
Author: smcgowan(a)redhat.com
Date: 2009-11-02 17:43:44 -0500 (Mon, 02 Nov 2009)
New Revision: 829
Modified:
branches/EmbJopr_1_3_3_MyFaces/jbas5/pom.xml
Log:
EMBJOPR-259 - change product name to JBoss AS for community release
Modified: branches/EmbJopr_1_3_3_MyFaces/jbas5/pom.xml
===================================================================
--- branches/EmbJopr_1_3_3_MyFaces/jbas5/pom.xml 2009-11-02 19:45:22 UTC (rev 828)
+++ branches/EmbJopr_1_3_3_MyFaces/jbas5/pom.xml 2009-11-02 22:43:44 UTC (rev 829)
@@ -22,7 +22,7 @@
<warDir>${basedir}/target/${project.build.finalName}</warDir>
<warFile>${warDir}.war</warFile>
<contextRoot>admin-console</contextRoot>
- <product.name>JBoss EAP Admin Console</product.name>
+ <product.name>JBoss AS Admin Console</product.name>
</properties>
<dependencies>
15 years, 1 month
EMBJOPR SVN: r828 - branches/EmbJopr_1_3_3_MyFaces/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jbcache.
by embjopr-commits@lists.jboss.org
Author: smcgowan(a)redhat.com
Date: 2009-11-02 14:45:22 -0500 (Mon, 02 Nov 2009)
New Revision: 828
Modified:
branches/EmbJopr_1_3_3_MyFaces/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jbcache/JBossCacheTestBase.java
Log:
adjust JBossCache labels
Modified: branches/EmbJopr_1_3_3_MyFaces/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jbcache/JBossCacheTestBase.java
===================================================================
--- branches/EmbJopr_1_3_3_MyFaces/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jbcache/JBossCacheTestBase.java 2009-10-30 03:21:35 UTC (rev 827)
+++ branches/EmbJopr_1_3_3_MyFaces/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jbcache/JBossCacheTestBase.java 2009-11-02 19:45:22 UTC (rev 828)
@@ -18,12 +18,18 @@
// Cache which is active by default.
- protected static final String JBCACHE_HA_PARTITION = "jboss.cache:config=ha-partition,service=Cache";
- protected static final String JBCACHE_MVCC_ENTITY = "jboss.cache:config=mvcc-entity,service=Cache";
- protected static final String JBCACHE_PESSIMISTIC_SHARED = "jboss.cache:config=pessimistic-shared,service=Cache";
- protected static final String JBCACHE_TIMESTAMPS = "jboss.cache:config=timestamps-cache,service=Cache";
+ //protected static final String JBCACHE_HA_PARTITION = "jboss.cache:config=ha-partition,service=Cache";
+ //protected static final String JBCACHE_MVCC_ENTITY = "jboss.cache:config=mvcc-entity,service=Cache";
+ //protected static final String JBCACHE_PESSIMISTIC_SHARED = "jboss.cache:config=pessimistic-shared,service=Cache";
+ //protected static final String JBCACHE_TIMESTAMPS = "jboss.cache:config=timestamps-cache,service=Cache";
+ // Post-CR3
+ protected static final String JBCACHE_HA_PARTITION = "ha-partition";
+ protected static final String JBCACHE_MVCC_ENTITY = "mvcc-entity";
+ protected static final String JBCACHE_PESSIMISTIC_SHARED = "pessimistic-shared";
+ protected static final String JBCACHE_TIMESTAMPS = "timestamps-cache";
+
// Subnodes
protected static final String SUBNODE_CACHE = "Cache";
protected static final String SUBNODE_INTERCEPTOR = "Interceptor";
15 years, 1 month