Thu, 16 Mar 2017 17:39:31 +0000
8173207: Upgrade compression library
Reviewed-by: sherman, jeff
sundar@77 | 1 | /* |
sundar@77 | 2 | * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. |
sundar@77 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
attila@962 | 4 | * |
sundar@77 | 5 | * This code is free software; you can redistribute it and/or modify it |
sundar@77 | 6 | * under the terms of the GNU General Public License version 2 only, as |
sundar@77 | 7 | * published by the Free Software Foundation. |
attila@962 | 8 | * |
sundar@77 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
sundar@77 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
sundar@77 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
sundar@77 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
sundar@77 | 13 | * accompanied this code). |
attila@962 | 14 | * |
sundar@77 | 15 | * You should have received a copy of the GNU General Public License version |
sundar@77 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
sundar@77 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
attila@962 | 18 | * |
sundar@77 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
sundar@77 | 20 | * or visit www.oracle.com if you need additional information or have any |
sundar@77 | 21 | * questions. |
sundar@77 | 22 | */ |
sundar@77 | 23 | |
sundar@77 | 24 | /** |
sundar@77 | 25 | * Check that nashorn mozilla compatibility script can be loaded in sandbox. |
sundar@77 | 26 | * |
sundar@77 | 27 | * @test |
sundar@77 | 28 | * @run |
sundar@77 | 29 | * @security |
sundar@77 | 30 | */ |
sundar@77 | 31 | |
sundar@77 | 32 | load("nashorn:mozilla_compat.js"); |
sundar@77 | 33 | |
sundar@77 | 34 | var obj = {}; |
sundar@77 | 35 | if (obj.__proto__ !== Object.prototype) { |
sundar@77 | 36 | fail("__proto__ does not work as expected"); |
sundar@77 | 37 | } |
sundar@77 | 38 | |
sundar@77 | 39 | var array = []; |
sundar@77 | 40 | if (array.__proto__ !== Array.prototype) { |
sundar@77 | 41 | fail("__proto__ does not work as expected"); |
sundar@77 | 42 | } |
sundar@77 | 43 | |
sundar@77 | 44 | if (typeof JavaAdapter != 'function') { |
sundar@77 | 45 | fail("JavaAdapter constructor is missing in compatibility script"); |
sundar@77 | 46 | } |
sundar@77 | 47 | |
sundar@77 | 48 | if (typeof importPackage != 'function') { |
sundar@77 | 49 | fail("importPackage function is missing in compatibility script"); |
sundar@77 | 50 | } |
hannesw@623 | 51 | |
hannesw@623 | 52 | if (typeof sync != 'function') { |
hannesw@623 | 53 | fail("sync function is missing in compatibility script"); |
hannesw@623 | 54 | } |