< prev index next >

tests/system/src/test/java/test/robot/com/sun/glass/ui/monocle/DragTouchInAndOutAWindowTest.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.geometry.Rectangle2D;
 import javafx.stage.Stage;

@@ -67,11 +67,11 @@
         TestApplication.addTouchListeners();
         int p = device.addPoint(0, 0);
         device.sync();
         device.removePoint(p);
         device.sync();
-        TestLog.reset();
+        TestLogShim.reset();
     }
 
     /**
      * RT-33771 stated that exceptions are been thrown because the state of the
      * point, when entering the window, is wrong.

@@ -103,13 +103,13 @@
         device.sync();
 
         //check that tested window didn't recive any notifications
 
         //wait for results and make sure no event received
-        Assert.assertEquals(0, TestLog.countLogContaining("TouchPoint: PRESSED"));
-        Assert.assertEquals(0, TestLog.countLogContaining("TouchPoint: MOVED"));
-        Assert.assertEquals(0, TestLog.countLogContaining("TouchPoint: RELEASED"));
+        Assert.assertEquals(0, TestLogShim.countLogContaining("TouchPoint: PRESSED"));
+        Assert.assertEquals(0, TestLogShim.countLogContaining("TouchPoint: MOVED"));
+        Assert.assertEquals(0, TestLogShim.countLogContaining("TouchPoint: RELEASED"));
     }
 
     @Test
     /**
      * This test is also related to RT-33687 - Lens:some touch events are been

@@ -130,17 +130,17 @@
             device.setPoint(p, windowMiddleWidth + i, windowMiddleHeight);
             device.sync();
         }
 
         //wait for results
-        TestLog.waitForLogContaining("TouchPoint: PRESSED", 3000);
+        TestLogShim.waitForLogContaining("TouchPoint: PRESSED", 3000);
 
         //release outside the window
         device.removePoint(p);
         device.sync();
         //check that we get the event
-        TestLog.waitForLogContaining("TouchPoint: RELEASED", 3000);
+        TestLogShim.waitForLogContaining("TouchPoint: RELEASED", 3000);
     }
 
      @Test
     /**
      * Combining the two test cases above, start a touch sequence inside a

@@ -162,12 +162,12 @@
             device.setPoint(p, i, windowMiddleHeight);
             device.sync();
         }
 
         //wait for results
-        TestLog.waitForLogContaining("TouchPoint: PRESSED", 3000);
-        TestLog.waitForLogContaining("TouchPoint: MOVED", 3000);
+        TestLogShim.waitForLogContaining("TouchPoint: PRESSED", 3000);
+        TestLogShim.waitForLogContaining("TouchPoint: MOVED", 3000);
 
         //continue from where we stopped and drag point back to window
         for (; i >= windowMiddleWidth  ; i -= 10) {
             device.setPoint(p, i, windowMiddleHeight);
             device.sync();

@@ -175,11 +175,11 @@
 
         //release inside the window
         device.removePoint(p);
         device.sync();
         //check that we get the event
-        TestLog.waitForLogContaining("TouchPoint: RELEASED", 3000);
+        TestLogShim.waitForLogContaining("TouchPoint: RELEASED", 3000);
     }
 
      @Test
     /**
      * Same test as above, but for multi touch.

@@ -220,13 +220,13 @@
         device.removePoint(p1);
         device.removePoint(p2);
         device.sync();
 
         //wait for results and make sure no event received
-        Assert.assertEquals(0, TestLog.countLogContaining("TouchPoint: PRESSED"));
-        Assert.assertEquals(0, TestLog.countLogContaining("TouchPoint: MOVED"));
-        Assert.assertEquals(0, TestLog.countLogContaining("TouchPoint: RELEASED"));
+        Assert.assertEquals(0, TestLogShim.countLogContaining("TouchPoint: PRESSED"));
+        Assert.assertEquals(0, TestLogShim.countLogContaining("TouchPoint: MOVED"));
+        Assert.assertEquals(0, TestLogShim.countLogContaining("TouchPoint: RELEASED"));
     }
     @Ignore("RT-38482")
     @Test
     /**
      * Drag two touch points simultaneously from outside the window (from the

@@ -280,16 +280,16 @@
         int p = device.addPoint(x3, y3);
         device.sync();
         device.removePoint(p);
         device.sync();
         //verify events press/release were received
-        TestLog.waitForLogContaining("TouchPoint: PRESSED %d, %d", x3, y3);
-        TestLog.waitForLogContaining("TouchPoint: RELEASED %d, %d", x3, y3);
+        TestLogShim.waitForLogContaining("TouchPoint: PRESSED %d, %d", x3, y3);
+        TestLogShim.waitForLogContaining("TouchPoint: RELEASED %d, %d", x3, y3);
 
         //Verify press/release events were received only once
-        Assert.assertEquals(1, TestLog.countLogContaining("TouchPoint: PRESSED"));
-        Assert.assertEquals(1, TestLog.countLogContaining("TouchPoint: RELEASED"));
+        Assert.assertEquals(1, TestLogShim.countLogContaining("TouchPoint: PRESSED"));
+        Assert.assertEquals(1, TestLogShim.countLogContaining("TouchPoint: RELEASED"));
 
         //make sure no move event was received
-        Assert.assertEquals(0, TestLog.countLogContaining("TouchPoint: MOVED"));
+        Assert.assertEquals(0, TestLogShim.countLogContaining("TouchPoint: MOVED"));
     }
 }
< prev index next >