mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 05:22:22 +00:00
Integrated a newer version of htmlunit that performs XHR calls at the correct timing.
This fixes the false positive test failure that I was struggling with since yesterday. git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@28266 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
9adb62aede
commit
ea92d3aa13
3 files changed
+21
-24
No files matched your search
+1
-1
@@ -151,7 +151,7 @@ THE SOFTWARE.
|
||||
<dependency>
|
||||
<groupId>org.jvnet.hudson</groupId>
|
||||
<artifactId>htmlunit</artifactId>
|
||||
<version>2.6-hudson-1</version>
|
||||
<version>2.6-hudson-2</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<!-- hides JDK DOM classes in Eclipse -->
|
||||
|
||||
@@ -1154,11 +1154,10 @@ public abstract class HudsonTestCase extends TestCase implements RootAction {
|
||||
// setJavaScriptEnabled(false);
|
||||
setPageCreator(HudsonPageCreator.INSTANCE);
|
||||
clients.add(new WeakReference<WebClient>(this));
|
||||
// make ajax calls synchronous for predictable behaviors that simplify debugging
|
||||
// make ajax calls run as post-action for predictable behaviors that simplify debugging
|
||||
setAjaxController(new AjaxController() {
|
||||
@Override
|
||||
public boolean processSynchron(HtmlPage page, WebRequestSettings settings, boolean async) {
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -13,25 +13,23 @@ import org.mozilla.javascript.tools.debugger.Dim;
|
||||
* @author Kohsuke Kawaguchi
|
||||
*/
|
||||
public class AntTargetAnnotationTest extends HudsonTestCase {
|
||||
public void testDummy() {}
|
||||
public void test1() throws Exception {
|
||||
FreeStyleProject p = createFreeStyleProject();
|
||||
p.getBuildersList().add(new Ant("foo",null,null,null,null));
|
||||
p.setScm(new SingleFileSCM("build.xml",getClass().getResource("simple-build.xml")));
|
||||
FreeStyleBuild b = buildAndAssertSuccess(p);
|
||||
|
||||
// public void test1() throws Exception {
|
||||
// FreeStyleProject p = createFreeStyleProject();
|
||||
// p.getBuildersList().add(new Ant("foo",null,null,null,null));
|
||||
// p.setScm(new SingleFileSCM("build.xml",getClass().getResource("simple-build.xml")));
|
||||
// FreeStyleBuild b = buildAndAssertSuccess(p);
|
||||
//
|
||||
// AntTargetNote.ENABLED = true;
|
||||
// try {
|
||||
// HudsonTestCase.WebClient wc = createWebClient();
|
||||
// wc.interactiveJavaScriptDebugger();
|
||||
// HtmlPage c = wc.getPage(b, "console");
|
||||
// System.out.println(c.asText());
|
||||
//
|
||||
// HtmlElement o = c.getElementById("console-outline");
|
||||
// assertEquals(2,o.selectNodes("LI").size());
|
||||
// } finally {
|
||||
// AntTargetNote.ENABLED = false;
|
||||
// }
|
||||
// }
|
||||
AntTargetNote.ENABLED = true;
|
||||
try {
|
||||
HudsonTestCase.WebClient wc = createWebClient();
|
||||
wc.interactiveJavaScriptDebugger();
|
||||
HtmlPage c = wc.getPage(b, "console");
|
||||
System.out.println(c.asText());
|
||||
|
||||
HtmlElement o = c.getElementById("console-outline");
|
||||
assertEquals(2,o.selectNodes(".//LI").size());
|
||||
} finally {
|
||||
AntTargetNote.ENABLED = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user