aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Carrasco Moñino <manuel.carrasco.m@gmail.com>2014-02-07 21:18:25 +0100
committerManuel Carrasco Moñino <manuel.carrasco.m@gmail.com>2014-02-07 21:18:25 +0100
commit979d0a2768d089cde853429a7becd36244bacefe (patch)
treef6c020eece3df94b34f6aab4c3798f199ea1a4f0
parentb415e6a811f3e29bc401f94de0dbaf4a53bc597c (diff)
downloadgwtquery-979d0a2768d089cde853429a7becd36244bacefe.tar.gz
gwtquery-979d0a2768d089cde853429a7becd36244bacefe.zip
Dont define ajaxtransport static, so as we can override it in JVM tests
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/ajax/Ajax.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/ajax/Ajax.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/ajax/Ajax.java
index 7b472ba5..e11e5923 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/ajax/Ajax.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/ajax/Ajax.java
@@ -44,8 +44,6 @@ public class Ajax extends GQuery {
Promise getXhr(Settings settings);
}
- static AjaxTransport transport = GQ.getAjaxTransport();
-
/**
* Ajax Settings object
*/
@@ -137,11 +135,11 @@ public class Ajax extends GQuery {
Promise ret = null;
if ("jsonp".equalsIgnoreCase(dataType)) {
- ret = transport.getJsonP(settings);
+ ret = GQ.getAjaxTransport().getJsonP(settings);
} else if ("loadscript".equalsIgnoreCase(dataType)){
- ret = transport.getLoadScript(settings);
+ ret = GQ.getAjaxTransport().getLoadScript(settings);
} else {
- ret = transport.getXhr(settings)
+ ret = GQ.getAjaxTransport().getXhr(settings)
.then(new Function() {
public Object f(Object...args) {
Response response = arguments(0);