Hello Miguel,
Would you mind reviewing the attached patch? It only changes comments
and formatting.
The API suffered through a long bout of build breakage. While
debugging it, I ran across some comments that were not at all clear in
the Maps Test.
relative to releases/maps/1.0 branch in subversion:
maps/test/com/google/gwt/maps/client/MapWidgetEventsTest.java
Thanks,
-Eric.
--
Eric Z. Ayers - GWT Team - Atlanta, GA USA
http://code.google.com/webtoolkit/
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---
Index: maps/test/com/google/gwt/maps/client/MapWidgetEventsTest.java
===================================================================
--- maps/test/com/google/gwt/maps/client/MapWidgetEventsTest.java (revision 908)
+++ maps/test/com/google/gwt/maps/client/MapWidgetEventsTest.java (working copy)
@@ -90,9 +90,9 @@
/**
* Runs before every test method.
*/
- public void gwtSetUp() {
- TestUtilities.cleanDom();
- }
+ public void gwtSetUp() {
+ TestUtilities.cleanDom();
+ }
public void testInfoWindowBeforeCloseEvent() {
final MapWidget m = new MapWidget();
@@ -358,7 +358,8 @@
});
RootPanel.get().add(m);
Marker marker = new Marker(LatLng.newInstance(12.34, -22.2));
- MapClickEvent e = new MapClickEvent(m, marker, LatLng.newInstance(10.1, 12.2));
+ MapClickEvent e = new MapClickEvent(m, marker, LatLng.newInstance(10.1,
+ 12.2));
delayTestFinish(ASYNC_DELAY_MSEC);
m.trigger(e);
}
@@ -382,7 +383,8 @@
});
RootPanel.get().add(m);
- MapDoubleClickEvent e = new MapDoubleClickEvent(m, LatLng.newInstance(10.1, 12.2));
+ MapDoubleClickEvent e = new MapDoubleClickEvent(m, LatLng.newInstance(10.1,
+ 12.2));
delayTestFinish(ASYNC_DELAY_MSEC);
m.trigger(e);
}
@@ -528,9 +530,9 @@
final MapWidget m = new MapWidget();
/*
- * The MoveEnd event gets called on setCenter(). There is a setCenter() call
- * implicit in. Call now so that first move event won't get in the way of
- * the test.
+ * The Move event gets called on setCenter(). There is a setCenter() call
+ * implicit in the MapWidget() constructor. Add to the map now so that first
+ * move event won't get in the way of the test.
*/
RootPanel.get().add(m);
@@ -546,6 +548,9 @@
m.setCenter(end);
}
+ /**
+ * Live test of the MapMoveStart event. On Safari2/Mac this test times out.
+ */
public void testMapMoveStartEvent() {
final LatLng start = LatLng.newInstance(37.4419, -122.1419);
@@ -557,9 +562,9 @@
m.setSize("300px", "300px");
/*
- * The MoveEnd event gets called on setCenter(). There is a setCenter() call
- * implicit in. Call now so that first move event won't get in the way of
- * the test.
+ * The MoveStart event gets called on setCenter(). There is a setCenter()
+ * call implicit in the MapWidget() constructor. Add to the map now so that
+ * first move event won't get in the way of the test.
*/
RootPanel.get().add(m);
@@ -571,8 +576,9 @@
});
+ m.panTo(end);
+
delayTestFinish(ASYNC_DELAY_MSEC);
- m.panTo(end);
}
public void testMapMoveEndTrigger() {
@@ -580,8 +586,8 @@
/*
* The MoveEnd event gets called on setCenter(). There is a setCenter() call
- * implicit in. Call now so that first move event won't get in the way of
- * the test.
+ * implicit in the MapWidget constructor. Add to the map now so that first
+ * move event won't get in the way of the test.
*/
RootPanel.get().add(m);
@@ -607,9 +613,9 @@
final MapWidget m = new MapWidget(start, 13);
/*
- * The MoveEnd event gets called on setCenter(). There is a setCenter() call
- * implicit in. Call now so that first move event won't get in the way of
- * the test.
+ * The Move event gets called on setCenter(). There is a setCenter() call
+ * implicit in the MapWidget() constructor. Add to the map now so that first
+ * move event won't get in the way of the test.
*/
RootPanel.get().add(m);
@@ -769,15 +775,16 @@
});
RootPanel.get().add(m);
Marker marker = new Marker(LatLng.newInstance(12.34, -22.2));
- MapRightClickEvent e = new MapRightClickEvent(m, Point.newInstance(101, 222),
- m.getElement(), marker);
+ MapRightClickEvent e = new MapRightClickEvent(m,
+ Point.newInstance(101, 222), m.getElement(), marker);
delayTestFinish(ASYNC_DELAY_MSEC);
m.trigger(e);
}
public void testMapZoomEndEvent() {
- final MapWidget m = new MapWidget(LatLng.newInstance(37.4419, -122.1419), 13);
+ final MapWidget m = new MapWidget(LatLng.newInstance(37.4419, -122.1419),
+ 13);
m.addMapZoomEndHandler(new MapZoomEndHandler() {