< prev index next >

tests/system/src/test/java/test/javafx/scene/Snapshot1Test.java

Print this page
rev 9491 : 8145203: Refactor systemTests for clear separation of tests
Reviewed-by: kcr


   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package javafx.scene;
  27 
  28 import java.util.concurrent.TimeUnit;
  29 import java.util.concurrent.CountDownLatch;
  30 import javafx.scene.paint.Color;
  31 import javafx.application.Platform;




  32 import javafx.scene.image.WritableImage;
  33 import javafx.scene.shape.Rectangle;
  34 import javafx.util.Callback;
  35 import junit.framework.AssertionFailedError;
  36 import org.junit.After;
  37 import org.junit.AfterClass;
  38 import org.junit.Before;
  39 import org.junit.BeforeClass;
  40 import org.junit.Test;
  41 import util.Util;
  42 
  43 import static org.junit.Assert.*;
  44 import static util.Util.TIMEOUT;
  45 
  46 /**
  47  * Tests for snapshot.
  48  */
  49 public class Snapshot1Test extends SnapshotCommon {
  50 
  51     // Sleep time to verify that deferred snapshot is not called immediately
  52     static final int SLEEP_TIME = 100;
  53 
  54     // Short timeout used to ensure that bad callback is not called
  55     static final int SHORT_TIMEOUT = 1000;
  56 
  57     @BeforeClass
  58     public static void setupOnce() {
  59         doSetupOnce();
  60     }
  61 
  62     @AfterClass
  63     public static void teardownOnce() {
  64         doTeardownOnce();




   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package test.javafx.scene;
  27 
  28 import java.util.concurrent.TimeUnit;
  29 import java.util.concurrent.CountDownLatch;
  30 import javafx.scene.paint.Color;
  31 import javafx.application.Platform;
  32 import javafx.scene.Group;
  33 import javafx.scene.Node;
  34 import javafx.scene.Scene;
  35 import javafx.scene.SnapshotResult;
  36 import javafx.scene.image.WritableImage;
  37 import javafx.scene.shape.Rectangle;
  38 import javafx.util.Callback;
  39 import junit.framework.AssertionFailedError;
  40 import org.junit.After;
  41 import org.junit.AfterClass;
  42 import org.junit.Before;
  43 import org.junit.BeforeClass;
  44 import org.junit.Test;
  45 import test.util.Util;
  46 
  47 import static org.junit.Assert.*;
  48 import static test.util.Util.TIMEOUT;
  49 
  50 /**
  51  * Tests for snapshot.
  52  */
  53 public class Snapshot1Test extends SnapshotCommon {
  54 
  55     // Sleep time to verify that deferred snapshot is not called immediately
  56     static final int SLEEP_TIME = 100;
  57 
  58     // Short timeout used to ensure that bad callback is not called
  59     static final int SHORT_TIMEOUT = 1000;
  60 
  61     @BeforeClass
  62     public static void setupOnce() {
  63         doSetupOnce();
  64     }
  65 
  66     @AfterClass
  67     public static void teardownOnce() {
  68         doTeardownOnce();


< prev index next >