JDK-8010709.js revision 877:cf4d2252d444
143989Snsouch/* 243999Snsouch * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. 343989Snsouch * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 443989Snsouch * 543999Snsouch * This code is free software; you can redistribute it and/or modify it 643999Snsouch * under the terms of the GNU General Public License version 2 only, as 743999Snsouch * published by the Free Software Foundation. 843999Snsouch * 943999Snsouch * This code is distributed in the hope that it will be useful, but WITHOUT 1043999Snsouch * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1143989Snsouch * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1243989Snsouch * version 2 for more details (a copy is included in the LICENSE file that 1343989Snsouch * accompanied this code). 1443989Snsouch * 1543989Snsouch * You should have received a copy of the GNU General Public License version 1643989Snsouch * 2 along with this work; if not, write to the Free Software Foundation, 1743989Snsouch * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1843989Snsouch * 1943989Snsouch * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2043989Snsouch * or visit www.oracle.com if you need additional information or have any 2143989Snsouch * questions. 2243989Snsouch */ 2343989Snsouch 2443989Snsouch/** 2543989Snsouch * JDK-8010709 org on the top level doesn't resolve 2643989Snsouch * 2743989Snsouch * @test 2843989Snsouch * @run 2943989Snsouch */ 3043989Snsouch 3143989Snsouchfunction check(pkgName) { 3243989Snsouch if (typeof this[pkgName] != 'object') { 3343989Snsouch fail(pkgName + " not defined"); 34185003Sjhb } 3543989Snsouch 3643989Snsouch if (String(this[pkgName]) != '[JavaPackage ' + pkgName + ']') { 3750477Speter fail(pkgName + " is not a JavaPackage"); 3843989Snsouch } 3943989Snsouch} 4043999Snsouch 4143999Snsouchcheck("com"); 4243999Snsouchcheck("edu"); 4343999Snsouchcheck("java"); 4443999Snsouchcheck("javafx"); 4543999Snsouchcheck("javax"); 4643999Snsouchcheck("org"); 4743999Snsouch