< prev index next >

tests/system/src/test/java/test/robot/com/sun/glass/ui/monocle/TouchLagTest.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 javafx.geometry.Rectangle2D;
 import javafx.stage.Screen;
 import org.junit.After;
 import org.junit.Assert;

@@ -40,12 +40,12 @@
 
     private UInput ui;
     @Rule public TestName name = new TestName();
 
     @Before public void setUpScreen() throws Exception {
-        TestLog.reset();
-        TestLog.log(name.getMethodName());
+        TestLogShim.reset();
+        TestLogShim.log(name.getMethodName());
         TestApplication.showFullScreenScene();
         TestApplication.addTouchListeners();
         TestApplication.addMouseListeners();
         initDevice();
     }

@@ -97,19 +97,19 @@
     /** Make sure we can process 1000 touch move events per second. We are
      * not required to report all these events, but must report the last one.
      */
     @Test
     public void testTouchLag() throws Exception {
-        TestLog.reset();
+        TestLogShim.reset();
         ui.processLine("EV_ABS ABS_X 300");
         ui.processLine("EV_ABS ABS_Y 300");
         ui.processLine("EV_KEY BTN_TOUCH 1");
         ui.processLine("EV_ABS ABS_MT_POSITION_X 300");
         ui.processLine("EV_ABS ABS_MT_POSITION_Y 300");
         ui.processLine("EV_SYN SYN_MT_REPORT 0");
         ui.processLine("EV_SYN SYN_REPORT 0");
-        TestLog.waitForLogContaining("TouchPoint: PRESSED", 3000l);
+        TestLogShim.waitForLogContaining("TouchPoint: PRESSED", 3000l);
         // pre-process move event data into a byte array. That way we don't
         // have to count the time it takes to convert string event descriptions
         // into a byte stream.
         byte[] b = new byte[1024];
         int offset = 0;

@@ -146,11 +146,11 @@
         }
         long t = System.currentTimeMillis() - startTime;
         // Make sure events could be sent in the required time
         Assert.assertTrue("Took " + t + "ms to send 3000 events",
                           t < (long) (3000l * TestApplication.getTimeScale()));
-        TestLog.log("Sent 3000 events in " + t + "ms");
+        TestLogShim.log("Sent 3000 events in " + t + "ms");
         // move to 400, 410
         ui.writeValue(b, xs[0], 400);
         ui.writeValue(b, xs[1], 400);
         ui.writeValue(b, ys[0], 410);
         ui.writeValue(b, ys[1], 410);

@@ -158,27 +158,27 @@
         // release 
         ui.processLine("EV_KEY BTN_TOUCH 0");
         ui.processLine("EV_SYN SYN_MT_REPORT 0");
         ui.processLine("EV_SYN SYN_REPORT 0");
         // Make sure events could be delivered in the required time
-        TestLog.waitForLog("Touch moved: 400, 410", 3000l - t);
+        TestLogShim.waitForLog("Touch moved: 400, 410", 3000l - t);
     }
 
     /** Make sure we can process 1000 multitouch move events per second. We are
      * not required to report all these events, but must report the last one.
      */
     @Test
     public void testMultitouchLag() throws Exception {
-        TestLog.reset();
+        TestLogShim.reset();
         ui.processLine("EV_ABS ABS_X 300");
         ui.processLine("EV_ABS ABS_Y 300");
         ui.processLine("EV_KEY BTN_TOUCH 1");
         ui.processLine("EV_ABS ABS_MT_POSITION_X 300");
         ui.processLine("EV_ABS ABS_MT_POSITION_Y 300");
         ui.processLine("EV_SYN SYN_MT_REPORT 0");
         ui.processLine("EV_SYN SYN_REPORT 0");
-        TestLog.waitForLogContaining("TouchPoint: PRESSED", 3000);
+        TestLogShim.waitForLogContaining("TouchPoint: PRESSED", 3000);
         // pre-process move event data into a byte array. That way we don't
         // have to count the time it takes to convert string event descriptions
         // into a byte stream.
         byte[] b = new byte[1024];
         int offset = 0;

@@ -225,11 +225,11 @@
         }
         long t = System.currentTimeMillis() - startTime;
         // Make sure events could be sent in the required time
         Assert.assertTrue("Took " + t + "ms to send 3000 events",
                           t < (long) (3000l * TestApplication.getTimeScale()));
-        TestLog.log("Sent 3000 events in " + t + "ms");
+        TestLogShim.log("Sent 3000 events in " + t + "ms");
         // move to (400, 410), (350, 360);
         ui.writeValue(b, baseX, 400);
         ui.writeValue(b, baseY, 410);
         ui.writeValue(b, xs[0], 400);
         ui.writeValue(b, ys[0], 410);

@@ -248,8 +248,8 @@
         ui.processLine("EV_ABS ABS_Y 410");
         ui.processLine("EV_KEY BTN_TOUCH 0");
         ui.processLine("EV_SYN SYN_MT_REPORT 0");
         ui.processLine("EV_SYN SYN_REPORT 0");
         // Make sure events could be delivered in the required time
-        TestLog.waitForLog("Touch released: 400, 410", 3000l - t);
+        TestLogShim.waitForLog("Touch released: 400, 410", 3000l - t);
     }
 }
< prev index next >