< prev index next >

tests/system/src/test/java/test/robot/com/sun/glass/ui/monocle/USKeyboardTest.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 org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;

@@ -44,11 +44,11 @@
     private Character [] signsShift;
     private String [] signsKeyNames;
 
     @Before
     public void initDevice() {
-        TestLog.reset();
+        TestLogShim.reset();
         ui = new UInput();
     }
 
     @After
     public void destroyDevice() throws InterruptedException {

@@ -111,13 +111,13 @@
         ui.processLine("EV_KEY " + key + " 0");
         ui.processLine("EV_SYN");
         if (shiftPressed) {
             ui.processLine("EV_KEY KEY_LEFTSHIFT 0");
             ui.processLine("EV_SYN");
-            TestLog.waitForLog("Key released: SHIFT");
+            TestLogShim.waitForLog("Key released: SHIFT");
         }
-        TestLog.waitForLog("Key typed: %0$c", new Object[] { c });
+        TestLogShim.waitForLog("Key typed: %0$c", new Object[] { c });
     }
 
     /**
      * The test is checking the lookup of each key on board,
      * at first with Shift button unpressed and then with Shift button pressed.

@@ -167,11 +167,11 @@
 
         ui.processLine("EV_KEY KEY_CAPSLOCK 1");
         ui.processLine("EV_SYN");
         ui.processLine("EV_KEY KEY_CAPSLOCK 0");
         ui.processLine("EV_SYN");
-        TestLog.waitForLog("Key released: CAPS");
+        TestLogShim.waitForLog("Key released: CAPS");
     }
 
     /** Key presses and releases are allowed to overlap. RT-37425. */
     @Test
     public void testPressReleaseOrder() throws Exception {

@@ -188,36 +188,36 @@
         ui.processLine("PROPERTY ID_INPUT_KEYBOARD 1");
         ui.processLine("CREATE");
 
         ui.processLine("EV_KEY KEY_1 1");
         ui.processLine("EV_SYN");
-        TestLog.waitForLog("Key pressed: DIGIT1");
-        TestLog.waitForLog("Key typed: 1");
+        TestLogShim.waitForLog("Key pressed: DIGIT1");
+        TestLogShim.waitForLog("Key typed: 1");
         ui.processLine("EV_KEY KEY_2 1");
         ui.processLine("EV_SYN");
-        TestLog.waitForLog("Key pressed: DIGIT2");
-        TestLog.waitForLog("Key typed: 2");
+        TestLogShim.waitForLog("Key pressed: DIGIT2");
+        TestLogShim.waitForLog("Key typed: 2");
         ui.processLine("EV_KEY KEY_1 0");
         ui.processLine("EV_SYN");
-        TestLog.waitForLog("Key released: DIGIT1");
+        TestLogShim.waitForLog("Key released: DIGIT1");
         ui.processLine("EV_KEY KEY_3 1");
         ui.processLine("EV_SYN");
-        TestLog.waitForLog("Key pressed: DIGIT3");
-        TestLog.waitForLog("Key typed: 3");
+        TestLogShim.waitForLog("Key pressed: DIGIT3");
+        TestLogShim.waitForLog("Key typed: 3");
         ui.processLine("EV_KEY KEY_2 0");
         ui.processLine("EV_SYN");
-        TestLog.waitForLog("Key released: DIGIT2");
+        TestLogShim.waitForLog("Key released: DIGIT2");
         ui.processLine("EV_KEY KEY_4 1");
         ui.processLine("EV_SYN");
-        TestLog.waitForLog("Key pressed: DIGIT4");
-        TestLog.waitForLog("Key typed: 4");
+        TestLogShim.waitForLog("Key pressed: DIGIT4");
+        TestLogShim.waitForLog("Key typed: 4");
         ui.processLine("EV_KEY KEY_3 0");
         ui.processLine("EV_SYN");
-        TestLog.waitForLog("Key released: DIGIT3");
+        TestLogShim.waitForLog("Key released: DIGIT3");
         ui.processLine("EV_KEY KEY_4 0");
         ui.processLine("EV_SYN");
-        TestLog.waitForLog("Key released: DIGIT3");
+        TestLogShim.waitForLog("Key released: DIGIT3");
     }
 
     @Test
     public void testBackspace() throws Exception {
         TestApplication.showFullScreenScene();

@@ -231,63 +231,63 @@
         ui.processLine("PROPERTY ID_INPUT_KEYBOARD 1");
         ui.processLine("CREATE");
 
         ui.processLine("EV_KEY KEY_BACKSPACE 1");
         ui.processLine("EV_SYN");
-        TestLog.waitForLog("Key pressed: BACK_SPACE");
+        TestLogShim.waitForLog("Key pressed: BACK_SPACE");
         ui.processLine("EV_KEY KEY_BACKSPACE 0");
         ui.processLine("EV_SYN");
-        TestLog.waitForLog("Key released: BACK_SPACE");
-        Assert.assertEquals(0l, TestLog.countLogContaining("Key typed"));
+        TestLogShim.waitForLog("Key released: BACK_SPACE");
+        Assert.assertEquals(0l, TestLogShim.countLogContaining("Key typed"));
 
-        TestLog.reset();
+        TestLogShim.reset();
         ui.processLine("EV_KEY KEY_LEFTSHIFT 1");
         ui.processLine("EV_SYN");
         ui.processLine("EV_KEY KEY_BACKSPACE 1");
         ui.processLine("EV_SYN");
-        TestLog.waitForLog("Key pressed: BACK_SPACE");
+        TestLogShim.waitForLog("Key pressed: BACK_SPACE");
         ui.processLine("EV_KEY KEY_BACKSPACE 0");
         ui.processLine("EV_SYN");
         ui.processLine("EV_KEY KEY_LEFTSHIFT 0");
         ui.processLine("EV_SYN");
-        TestLog.waitForLog("Key released: BACK_SPACE");
-        Assert.assertEquals(0l, TestLog.countLogContaining("Key typed"));
+        TestLogShim.waitForLog("Key released: BACK_SPACE");
+        Assert.assertEquals(0l, TestLogShim.countLogContaining("Key typed"));
 
-        TestLog.reset();
+        TestLogShim.reset();
         ui.processLine("EV_KEY KEY_CAPSLOCK 1");
         ui.processLine("EV_SYN");
         ui.processLine("EV_KEY KEY_CAPSLOCK 0");
         ui.processLine("EV_SYN");
         ui.processLine("EV_KEY KEY_BACKSPACE 1");
         ui.processLine("EV_SYN");
-        TestLog.waitForLog("Key pressed: BACK_SPACE");
+        TestLogShim.waitForLog("Key pressed: BACK_SPACE");
         ui.processLine("EV_KEY KEY_BACKSPACE 0");
         ui.processLine("EV_SYN");
         ui.processLine("EV_KEY KEY_CAPSLOCK 1");
         ui.processLine("EV_SYN");
         ui.processLine("EV_KEY KEY_CAPSLOCK 0");
         ui.processLine("EV_SYN");
-        TestLog.waitForLog("Key released: BACK_SPACE");
-        Assert.assertEquals(0l, TestLog.countLogContaining("Key typed"));
+        TestLogShim.waitForLog("Key released: BACK_SPACE");
+        Assert.assertEquals(0l, TestLogShim.countLogContaining("Key typed"));
 
-        TestLog.reset();
+        TestLogShim.reset();
         ui.processLine("EV_KEY KEY_CAPSLOCK 1");
         ui.processLine("EV_SYN");
         ui.processLine("EV_KEY KEY_CAPSLOCK 0");
         ui.processLine("EV_SYN");
         ui.processLine("EV_KEY KEY_LEFTSHIFT 1");
         ui.processLine("EV_SYN");
         ui.processLine("EV_KEY KEY_BACKSPACE 1");
         ui.processLine("EV_SYN");
-        TestLog.waitForLog("Key pressed: BACK_SPACE");
+        TestLogShim.waitForLog("Key pressed: BACK_SPACE");
         ui.processLine("EV_KEY KEY_BACKSPACE 0");
         ui.processLine("EV_SYN");
         ui.processLine("EV_KEY KEY_LEFTSHIFT 0");
         ui.processLine("EV_SYN");
         ui.processLine("EV_KEY KEY_CAPSLOCK 1");
         ui.processLine("EV_SYN");
         ui.processLine("EV_KEY KEY_CAPSLOCK 0");
         ui.processLine("EV_SYN");
-        TestLog.waitForLog("Key released: BACK_SPACE");
-        Assert.assertEquals(0l, TestLog.countLogContaining("Key typed"));
+        TestLogShim.waitForLog("Key released: BACK_SPACE");
+        Assert.assertEquals(0l, TestLogShim.countLogContaining("Key typed"));
     }
 }
< prev index next >