FocusTransferWDFModeless2Test.java revision 15235:fe58d505fffd
1262925Simp/* 2262925Simp * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. 3262925Simp * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4262925Simp * 5262925Simp * This code is free software; you can redistribute it and/or modify it 6262925Simp * under the terms of the GNU General Public License version 2 only, as 7262925Simp * published by the Free Software Foundation. 8262925Simp * 9262925Simp * This code is distributed in the hope that it will be useful, but WITHOUT 10262925Simp * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11262925Simp * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12262925Simp * version 2 for more details (a copy is included in the LICENSE file that 13262925Simp * accompanied this code). 14262925Simp * 15262925Simp * You should have received a copy of the GNU General Public License version 16262925Simp * 2 along with this work; if not, write to the Free Software Foundation, 17262925Simp * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18262925Simp * 19262925Simp * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20262925Simp * or visit www.oracle.com if you need additional information or have any 21262925Simp * questions. 22262925Simp */ 23262925Simp 24262925Simpimport java.awt.Dialog; 25262925Simp 26262925Simp/* 27262925Simp * @test 28262925Simp * @key headful 29262925Simp * @bug 8047367 30262925Simp * @summary Check whether the focus transfer between windows occurs correctly when 31262925Simp * the following happens: a window having a hidden frame owner is shown; 32262925Simp * a modeless dialog having a null dialog owner is shown; 33262925Simp * a frame is shown. 34262925Simp * 35262925Simp * @library ../helpers ../../../../lib/testlibrary/ 36262925Simp * @build ExtendedRobot 37262925Simp * @build Flag 38262925Simp * @build TestDialog 39271398Sandrew * @build TestFrame 40262925Simp * @build TestWindow 41262925Simp * @run main FocusTransferWDFModeless2Test 42262925Simp */ 43262925Simp 44262925Simppublic class FocusTransferWDFModeless2Test { 45262925Simp 46262925Simp public static void main(String[] args) throws Exception { 47262925Simp FocusTransferWDFTest test = new FocusTransferWDFTest( 48262925Simp Dialog.ModalityType.MODELESS, 49262925Simp FocusTransferWDFTest.DialogParent.FRAME, 50262925Simp FocusTransferWDFTest.WindowParent.NEW_FRAME); 51262925Simp test.doTest(); 52262925Simp } 53262925Simp} 54262925Simp