author | jboes |
Fri, 08 Nov 2019 11:15:16 +0000 | |
changeset 59029 | 3786a0962570 |
parent 47216 | 71c04702a3d5 |
permissions | -rw-r--r-- |
26357
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
1 |
/* |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
2 |
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
4 |
* |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
8 |
* |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
13 |
* accompanied this code). |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
14 |
* |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
18 |
* |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
21 |
* questions. |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
22 |
*/ |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
23 |
|
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
24 |
/* |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
25 |
* @test |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
26 |
* @bug 8039271 |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
27 |
* @summary test all standard profiles load correctly. |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
28 |
*/ |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
29 |
|
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
30 |
import java.awt.color.ICC_Profile; |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
31 |
|
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
32 |
public class LoadStandardProfilesTest { |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
33 |
|
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
34 |
public static void main(String args[]) { |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
35 |
try { |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
36 |
ICC_Profile sRGB = ICC_Profile.getInstance("sRGB.pf"); |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
37 |
ICC_Profile gray = ICC_Profile.getInstance("GRAY.pf"); |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
38 |
ICC_Profile pycc = ICC_Profile.getInstance("PYCC.pf"); |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
39 |
ICC_Profile ciexyz = ICC_Profile.getInstance("CIEXYZ.pf"); |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
40 |
ICC_Profile linearRGB = ICC_Profile.getInstance("LINEAR_RGB.pf"); |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
41 |
|
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
42 |
if (sRGB == null || |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
43 |
gray == null || |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
44 |
pycc == null || |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
45 |
ciexyz == null || |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
46 |
linearRGB == null) |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
47 |
{ |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
48 |
throw new RuntimeException("null profile."); |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
49 |
} |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
50 |
} catch (Exception e) { |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
51 |
throw new RuntimeException(e); |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
52 |
} |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
53 |
} |
bd702816164f
8039271: CMM profile files (cmm/*) should not be in ${java.home}/lib
prr
parents:
diff
changeset
|
54 |
} |