< prev index next >

tests/system/src/test/java/test/robot/com/sun/glass/ui/monocle/FuzzyTapTest.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.ParameterizedTestBase;
 import test.robot.com.sun.glass.ui.monocle.input.devices.TestTouchDevice;
 import test.robot.com.sun.glass.ui.monocle.input.devices.TestTouchDevices;
 import org.junit.Assert;
 import org.junit.Test;

@@ -56,15 +56,15 @@
         final int y1 = y + tapRadius / 2;
         int p = device.addPoint(x, y);
         device.sync();
         device.setAndRemovePoint(p, x1, y1);
         device.sync();
-        TestLog.waitForLog("Mouse pressed: " + x + ", " + y, 3000);
-        TestLog.waitForLog("Mouse clicked: " + x + ", " + y, 3000);
-        TestLog.waitForLog("Mouse released: " + x + ", " + y, 3000);
-        Assert.assertEquals(0, TestLog.countLogContaining("Mouse dragged:"));
-        Assert.assertEquals(0, TestLog.countLogContaining("Touch moved:"));
+        TestLogShim.waitForLog("Mouse pressed: " + x + ", " + y, 3000);
+        TestLogShim.waitForLog("Mouse clicked: " + x + ", " + y, 3000);
+        TestLogShim.waitForLog("Mouse released: " + x + ", " + y, 3000);
+        Assert.assertEquals(0, TestLogShim.countLogContaining("Mouse dragged:"));
+        Assert.assertEquals(0, TestLogShim.countLogContaining("Touch moved:"));
     }
 
     /** Touch down, small move, touch up */
     @Test
     public void tap1a() throws Exception {

@@ -77,14 +77,14 @@
         device.sync();
         device.setPoint(p, x1, y1);
         device.sync();
         device.removePoint(p);
         device.sync();
-        TestLog.waitForLog("Mouse clicked: " + x + ", " + y, 3000);
-        TestLog.waitForLog("Mouse released: " + x + ", " + y, 3000);
-        Assert.assertEquals(0, TestLog.countLogContaining("Mouse dragged:"));
-        Assert.assertEquals(0, TestLog.countLogContaining("Touch moved:"));
+        TestLogShim.waitForLog("Mouse clicked: " + x + ", " + y, 3000);
+        TestLogShim.waitForLog("Mouse released: " + x + ", " + y, 3000);
+        Assert.assertEquals(0, TestLogShim.countLogContaining("Mouse dragged:"));
+        Assert.assertEquals(0, TestLogShim.countLogContaining("Touch moved:"));
     }
 
     /** Touch down, touch up outside the tap radius */
     @Test
     public void tap2() throws Exception {

@@ -95,16 +95,16 @@
         final int y1 = y + tapRadius;
         int p = device.addPoint(x, y);
         device.sync();
         device.setAndRemovePoint(p, x1, y1);
         device.sync();
-        TestLog.waitForLog("Mouse pressed: " + x + ", " + y, 3000);
-        TestLog.waitForLog("Mouse released: " + x + ", " + y, 3000);
-        TestLog.waitForLog("Mouse clicked: " + x + ", " + y, 3000);
-        TestLog.waitForLog("Touch pressed: " + x + ", " + y, 3000);
-        TestLog.waitForLog("Touch released: " + x + ", " + y, 3000);
-        Assert.assertEquals(1, TestLog.countLogContaining("Mouse clicked:"));
+        TestLogShim.waitForLog("Mouse pressed: " + x + ", " + y, 3000);
+        TestLogShim.waitForLog("Mouse released: " + x + ", " + y, 3000);
+        TestLogShim.waitForLog("Mouse clicked: " + x + ", " + y, 3000);
+        TestLogShim.waitForLog("Touch pressed: " + x + ", " + y, 3000);
+        TestLogShim.waitForLog("Touch released: " + x + ", " + y, 3000);
+        Assert.assertEquals(1, TestLogShim.countLogContaining("Mouse clicked:"));
     }
 
     /** Touch down, move outside touch radius, touch up */
     @Test
     public void tap2a() throws Exception {

@@ -117,18 +117,18 @@
         device.sync();
         device.setPoint(p, x1, y1);
         device.sync();
         device.removePoint(p);
         device.sync();
-        TestLog.waitForLog("Mouse pressed: " + x + ", " + y, 3000);
-        TestLog.waitForLog("Mouse dragged: " + x1 + ", " + y1, 3000);
-        TestLog.waitForLog("Mouse released: " + x1 + ", " + y1, 3000);
-        TestLog.waitForLog("Mouse clicked: " + x1 + ", " + y1, 3000);
-        TestLog.waitForLog("Touch pressed: " + x + ", " + y, 3000);
-        TestLog.waitForLog("Touch moved: " + x1 + ", " + y1, 3000);
-        TestLog.waitForLog("Touch released: " + x1 + ", " + y1, 3000);
-        Assert.assertEquals(1, TestLog.countLogContaining("Mouse clicked: " + x1 + ", " + y1));
+        TestLogShim.waitForLog("Mouse pressed: " + x + ", " + y, 3000);
+        TestLogShim.waitForLog("Mouse dragged: " + x1 + ", " + y1, 3000);
+        TestLogShim.waitForLog("Mouse released: " + x1 + ", " + y1, 3000);
+        TestLogShim.waitForLog("Mouse clicked: " + x1 + ", " + y1, 3000);
+        TestLogShim.waitForLog("Touch pressed: " + x + ", " + y, 3000);
+        TestLogShim.waitForLog("Touch moved: " + x1 + ", " + y1, 3000);
+        TestLogShim.waitForLog("Touch released: " + x1 + ", " + y1, 3000);
+        Assert.assertEquals(1, TestLogShim.countLogContaining("Mouse clicked: " + x1 + ", " + y1));
     }
 
     /** Touch down, drift outside touch radius, touch up */
     @Test
     public void tap3b() throws Exception {

@@ -152,15 +152,15 @@
         device.setPoint(p, x2, y2);
         device.sync();
         // and release
         device.removePoint(p);
         device.sync();
-        TestLog.waitForLog("Mouse pressed: " + x + ", " + y, 3000);
-        TestLog.waitForLog("Mouse dragged: " + x2 + ", " + y2, 3000);
-        TestLog.waitForLog("Mouse released: " + x2 + ", " + y2, 3000);
-        TestLog.waitForLog("Mouse clicked: " + x2 + ", " + y2, 3000);
-        TestLog.waitForLog("Touch pressed: " + x + ", " + y, 3000);
-        TestLog.waitForLog("Touch moved: " + x2 + ", " + y2, 3000);
-        TestLog.waitForLog("Touch released: " + x2 + ", " + y2, 3000);
-        Assert.assertEquals(1, TestLog.countLogContaining("Mouse clicked: " + x2 + ", " + y2));
+        TestLogShim.waitForLog("Mouse pressed: " + x + ", " + y, 3000);
+        TestLogShim.waitForLog("Mouse dragged: " + x2 + ", " + y2, 3000);
+        TestLogShim.waitForLog("Mouse released: " + x2 + ", " + y2, 3000);
+        TestLogShim.waitForLog("Mouse clicked: " + x2 + ", " + y2, 3000);
+        TestLogShim.waitForLog("Touch pressed: " + x + ", " + y, 3000);
+        TestLogShim.waitForLog("Touch moved: " + x2 + ", " + y2, 3000);
+        TestLogShim.waitForLog("Touch released: " + x2 + ", " + y2, 3000);
+        Assert.assertEquals(1, TestLogShim.countLogContaining("Mouse clicked: " + x2 + ", " + y2));
     }
 }
< prev index next >