functional/FxmlTests/test/test/fxmltests/functional/LineNumberTest.java.excluded

Print this page



   1 /*
   2  * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   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 package test.fxmltests.functional;
  26 

  27 import junit.framework.Assert;
  28 import org.jemmy.env.Timeout;
  29 import org.jemmy.timing.State;
  30 import org.jemmy.timing.Waiter;
  31 import org.junit.BeforeClass;
  32 import org.junit.Test;
  33 import test.fxmltests.app.LineNumberApp;
  34 import test.javaclient.shared.TestBase;
  35 import test.javaclient.shared.Utils;
  36 

  37 public class LineNumberTest extends TestBase {
  38 
  39     private static final long WAITER_TIMEOUT = 5000;
  40 
  41     @BeforeClass
  42     public static void runUI() {
  43         Utils.launch(LineNumberApp.class, null);
  44     }
  45 
  46     /**
  47      * testing LoadListener#readImportProcessingInstruction
  48      */
  49     @Test
  50     public void testImportProcessingInstruction() {
  51         testCommon(LineNumberApp.Pages.mainPage.name(), null, false, false);
  52         new Waiter(new Timeout("", WAITER_TIMEOUT)).ensureValue(true, new State<Boolean>() {
  53             @Override
  54             public Boolean reached() {
  55                 return LineNumberApp.importProcessingInstructionMatrix.length == LineNumberApp.importProcessingInstruction.size();
  56             }


   1 // https://bugs.openjdk.java.net/browse/INTJDK-7624138
   2 /*
   3  * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
   4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   5  *
   6  * This code is free software; you can redistribute it and/or modify it
   7  * under the terms of the GNU General Public License version 2 only, as
   8  * published by the Free Software Foundation. Oracle designates this
   9  * particular file as subject to the "Classpath" exception as provided
  10  * by Oracle in the LICENSE file that accompanied this code.
  11  *
  12  * This code is distributed in the hope that it will be useful, but WITHOUT
  13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  14  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  15  * version 2 for more details (a copy is included in the LICENSE file that
  16  * accompanied this code).
  17  *
  18  * You should have received a copy of the GNU General Public License version
  19  * 2 along with this work; if not, write to the Free Software Foundation,
  20  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  21  *
  22  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  23  * or visit www.oracle.com if you need additional information or have any
  24  * questions.
  25  */
  26 package test.fxmltests.functional;
  27 
  28 import client.test.AddExports;
  29 import junit.framework.Assert;
  30 import org.jemmy.env.Timeout;
  31 import org.jemmy.timing.State;
  32 import org.jemmy.timing.Waiter;
  33 import org.junit.BeforeClass;
  34 import org.junit.Test;
  35 import test.fxmltests.app.LineNumberApp;
  36 import test.javaclient.shared.TestBase;
  37 import test.javaclient.shared.Utils;
  38 
  39 @AddExports(value = "javafx.fxml/com.sun.javafx.fxml=ALL-UNNAMED")
  40 public class LineNumberTest extends TestBase {
  41 
  42     private static final long WAITER_TIMEOUT = 5000;
  43 
  44     @BeforeClass
  45     public static void runUI() {
  46         Utils.launch(LineNumberApp.class, null);
  47     }
  48 
  49     /**
  50      * testing LoadListener#readImportProcessingInstruction
  51      */
  52     @Test
  53     public void testImportProcessingInstruction() {
  54         testCommon(LineNumberApp.Pages.mainPage.name(), null, false, false);
  55         new Waiter(new Timeout("", WAITER_TIMEOUT)).ensureValue(true, new State<Boolean>() {
  56             @Override
  57             public Boolean reached() {
  58                 return LineNumberApp.importProcessingInstructionMatrix.length == LineNumberApp.importProcessingInstruction.size();
  59             }