Debian Codegraph @

rhino/testsrc/tests/e4x/XML/13.4.4.28.js

raw symbols SCIP
1 /* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 *
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7 gTestfile = '13.4.4.28.js';
8
9 START("13.4.4.28 - processingInsructions()");
10
11 TEST(1, true, XML.prototype.hasOwnProperty("processingInstructions"));
12
13 XML.ignoreProcessingInstructions = false;
14
15 // test generic PI
16 x = <alpha><?xyz abc="123" michael="wierd"?><?another name="value" ?><bravo>one</bravo></alpha>;
17
18 correct = <><?xyz abc="123" michael="wierd"?><?another name="value" ?></>;
19
20 TEST(2, correct, x.processingInstructions());
21 TEST(3, correct, x.processingInstructions("*"));
22
23 correct = "<?xyz abc=\"123\" michael=\"wierd\"?>";
24
25 TEST_XML(4, correct, x.processingInstructions("xyz"));
26
27 // test XML-decl
28 // Un-comment these tests when we can read in doc starting with PI.
29 //x = new XML("<?xml version=\"1.0\" ?><alpha><bravo>one</bravo></alpha>");
30
31 //correct = new XMLList(<?xml version="1.0" encoding="utf-8"?>);
32
33 //test(5, correct, x.processingInstructions());
34 //test(6, correct, x.processingInstructions("*"));
35 //test(7, correct, x.processingInstructions("xml"));
36
37 END();