< prev index next >

tests/system/src/test/java/test/robot/com/sun/glass/ui/monocle/TouchEventLookaheadTest.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 test.robot.com.sun.glass.ui.monocle.input.devices.TestTouchDevice; import test.robot.com.sun.glass.ui.monocle.input.devices.TestTouchDevices; import javafx.geometry.Rectangle2D; import javafx.stage.Screen; --- 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 test.robot.com.sun.glass.ui.monocle.input.devices.TestTouchDevice; import test.robot.com.sun.glass.ui.monocle.input.devices.TestTouchDevices; import javafx.geometry.Rectangle2D; import javafx.stage.Screen;
*** 55,65 **** public void mergeMoves() throws Exception { Assume.assumeTrue(TestApplication.isMonocle()); TestApplication.showFullScreenScene(); TestApplication.addMouseListeners(); TestApplication.addTouchListeners(); ! TestLog.reset(); Rectangle2D r = Screen.getPrimary().getBounds(); final int width = (int) r.getWidth(); final int height = (int) r.getHeight(); final int x1 = (int) Math.round(width * 0.1); final int y1 = (int) Math.round(height * 0.1); --- 55,65 ---- public void mergeMoves() throws Exception { Assume.assumeTrue(TestApplication.isMonocle()); TestApplication.showFullScreenScene(); TestApplication.addMouseListeners(); TestApplication.addTouchListeners(); ! TestLogShim.reset(); Rectangle2D r = Screen.getPrimary().getBounds(); final int width = (int) r.getWidth(); final int height = (int) r.getHeight(); final int x1 = (int) Math.round(width * 0.1); final int y1 = (int) Math.round(height * 0.1);
*** 84,100 **** device.sync(); device.removePoint(p); device.sync(); }); // Check that the initial point reported is correct ! TestLog.waitForLog("Mouse pressed: " + x1 + ", " + y1, 3000); ! TestLog.waitForLog("Touch pressed: " + x1 + ", " + y1, 3000); // Check that the final point reported is correct ! TestLog.waitForLog("Mouse released: " + x3 + ", " + y3, 3000); ! TestLog.waitForLog("Touch released: " + x3 + ", " + y3, 3000); // Check that moves in between were filtered ! TestLog.waitForLog("Mouse dragged: " + x3 + ", " + y3, 3000); ! TestLog.waitForLog("Touch moved: " + x3 + ", " + y3, 3000); ! Assert.assertTrue(TestLog.countLogContaining("Mouse dragged") <= 3); ! Assert.assertTrue(TestLog.countLogContaining("Touch moved") <= 3); } } --- 84,100 ---- device.sync(); device.removePoint(p); device.sync(); }); // Check that the initial point reported is correct ! TestLogShim.waitForLog("Mouse pressed: " + x1 + ", " + y1, 3000); ! TestLogShim.waitForLog("Touch pressed: " + x1 + ", " + y1, 3000); // Check that the final point reported is correct ! TestLogShim.waitForLog("Mouse released: " + x3 + ", " + y3, 3000); ! TestLogShim.waitForLog("Touch released: " + x3 + ", " + y3, 3000); // Check that moves in between were filtered ! TestLogShim.waitForLog("Mouse dragged: " + x3 + ", " + y3, 3000); ! TestLogShim.waitForLog("Touch moved: " + x3 + ", " + y3, 3000); ! Assert.assertTrue(TestLogShim.countLogContaining("Mouse dragged") <= 3); ! Assert.assertTrue(TestLogShim.countLogContaining("Touch moved") <= 3); } }
< prev index next >