equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
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 |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
23 * questions. |
23 * questions. |
24 */ |
24 */ |
25 |
25 |
26 /* |
26 /* |
27 * @test |
27 * @test |
28 * @bug 6559064 |
28 * @bug 6559064 6942504 |
29 * |
29 * |
30 * @summary Verify DOM L3 Node APIs behave as per Image I/O spec. |
30 * @summary Verify DOM L3 Node APIs behave as per Image I/O spec. |
31 * |
31 * |
32 * @run main DOML3Node |
32 * @run main DOML3Node |
33 */ |
33 */ |
34 |
34 |
35 import javax.imageio.metadata.IIOMetadataNode; |
35 import javax.imageio.metadata.IIOMetadataNode; |
36 import org.w3c.dom.Attr; |
36 import org.w3c.dom.Attr; |
|
37 import org.w3c.dom.Node; |
37 import org.w3c.dom.DOMException; |
38 import org.w3c.dom.DOMException; |
38 import org.w3c.dom.UserDataHandler; |
39 import org.w3c.dom.UserDataHandler; |
39 |
40 |
40 |
41 |
41 public class DOML3Node { |
42 public class DOML3Node { |
72 throw new RuntimeException("No expected DOM exception"); |
73 throw new RuntimeException("No expected DOM exception"); |
73 } catch (DOMException e) { |
74 } catch (DOMException e) { |
74 } |
75 } |
75 |
76 |
76 try { |
77 try { |
77 node.setUserData("key"); |
78 node.getUserData("key"); |
78 throw new RuntimeException("No expected DOM exception"); |
79 throw new RuntimeException("No expected DOM exception"); |
79 } catch (DOMException e) { |
80 } catch (DOMException e) { |
80 } |
81 } |
81 |
82 |
82 try { |
83 try { |
114 throw new RuntimeException("No expected DOM exception"); |
115 throw new RuntimeException("No expected DOM exception"); |
115 } catch (DOMException e) { |
116 } catch (DOMException e) { |
116 } |
117 } |
117 |
118 |
118 try { |
119 try { |
119 node.lookupPrefix("namespaceURI"); |
|
120 throw new RuntimeException("No expected DOM exception"); |
|
121 } catch (DOMException e) { |
|
122 } |
|
123 |
|
124 try { |
|
125 node.getTextContent(); |
120 node.getTextContent(); |
126 throw new RuntimeException("No expected DOM exception"); |
121 throw new RuntimeException("No expected DOM exception"); |
127 } catch (DOMException e) { |
122 } catch (DOMException e) { |
128 } |
123 } |
129 |
124 |