< prev index next >
tests/system/src/test/java/test/robot/com/sun/glass/ui/monocle/SwipeSimpleTest.java
Print this page
rev 9504 : need to fix test log and others
@@ -23,11 +23,11 @@
* questions.
*/
package test.robot.com.sun.glass.ui.monocle;
-import com.sun.glass.ui.monocle.TestLog;
+import com.sun.glass.ui.monocle.TestLogShim;
import test.robot.com.sun.glass.ui.monocle.TestApplication;
import test.robot.com.sun.glass.ui.monocle.input.devices.TestTouchDevice;
import test.robot.com.sun.glass.ui.monocle.input.devices.TestTouchDevices;
import javafx.scene.input.GestureEvent;
import org.junit.*;
@@ -66,11 +66,11 @@
@Before
public void addListener() throws Exception {
TestApplication.getStage().getScene().addEventHandler(
GestureEvent.ANY,
- e -> TestLog.format("%s at %.0f, %.0f",
+ e -> TestLogShim.format("%s at %.0f, %.0f",
e.getEventType(),
e.getScreenX(),
e.getScreenY()));
startPointX = (int) Math.round(width * 0.5);
startPointY = (int) Math.round(height * 0.5);
@@ -78,28 +78,28 @@
private void swipe(Point[] points, String expectedSwipe) throws Exception {
Assert.assertTrue(points.length > 1);
int x = points[0].getX();
int y = points[0].getY();
- TestLog.reset();
+ TestLogShim.reset();
int p1 = device.addPoint(x, y);
device.sync();
for (int i = 1; i < points.length; i++) {
device.setPoint(p1, points[i].getX(), points[i].getY());
device.sync();
}
device.removePoint(p1);
device.sync();
int finalX = points[points.length - 1].getX();
int finalY = points[points.length - 1].getY();
- TestLog.waitForLogContaining("Touch released: %d, %d", finalX, finalY);
- TestLog.waitForLogContaining("Mouse released: %d, %d", finalX, finalY);
- TestLog.waitForLogContaining("Mouse clicked: %d, %d", finalX, finalY);
+ TestLogShim.waitForLogContaining("Touch released: %d, %d", finalX, finalY);
+ TestLogShim.waitForLogContaining("Mouse released: %d, %d", finalX, finalY);
+ TestLogShim.waitForLogContaining("Mouse clicked: %d, %d", finalX, finalY);
if (expectedSwipe != null) {
- TestLog.waitForLogContaining(expectedSwipe);
+ TestLogShim.waitForLogContaining(expectedSwipe);
} else {
- Assert.assertEquals(0, TestLog.countLogContaining("SWIPE"));
+ Assert.assertEquals(0, TestLogShim.countLogContaining("SWIPE"));
}
}
@Test
public void testSwipeRight1() throws Exception {
< prev index next >