From 42daa3f0aca9bf91363f9aa29ee1596475d226fe Mon Sep 17 00:00:00 2001 From: =?utf8?q?Manuel=20Carrasco=20Mo=C3=B1ino?= Date: Mon, 4 Mar 2013 14:29:08 +0100 Subject: [PATCH] undoing changes in DevTestRunner used while developing Deferred, and should not be committed --- .../gwt/query/client/DevTestRunner.java | 88 ------------------- 1 file changed, 88 deletions(-) diff --git a/devtest/src/main/java/com/google/gwt/query/client/DevTestRunner.java b/devtest/src/main/java/com/google/gwt/query/client/DevTestRunner.java index 18de0c87..46a4df38 100644 --- a/devtest/src/main/java/com/google/gwt/query/client/DevTestRunner.java +++ b/devtest/src/main/java/com/google/gwt/query/client/DevTestRunner.java @@ -22,9 +22,6 @@ import com.google.gwt.core.client.EntryPoint; import com.google.gwt.core.client.Scheduler; import com.google.gwt.core.client.Scheduler.RepeatingCommand; import com.google.gwt.query.client.js.JsUtils; -import com.google.gwt.query.client.plugins.ajax.Ajax; -import com.google.gwt.query.client.plugins.ajax.Ajax.Settings; -import com.google.gwt.user.client.Window; /** * This module is thought to emulate a test environment similar to @@ -50,91 +47,6 @@ public class DevTestRunner extends MyTestCase implements EntryPoint { } public void testSomething() { - System.out.println("com"); - - delayTestFinish(5000); - String nonJsonpUrl = "http://127.0.0.1/nopage"; - - Settings s = Ajax.createSettings(); - s.setTimeout(1000); - s.setSuccess(new Function(){ - public void f() { - fail(); - } - }); - s.setError(new Function(){ - public void f() { - finishTest(); - } - }); - s.setDataType("jsonp"); - s.setUrl(nonJsonpUrl); - - Ajax.ajax(s); - -// GQuery.ajax(Ajax.createSettings() -// .setUrl("test.html") -// .setDataType("txt") // txt, json, jsonp, xml -// .setType("get") // post, get -// .setData(GQuery.$$("param1: 1, param2: 2")) // parameters for the query-string -// .setTimeout(3000) -// .setSuccess(new Function(){ // callback to be run if the request success -// public void f() { -// // The response when dataType=xml, is a dom tree which we can traverse using gquery -// Window.alert("ok"); -// } -// }) -//// .setError(new Function(){ // callback to be run if the request fails -//// public void f() { -//// Window.alert("There was an error" + getDataObject()); -//// } -//// }) -// ).done(new Function(){ -// public void f() { -// System.out.println("Aqui"); -// } -// }, new Function(){ -// public void f() { -// System.out.println("Aqui2"); -// } -// } -// ); -// - - -// Settings set = Ajax.createSettings(); -// -// $(window).delay(1000, new Function(){ -// public void f() { -// System.out.println("Run 1"); -// } -// }); -// $(window).delay(3000, new Function(){ -// public void f() { -// System.out.println("Run 3"); -// } -// }); - } - - - private native void setWindowVars() /*-{ - $wnd._boolean = true; - $wnd._number = 0.56; - $wnd._string = "string"; - $wnd._element = $doc.body; - $wnd._object = $wnd.console; - }-*/; - - public void testSomething2() { - setWindowVars(); - System.out.println($(window).prop("_boolean")); - System.out.println($(window).propString("_string")); - System.out.println($(window).propDouble("_number")); - System.out.println($(window).propObject("_boolean")); - System.out.println($(window).propJSO("_element")); - Object o = window.getPropertyObject("_element"); - System.out.println(o); - // Copy and paste any test from the gquery suite } /** -- 2.39.5