Author: lfryc(a)redhat.com
Date: 2010-09-13 07:50:12 -0400 (Mon, 13 Sep 2010)
New Revision: 19164
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/cheiron/halt/XHRHalter.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jStatus/AbstracStatusTest.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataGrid/TestScrollerInTableFooter.java
Log:
fixed checkstyle violations
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/cheiron/halt/XHRHalter.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/cheiron/halt/XHRHalter.java 2010-09-13
03:16:25 UTC (rev 19163)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/cheiron/halt/XHRHalter.java 2010-09-13
11:50:12 UTC (rev 19164)
@@ -33,15 +33,11 @@
* @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
* @version $Revision$
*/
-public class XHRHalter {
+public final class XHRHalter {
- private static JavaScript isHandleAvailable =
js("selenium.browserbot.getCurrentWindow().XHRHalter.isHandleAvailable()");
- private static JavaScript isWaitingForSend =
js("selenium.browserbot.getCurrentWindow().XHRHalter.isWaitingForSend({0})");
- private static JavaScript getHandle =
js("selenium.browserbot.getCurrentWindow().XHRHalter.getHandle()");
- private static JavaScript continueTo =
js("selenium.browserbot.getCurrentWindow().XHRHalter.continueTo({0},
selenium.browserbot.getCurrentWindow().XHRHalter.STATE_{1})");
- private static JavaScript setEnabled =
js("selenium.browserbot.getCurrentWindow().XHRHalter.setEnabled({0})");
+ private static AjaxSelenium selenium = AjaxSeleniumProxy.getInstance();
- private static final AbstractPageExtensions halterExtensions = new
AbstractPageExtensions() {
+ private static final AbstractPageExtensions HALTER_EXTENSIONS = new
AbstractPageExtensions() {
{
loadFromResource("javascript/cheiron/XHRHalter.js");
}
@@ -51,17 +47,21 @@
}
};
+ private static JavaScript isHandleAvailable =
js("selenium.browserbot.getCurrentWindow().XHRHalter.isHandleAvailable()");
+ private static JavaScript isWaitingForSend =
js("selenium.browserbot.getCurrentWindow().XHRHalter.isWaitingForSend({0})");
+ private static JavaScript getHandle =
js("selenium.browserbot.getCurrentWindow().XHRHalter.getHandle()");
+ private static JavaScript continueTo =
js("selenium.browserbot.getCurrentWindow().XHRHalter.continueTo({0},
selenium.browserbot.getCurrentWindow().XHRHalter.STATE_{1})");
+ private static JavaScript setEnabled =
js("selenium.browserbot.getCurrentWindow().XHRHalter.setEnabled({0})");
+
int handle;
private XHRHalter(int handle) {
this.handle = handle;
}
- static AjaxSelenium selenium = AjaxSeleniumProxy.getInstance();
-
public static void enable() {
selenium.getPageExtensions().install();
- halterExtensions.install();
+ HALTER_EXTENSIONS.install();
selenium.getEval(setEnabled.parametrize(true));
}
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java 2010-09-13
03:16:25 UTC (rev 19163)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java 2010-09-13
11:50:12 UTC (rev 19164)
@@ -33,11 +33,9 @@
import org.jboss.test.selenium.locator.ElementLocator;
import org.jboss.test.selenium.locator.JQueryLocator;
import org.jboss.test.selenium.waiting.ajax.JavaScriptCondition;
-import org.richfaces.tests.metamer.Template;
import org.richfaces.tests.metamer.TemplatesList;
import org.richfaces.tests.metamer.ftest.annotations.Inject;
import org.richfaces.tests.metamer.ftest.annotations.Templates;
-import org.testng.ITestResult;
import org.testng.SkipException;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jStatus/AbstracStatusTest.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jStatus/AbstracStatusTest.java 2010-09-13
03:16:25 UTC (rev 19163)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jStatus/AbstracStatusTest.java 2010-09-13
11:50:12 UTC (rev 19164)
@@ -28,7 +28,6 @@
import org.jboss.test.selenium.locator.JQueryLocator;
import org.jboss.test.selenium.waiting.retrievers.TextRetriever;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
-import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
/**
@@ -66,8 +65,9 @@
selenium.click(button);
XHRHalter halt = getCurrentXHRHalter();
assertEquals(retrieveStatus.retrieve(), startStatusText);
+ retrieveStatus.initializeValue();
halt.complete();
- waitAjax.waitForChange(startStatusText, retrieveStatus);
+ waitAjax.waitForChange(retrieveStatus);
assertEquals(retrieveStatus.retrieve(), stopStatusText);
XHRHalter.disable();
}
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataGrid/TestScrollerInTableFooter.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataGrid/TestScrollerInTableFooter.java 2010-09-13
03:16:25 UTC (rev 19163)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataGrid/TestScrollerInTableFooter.java 2010-09-13
11:50:12 UTC (rev 19164)
@@ -23,7 +23,6 @@
import javax.xml.bind.JAXBException;
-import org.richfaces.tests.metamer.ftest.annotations.Templates;
import org.richfaces.tests.metamer.ftest.annotations.Use;
import org.testng.annotations.Test;
Show replies by date