Package junit.extensions.abbot

Examples of junit.extensions.abbot.Timer.elapsed()


        tester.actionClick(button);
        // Give the annotation thread time to clean up
        Timer timer = new Timer();
        while (ann.isShowing()) {
            getRobot().sleep();
            if (timer.elapsed() > 1000)
                fail("Annotation should be hidden after dismiss button activated");
        }
        timer.reset();
        while (ann.isRunning) {
            getRobot().sleep();
View Full Code Here


                fail("Annotation should be hidden after dismiss button activated");
        }
        timer.reset();
        while (ann.isRunning) {
            getRobot().sleep();
            if (timer.elapsed() > 1000)
                fail("Annotation step should have finished");
        }
        assertEquals("No exception should be thrown",
                     (Throwable)null, stepFailure);
    }
View Full Code Here

        int y = w.getY() + w.getHeight()/2;
        robot.mouseMove(x, y);
        robot.mouseMove(x, y+1);
        Timer timer = new Timer();
        while (!flag1.flag || !flag2.flag) {
            if (timer.elapsed() > 5000) {
                fail("No motion event received: AWTEventListener=" + flag1.flag
                     + ", MouseListener=" + flag2.flag);
            }
        }
    }
View Full Code Here

        robot.mouseMove(pt.x + label.getWidth()/2, pt.y + label.getHeight()/2);
        robot.mousePress(MouseEvent.BUTTON2_MASK);
        robot.mouseRelease(MouseEvent.BUTTON2_MASK);
        Timer timer = new Timer();
        while (!watcher.gotClick) {
            if (timer.elapsed() > EVENT_GENERATION_DELAY)
                fail("Never received button 2 click event");
            robot.delay(200);
        }
        assertEquals("This platform has bad robot button 2 mask mapping",
                     MouseEvent.BUTTON2_MASK, watcher.modifiers);
View Full Code Here

        watcher.gotClick = false;
        robot.mousePress(MouseEvent.BUTTON3_MASK);
        robot.mouseRelease(MouseEvent.BUTTON3_MASK);
        timer.reset();
        while (!watcher.gotClick) {
            if (timer.elapsed() > EVENT_GENERATION_DELAY)
                fail("Never received button 3 click event");
            robot.delay(200);
        }
        assertEquals("This platform has bad robot button 3 mask mapping",
                     MouseEvent.BUTTON3_MASK, watcher.modifiers);
View Full Code Here

        robot.mousePress(MouseEvent.BUTTON1_MASK);
        robot.mouseRelease(MouseEvent.BUTTON1_MASK);
        robot.waitForIdle();
        Timer timer = new Timer();
        while (!mw1.gotClick) {
            if (timer.elapsed() > EVENT_GENERATION_DELAY)
                fail("Never received click event on first frame");
            robot.delay(200);
        }
        timer.reset();
        while (!mw2.gotClick) {
View Full Code Here

                fail("Never received click event on first frame");
            robot.delay(200);
        }
        timer.reset();
        while (!mw2.gotClick) {
            if (timer.elapsed() > EVENT_GENERATION_DELAY)
                fail("Never received click event on second frame");
            robot.delay(200);
        }
        assertEquals("Multi-click counting should not span frames",
                     1, mw1.clickCount);
View Full Code Here

                    flag.flag = true;
                }
            });
            Timer timer = new Timer();
            while (!flag.flag) {
                if (timer.elapsed() > 5000)
                    fail("An active AWT Popup blocks the event queue");
                Thread.sleep(10);
            }
        }
        finally {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.