< prev index next >

tests/system/src/test/java/test/robot/com/sun/glass/ui/monocle/MouseLagTest.java

Print this page
rev 9504 : need to fix test log and others

*** 23,33 **** * questions. */ package test.robot.com.sun.glass.ui.monocle; ! import com.sun.glass.ui.monocle.TestLog; import test.robot.com.sun.glass.ui.monocle.TestApplication; import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Rule; --- 23,33 ---- * questions. */ package test.robot.com.sun.glass.ui.monocle; ! import com.sun.glass.ui.monocle.TestLogShim; import test.robot.com.sun.glass.ui.monocle.TestApplication; import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Rule;
*** 38,49 **** private UInput ui; @Rule public TestName name = new TestName(); @Before public void setUpScreen() throws Exception { ! TestLog.reset(); ! TestLog.log(name.getMethodName()); TestApplication.showFullScreenScene(); TestApplication.addMouseListeners(); TestApplication.movePointerTo(300, 300); initDevice(); } --- 38,49 ---- private UInput ui; @Rule public TestName name = new TestName(); @Before public void setUpScreen() throws Exception { ! TestLogShim.reset(); ! TestLogShim.log(name.getMethodName()); TestApplication.showFullScreenScene(); TestApplication.addMouseListeners(); TestApplication.movePointerTo(300, 300); initDevice(); }
*** 102,115 **** } long t = System.currentTimeMillis() - startTime; // Make sure events could be sent in the required time Assert.assertTrue("Took " + t + "ms to send 3000 events, of which " ! + TestLog.countLogContaining("moved") + " were received", t < 6000l * TestApplication.getTimeScale()); ! TestLog.log("Sent 3000 events in " + t + "ms"); // Make sure events could be delivered in the required time ! TestLog.waitForLog("Mouse moved: 300, 310", 6000l - t); } } --- 102,115 ---- } long t = System.currentTimeMillis() - startTime; // Make sure events could be sent in the required time Assert.assertTrue("Took " + t + "ms to send 3000 events, of which " ! + TestLogShim.countLogContaining("moved") + " were received", t < 6000l * TestApplication.getTimeScale()); ! TestLogShim.log("Sent 3000 events in " + t + "ms"); // Make sure events could be delivered in the required time ! TestLogShim.waitForLog("Mouse moved: 300, 310", 6000l - t); } }
< prev index next >